;--------------------------------------------------------
; File Created by SDCC : FreeWare ANSI-C Compiler
; Version 2.5.1 #1058 (Jul 15 2005)
; This file generated Fri Jul 15 02:50:52 2005
;--------------------------------------------------------
	.module _moduint
	.optsdcc -mmcs51 --model-large
	
;--------------------------------------------------------
; Public variables in this module
;--------------------------------------------------------
	.globl __moduint_PARM_2
	.globl __moduint
;--------------------------------------------------------
; special function registers
;--------------------------------------------------------
	.area RSEG    (DATA)
;--------------------------------------------------------
; special function bits 
;--------------------------------------------------------
	.area RSEG    (DATA)
;--------------------------------------------------------
; overlayable register banks 
;--------------------------------------------------------
	.area REG_BANK_0	(REL,OVR,DATA)
	.ds 8
;--------------------------------------------------------
; internal ram data
;--------------------------------------------------------
	.area DSEG    (DATA)
;--------------------------------------------------------
; overlayable items in internal ram 
;--------------------------------------------------------
	.area OSEG    (OVR,DATA)
;--------------------------------------------------------
; indirectly addressable internal ram data
;--------------------------------------------------------
	.area ISEG    (DATA)
;--------------------------------------------------------
; bit data
;--------------------------------------------------------
	.area BSEG    (BIT)
;--------------------------------------------------------
; paged external ram data
;--------------------------------------------------------
	.area PSEG    (PAG,XDATA)
;--------------------------------------------------------
; external ram data
;--------------------------------------------------------
	.area XSEG    (XDATA)
__moduint_PARM_2::
	.ds 2
__moduint_a_1_1::
	.ds 2
__moduint_count_1_1::
	.ds 1
;--------------------------------------------------------
; external initialized ram data
;--------------------------------------------------------
	.area XISEG   (XDATA)
	.area CSEG    (CODE)
	.area GSINIT0 (CODE)
	.area GSINIT1 (CODE)
	.area GSINIT2 (CODE)
	.area GSINIT3 (CODE)
	.area GSINIT4 (CODE)
	.area GSINIT5 (CODE)
;--------------------------------------------------------
; global & static initialisations
;--------------------------------------------------------
	.area CSEG    (CODE)
	.area GSINIT  (CODE)
	.area GSFINAL (CODE)
	.area GSINIT  (CODE)
;--------------------------------------------------------
; Home
;--------------------------------------------------------
	.area HOME    (CODE)
	.area CSEG    (CODE)
;--------------------------------------------------------
; code
;--------------------------------------------------------
	.area CSEG    (CODE)
;------------------------------------------------------------
;Allocation info for local variables in function '_moduint'
;------------------------------------------------------------
;b                         Allocated with name '__moduint_PARM_2'
;a                         Allocated with name '__moduint_a_1_1'
;count                     Allocated with name '__moduint_count_1_1'
;------------------------------------------------------------
;_moduint.c:172: _moduint (unsigned int a, unsigned int b)
;	-----------------------------------------
;	 function _moduint
;	-----------------------------------------
__moduint:
	ar2 = 0x02
	ar3 = 0x03
	ar4 = 0x04
	ar5 = 0x05
	ar6 = 0x06
	ar7 = 0x07
	ar0 = 0x00
	ar1 = 0x01
;     genReceive
	mov	r2,dph
	mov	a,dpl
	mov	dptr,#__moduint_a_1_1
	movx	@dptr,a
	inc	dptr
	mov	a,r2
	movx	@dptr,a
;_moduint.c:174: unsigned char count = 0;
;     genAssign
	mov	dptr,#__moduint_count_1_1
;	Peephole 181	changed mov to clr
	clr	a
	movx	@dptr,a
;_moduint.c:177: while (!MSB_SET(b))
;     genAssign
	mov	dptr,#__moduint_a_1_1
	movx	a,@dptr
	mov	r2,a
	inc	dptr
	movx	a,@dptr
	mov	r3,a
;     genAssign
	mov	r4,#0x00
00103$:
;     genAssign
	mov	dptr,#__moduint_PARM_2
	movx	a,@dptr
	mov	r5,a
	inc	dptr
	movx	a,@dptr
;     genGetHbit
;	Peephole 105	removed redundant mov
	mov	r6,a
	rl	a
	anl	a,#0x01
;     genIfx
;	Peephole 105	removed redundant mov
	mov	r7,a
;     genIfxJump
;	Peephole 109	removed ljmp by inverse jump logic
	jnz	00117$
;	Peephole 300	removed redundant label 00119$
;_moduint.c:179: b <<= 1;
;     genLeftShift
;     genLeftShiftLiteral
;     genlshTwo
	mov	a,r6
	xch	a,r5
	add	a,acc
	xch	a,r5
	rlc	a
	mov	r6,a
;     genAssign
	mov	dptr,#__moduint_PARM_2
	mov	a,r5
	movx	@dptr,a
	inc	dptr
	mov	a,r6
	movx	@dptr,a
;_moduint.c:180: if (b > a)
;     genAssign
	mov	dptr,#__moduint_PARM_2
	movx	a,@dptr
	mov	r5,a
	inc	dptr
	movx	a,@dptr
	mov	r6,a
;     genCmpGt
;     genCmp
	clr	c
	mov	a,r2
	subb	a,r5
	mov	a,r3
	subb	a,r6
;     genIfxJump
;	Peephole 108	removed ljmp by inverse jump logic
	jnc	00102$
;	Peephole 300	removed redundant label 00120$
;_moduint.c:182: b >>=1;
;     genRightShift
;     genRightShiftLiteral
;     genrshTwo
	mov	a,r6
	clr	c
	rrc	a
	xch	a,r5
	rrc	a
	xch	a,r5
	mov	r6,a
;     genAssign
	mov	dptr,#__moduint_PARM_2
	mov	a,r5
	movx	@dptr,a
	inc	dptr
	mov	a,r6
	movx	@dptr,a
;_moduint.c:183: break;
;	Peephole 112.b	changed ljmp to sjmp
	sjmp	00117$
00102$:
;_moduint.c:185: count++;
;     genPlus
;     genPlusIncr
	inc	r4
;     genAssign
	mov	dptr,#__moduint_count_1_1
	mov	a,r4
	movx	@dptr,a
;_moduint.c:187: do
;	Peephole 112.b	changed ljmp to sjmp
	sjmp	00103$
00117$:
;     genAssign
	mov	dptr,#__moduint_count_1_1
	movx	a,@dptr
	mov	r2,a
00108$:
;_moduint.c:189: if (a >= b)
;     genAssign
	mov	dptr,#__moduint_a_1_1
	movx	a,@dptr
	mov	r3,a
	inc	dptr
	movx	a,@dptr
	mov	r4,a
;     genAssign
	mov	dptr,#__moduint_PARM_2
	movx	a,@dptr
	mov	r5,a
	inc	dptr
	movx	a,@dptr
	mov	r6,a
;     genCmpLt
;     genCmp
	clr	c
	mov	a,r3
	subb	a,r5
	mov	a,r4
	subb	a,r6
;     genIfxJump
;	Peephole 112.b	changed ljmp to sjmp
;	Peephole 160	removed sjmp by inverse jump logic
	jc	00107$
00121$:
;_moduint.c:190: a -= b;
;     genMinus
	mov	dptr,#__moduint_a_1_1
	mov	a,r3
	clr	c
;	Peephole 236.l	used r5 instead of ar5
	subb	a,r5
	movx	@dptr,a
	mov	a,r4
;	Peephole 236.l	used r6 instead of ar6
	subb	a,r6
	inc	dptr
	movx	@dptr,a
00107$:
;_moduint.c:191: b >>= 1;
;     genAssign
	mov	dptr,#__moduint_PARM_2
	movx	a,@dptr
	mov	r3,a
	inc	dptr
	movx	a,@dptr
;     genRightShift
;     genRightShiftLiteral
;     genrshTwo
;	Peephole 105	removed redundant mov
	mov	r4,a
	clr	c
	rrc	a
	xch	a,r3
	rrc	a
	xch	a,r3
	mov	r4,a
;     genAssign
	mov	dptr,#__moduint_PARM_2
	mov	a,r3
	movx	@dptr,a
	inc	dptr
	mov	a,r4
	movx	@dptr,a
;_moduint.c:193: while (count--);
;     genAssign
	mov	ar3,r2
;     genMinus
;     genMinusDec
	dec	r2
;     genIfx
	mov	a,r3
;     genIfxJump
;	Peephole 109	removed ljmp by inverse jump logic
	jnz	00108$
;	Peephole 300	removed redundant label 00122$
;_moduint.c:194: return a;
;     genAssign
	mov	dptr,#__moduint_a_1_1
	movx	a,@dptr
	mov	r2,a
	inc	dptr
	movx	a,@dptr
;     genRet
;	Peephole 235	loading dph directly from a(ccumulator), r3 not set
	mov	dpl,r2
	mov	dph,a
;	Peephole 300	removed redundant label 00111$
	ret
	.area CSEG    (CODE)
	.area CONST   (CODE)
	.area XINIT   (CODE)
