Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #define cpjump(label) call XPJ \ .db getpagenum(label) \ .dw label
- XPJBASE equ ramseg8
- XPJS: ;input: .db page .dw address. Different from XPC
- XPJ equ XPJBASE+($-XPJS) ;This is the one that needs to be called.
- ;The cross page jump is simple. It need not return to any given point, so it
- ;may overwrite the call's return address with the new goto address.
- ex (sp),hl
- push af
- push de
- XPJZ equ XPJBASE+($-XPJS)+1
- ld a,0
- sub (hl)
- inc hl
- ld e,(hl)
- inc hl
- ld d,(hl)
- ex de,hl
- out (6),a
- pop de
- pop af
- ex (sp),hl
- ret
- XPJE:
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement