1234567891011121314151617181920212223242526 |
- DEHL_Div_C:
- ex de,hl
- push de
- jr $+4
- HLIX_Div_C:
- ;HLIX/C, C<=128 (yes, 128 is allowed)
- ;26 bytes
- push ix
- call HL_Div_C_limited
- ex (sp),hl
- call HL_Div_C_limited+1
- ex (sp),hl
- pop ix
- ret
- HL_Div_C_limited:
- xor a
- ld b,16
- _:
- add hl,hl
- rla
- cp c
- jr c,$+4
- sub c
- inc l
- djnz -_
- ret
|