X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=device%2Flib%2Fz80%2Fmod.s;h=77f75daf70ad1dcaa7300340556ca96297eea29f;hb=5a1d5e778e85664f4e6657019348b4756b16eacb;hp=9d3b04808899b6171d7aa898da7d7b99ef654a43;hpb=d55072f68fcf3718b20b1a2c86058b01157bd189;p=fw%2Fsdcc diff --git a/device/lib/z80/mod.s b/device/lib/z80/mod.s index 9d3b0480..77f75daf 100644 --- a/device/lib/z80/mod.s +++ b/device/lib/z80/mod.s @@ -17,19 +17,14 @@ __moduchar_rrx_hds:: ret __moduint_rrx_s:: - ld hl,#2+3 - add hl,sp + pop af + pop hl + pop de + push de + push hl + push af - ld d,(hl) - dec hl - ld e,(hl) - dec hl - ld a,(hl) - dec hl - ld l,(hl) - ld h,a ;; Fall through - __moduint_rrx_hds:: call __divu16 @@ -39,10 +34,10 @@ __moduint_rrx_hds:: __moduschar_rrx_s:: ld hl,#2+1 + ld d, h add hl,sp ld e,(hl) - ld d, #0 dec hl ld l,(hl)