summaryrefslogtreecommitdiff
path: root/frontends/calculator/CEdev/lib/shared/log2.src
blob: 028886f9a405bffd9ac893188134cc43c8ef2362 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
	.def _log2
	.ref _log
	.ref __fdiv
	.ref __frameset0
	.assume adl=1

_log2:
	call	__frameset0
	ld	c,(ix+9)
	ld	b,0
	push	bc
	ld	bc,(ix+6)
	push	bc
	call	_log
	push	hl
	pop	bc
	ld	a,e
	ld	hl,3240472
	ld	e,63
	call	__fdiv
	ld	e,a
	push	bc
	pop	hl
	ld	sp,ix
	pop	ix
	ret