1985-03-29 21:44:50 +00:00
|
|
|
.define .rck
|
1987-02-02 13:30:20 +00:00
|
|
|
.sect .text
|
|
|
|
.sect .rom
|
|
|
|
.sect .data
|
|
|
|
.sect .bss
|
|
|
|
.sect .text
|
1985-03-29 21:44:50 +00:00
|
|
|
.rck:
|
|
|
|
pop bc
|
|
|
|
pop ix
|
|
|
|
3: pop hl
|
|
|
|
push hl
|
|
|
|
ld e,(ix)
|
|
|
|
ld d,(ix+1)
|
|
|
|
ld a,h
|
|
|
|
xor d ! check sign bit to catch overflow with subtract
|
|
|
|
jp m,1f
|
|
|
|
sbc hl,de
|
|
|
|
jr 2f
|
|
|
|
1: xor d ! now a equals (original) h again
|
|
|
|
2: call m,e.rck
|
|
|
|
pop de
|
|
|
|
push de
|
|
|
|
ld l,(ix+2)
|
|
|
|
ld h,(ix+3)
|
|
|
|
ld a,h
|
|
|
|
xor d ! check sign bit to catch overflow with subtract
|
|
|
|
jp m,1f
|
|
|
|
sbc hl,de
|
|
|
|
jr 2f
|
|
|
|
1: xor d ! now a equals (original) h again
|
|
|
|
2: call m,e.rck
|
|
|
|
push bc
|
|
|
|
pop ix
|
|
|
|
jp (ix)
|
|
|
|
|
|
|
|
|