Advertisement
Guest User

Untitled

a guest
Jul 19th, 2017
51
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #define cpjump(label) call XPJ \ .db getpagenum(label) \ .dw label
  2.  
  3. XPJBASE equ ramseg8
  4. XPJS:  ;input: .db page .dw address. Different from XPC
  5. XPJ equ XPJBASE+($-XPJS)  ;This is the one that needs to be called.
  6. ;The cross page jump is simple. It need not return to any given point, so it
  7. ;may overwrite the call's return address with the new goto address.
  8.  ex (sp),hl
  9.  push af
  10.   push de
  11. XPJZ equ XPJBASE+($-XPJS)+1
  12.    ld a,0
  13.    sub (hl)
  14.    inc hl
  15.    ld e,(hl)
  16.    inc hl
  17.    ld d,(hl)
  18.    ex de,hl
  19.    out (6),a
  20.   pop de
  21.  pop af
  22.  ex (sp),hl
  23.  ret
  24. XPJE:
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement