Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- DEHL_Div_C:
- ;Inputs:
- ; DEHL is a 32 bit value where DE is the upper 16 bits
- ; C is the value to divide DEHL by
- ;Outputs:
- ; A is the remainder
- ; B is 0
- ; C is not changed
- ; DEHL is the result of the division
- ;
- ld b,32
- xor a
- add hl,hl
- rl e \ rl d
- rla
- cp c
- jr c,$+4
- inc l
- sub c
- djnz $-10
- ret
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement