Skip to content

Commit 22dc2df

Browse files
committed
optimize jump relative (it no longer clobbers IX)
1 parent 04cd228 commit 22dc2df

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

src/libload/libload.asm

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -155,12 +155,13 @@ call_relative:
155155
jp (ix)
156156
end if
157157
jump_relative:
158-
pop ix
158+
ex (sp), hl
159159
push de
160-
ld de, (ix)
161-
add ix, de
160+
ld de, (hl)
161+
add hl, de
162162
pop de
163-
jp (ix)
163+
ex (sp), hl
164+
ret
164165
ld_relative:
165166
pop hl
166167
ld de, 0

0 commit comments

Comments
 (0)