ld (U_DATA__U_CALLNO),a
ld (U_DATA__U_ARGN),bc
ld (U_DATA__U_ARGN1),de
- ld (U_DATA__U_ARGN2),hl
- ld (U_DATA__U_ARGN3),ix
+ ld (U_DATA__U_ARGN2),ix
+ ld (U_DATA__U_ARGN3),hl
; Stack the alternate registers
exx
push bc
exx
; Return page for caller (may not be the page we can in on if we
; swapped
- ld a,(U_DATA__U_PAGE2)
+ ld a,(U_DATA__U_PAGE+1)
ret
signal_path:
ld h,a ; save signal number
ld a, (U_DATA__U_INSYS)
or a
jr nz, interrupt_kernel
+ call map_user_low
intsig:
ld a,(U_DATA__U_CURSIG)
or a
no_sig:
xor a
ld e,a
- ld a,(U_DATA__U_PAGE2)
+ ld a,(U_DATA__U_PAGE+1)
intret:
+ ex af,af'
exx
pop iy
pop ix
ld a,(U_DATA__U_PAGE)
jr z, ugetcl
ld a,(U_DATA__U_PAGE + 1)
+ res 7,h
ugetcl:
call map_page_low
ld l,(hl)
push bc
bit 7,h
jr z, ugetwl
+ ; High page - no wrap possible
ld a,(U_DATA__U_PAGE + 1)
call map_page_low
res 7,h
ld a,(hl)
inc hl
normal_wl:
+ ; Get the high byte
ld h,(hl)
ld l,a
jp map_kernel_low
ugetwl:
+ ; Low page - we might be fetching 7FFF/8000
ld a,(U_DATA__U_PAGE)
call map_page_low
ld a,(hl)
inc hl
bit 7,h
- jr z, normal_wl
+ jr z, normal_wl ; No split
+ ; We fetched 7FFF/8000
ld l,a
+ ld a,(U_DATA__U_PAGE + 1)
+ call map_page_low
ld a,(0) ; Split can only mean one address
ld h,a
- ld a,(U_DATA__U_PAGE + 1)
jp map_kernel_low
__uputc:
ld a,(U_DATA__U_PAGE)
jr z, uputcl
ld a,(U_DATA__U_PAGE + 1)
+ res 7,h
uputcl:
call map_page_low
ld (hl),e
bit 7,h
jr z, normal_pwl
ld a,(U_DATA__U_PAGE + 1)
+ call map_page_low
ld a,d
ld (0),a ; Split can only mean one address
jp map_kernel_low