Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 7 additions & 6 deletions src/crt/idvrmu.src
Original file line number Diff line number Diff line change
Expand Up @@ -24,23 +24,24 @@ __idvrmu.hijack_a_iters_ude_dividend:

or a, a
sbc hl, hl

; jr .L.loop
db $DA ; jp c, *
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can make this 1F faster at the cost of 1 byte by using jr .L.loop instead of jp c, *

.L.restore_skip:
inc de ; DE |= 1
jr z, .L.finish
.L.loop:
ex de, hl
add hl, hl
ex de, hl
adc hl, hl

sbc hl, bc
inc e

dec a
jr nc, .L.restore_skip
add hl, bc
dec e
.L.restore_skip:

dec a
jr nz, .L.loop
.L.finish:

pop af
ret
Expand Down
Loading