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