;--------------------------------------------------------
; File Created by SDCC : FreeWare ANSI-C Compiler
; Version 2.5.0 #1020 (Oct 16 2005)
; This file generated Sun Oct 16 22:34:58 2005
;--------------------------------------------------------
	.module _ulong2fs
	.optsdcc -mz80
	
;--------------------------------------------------------
; Public variables in this module
;--------------------------------------------------------
	.globl ___ulong2fs
;--------------------------------------------------------
; special function registers
;--------------------------------------------------------
;--------------------------------------------------------
;  ram data
;--------------------------------------------------------
	.area _DATA
;--------------------------------------------------------
; overlayable items in  ram 
;--------------------------------------------------------
	.area _OVERLAY
;--------------------------------------------------------
; external initialized ram data
;--------------------------------------------------------
;--------------------------------------------------------
; global & static initialisations
;--------------------------------------------------------
	.area _CODE
	.area _GSINIT
	.area _GSFINAL
	.area _GSINIT
;--------------------------------------------------------
; Home
;--------------------------------------------------------
	.area _HOME
	.area _CODE
;--------------------------------------------------------
; code
;--------------------------------------------------------
	.area _CODE
;_ulong2fs.c:75: float __ulong2fs (unsigned long a )
;	genLabel
;	genFunction
;	---------------------------------
; Function __ulong2fs
; ---------------------------------
___ulong2fs_start::
___ulong2fs:
	push	ix
	ld	ix,#0
	add	ix,sp
	ld	hl,#-10
	add	hl,sp
	ld	sp,hl
;_ulong2fs.c:80: if (!a)
;	genIfx
;	AOP_STK for 
	ld	a,4(ix)
	or	a,5(ix)
	or	a,6(ix)
	or	a,7(ix)
	jp	nz,00115$
;_ulong2fs.c:82: return 0.0;
;	genRet
; Dump of IC_LEFT: type AOP_LIT size 4
	ld	hl,#0x0000
	ld	de,#0x0000
	jp	00111$
;_ulong2fs.c:85: while (a & NORM) 
;	genLabel
00115$:
;	genAssign
;	AOP_STK for ___ulong2fs_exp_1_1
	ld	-2(ix),#0x96
	ld	-1(ix),#0x00
;	genLabel
00103$:
;	genAnd
;	AOP_STK for 
	ld	a,7(ix)
	or	a,a
	jp	z,00117$
00119$:
;_ulong2fs.c:88: a >>= 1;
;	genIpush
; _saveRegsForCall: sendSetSize: 0 deInUse: 0 bcInUse: 0 deSending: 0
	ld	a,#0x01
	push	af
	inc	sp
;	genIpush
;	AOP_STK for 
	ld	l,6(ix)
	ld	h,7(ix)
	push	hl
	ld	l,4(ix)
	ld	h,5(ix)
	push	hl
;	genCall
	call	__rrulong_rrx_s
	ld	b,d
	ld	c,e
	ld	d,h
	ld	e,l
	pop	af
	pop	af
	inc	sp
;	genAssign
;	AOP_STK for 
	ld	4(ix),e
	ld	5(ix),d
	ld	6(ix),c
	ld	7(ix),b
;_ulong2fs.c:89: exp++;
;	genPlus
;	AOP_STK for ___ulong2fs_exp_1_1
;	genPlusIncr
	inc	-2(ix)
	jp	nz,00120$
	inc	-1(ix)
00120$:
;	genGoto
	jp	00103$
;_ulong2fs.c:92: while (a < HIDDEN)
;	genLabel
00117$:
;	genAssign
;	AOP_STK for ___ulong2fs_exp_1_1
;	(registers are the same)
;	genLabel
00106$:
;	genCmpLt
;	AOP_STK for 
	ld	a,4(ix)
	sub	a,#0x00
	ld	a,5(ix)
	sbc	a,#0x00
	ld	a,6(ix)
	sbc	a,#0x80
	ld	a,7(ix)
	sbc	a,#0x00
	ld	a,#0x00
	rla
	ld	e,a
;	genAssign
;	AOP_STK for ___ulong2fs_exp_1_1
;	AOP_STK for ___ulong2fs_sloc0_1_0
	ld	a,-2(ix)
	ld	-8(ix),a
	ld	a,-1(ix)
	ld	-7(ix),a
;	genIfx
	xor	a,a
	or	a,e
	jp	z,00108$
;_ulong2fs.c:94: a <<= 1;
;	genIpush
; _saveRegsForCall: sendSetSize: 0 deInUse: 0 bcInUse: 0 deSending: 0
	ld	a,#0x01
	push	af
	inc	sp
;	genIpush
;	AOP_STK for 
	ld	l,6(ix)
	ld	h,7(ix)
	push	hl
	ld	l,4(ix)
	ld	h,5(ix)
	push	hl
;	genCall
	call	__rlulong_rrx_s
	ld	b,d
	ld	c,e
	ld	d,h
	ld	e,l
	pop	af
	pop	af
	inc	sp
;	genAssign
;	AOP_STK for 
	ld	4(ix),e
	ld	5(ix),d
	ld	6(ix),c
	ld	7(ix),b
;_ulong2fs.c:95: exp--;
;	genMinus
;	AOP_STK for ___ulong2fs_exp_1_1
	ld	l,-2(ix)
	ld	h,-1(ix)
	dec	hl
	ld	-2(ix),l
	ld	-1(ix),h
;	genGoto
	jp	00106$
;	genLabel
00108$:
;_ulong2fs.c:99: if ((a&0x7fffff)==0x7fffff) {
;	genAnd
;	AOP_STK for 
	ld	c,4(ix)
	ld	b,5(ix)
	ld	a,6(ix)
	and	a,#0x7F
	ld	e,a
	ld	d,#0x00
;	genCmpEq
; genCmpEq: left 4, right 4, result 0
	ld	a,c
	cp	a,#0xFF
	jp	nz,00121$
	ld	a,b
	cp	a,#0xFF
	jp	nz,00121$
	ld	a,e
	cp	a,#0x7F
	jp	nz,00121$
	ld	a,d
	or	a,a
	jp	z,00122$
00121$:
	jp	00110$
00122$:
;_ulong2fs.c:101: exp++;
;	genPlus
;	AOP_STK for ___ulong2fs_exp_1_1
;	AOP_STK for ___ulong2fs_sloc0_1_0
;	genPlusIncr
;	Can't optimise plus by inc, falling back to the normal way
	ld	a,-2(ix)
	add	a,#0x01
	ld	-8(ix),a
	ld	a,-1(ix)
	adc	a,#0x00
	ld	-7(ix),a
;	genLabel
00110$:
;_ulong2fs.c:107: fl.l = PACK(0,(unsigned long)exp, a);
;	genAddrOf
;	AOP_STK for ___ulong2fs_sloc1_1_0
	ld	hl,#0x0004
	add	hl,sp
	ld	-10(ix),l
	ld	-9(ix),h
;	genCast
;	AOP_STK for ___ulong2fs_sloc0_1_0
	ld	e,-8(ix)
	ld	d,-7(ix)
	ld	a,d
	rla	
	sbc	a,a
	ld	c,a
	ld	b,a
;	genIpush
; _saveRegsForCall: sendSetSize: 0 deInUse: 0 bcInUse: 0 deSending: 0
	ld	a,#0x17
	push	af
	inc	sp
;	genIpush
	ld	l,c
	ld	h,b
	push	hl
	ld	l,e
	ld	h,d
	push	hl
;	genCall
	call	__rlulong_rrx_s
; Removed redundent load
; Removed redundent load
	ld	b,h
	ld	c,l
	pop	af
	pop	af
	inc	sp
;	genAssign (pointer)
;	AOP_STK for ___ulong2fs_sloc1_1_0
;	isBitvar = 0
	ld	l,-10(ix)
	ld	h,-9(ix)
	ld	(hl),c
	inc	hl
	ld	(hl),b
	inc	hl
	ld	(hl),e
	inc	hl
	ld	(hl),d
;_ulong2fs.c:109: return (fl.f);
;	genAddrOf
	ld	hl,#0x0004
	add	hl,sp
;	genPointerGet
	ld	c,l
	ld	b,h
	ld	c,(hl)
	inc	hl
	ld	b,(hl)
	inc	hl
	ld	e,(hl)
	inc	hl
	ld	d,(hl)
;	genRet
; Dump of IC_LEFT: type AOP_REG size 4
;	 reg = debc
	ld	l,c
	ld	h,b
;	genLabel
00111$:
;	genEndFunction
	ld	sp,ix
	pop	ix
	ret
___ulong2fs_end::
	.area _CODE
