org &8000       ;Can be anywhere
limit &ffff

;This is a copy of the code found at &b982 ie - the place RST 1's (as used by
;the firmware) jump to.It can be used when the normal jumpblock,RST 1,and
;&b982 areas are out of action.
;To use - 1) Set up this code
;         2) Create your own jumpblock , a copy of the firmware jumps you
;            want to use 
;         3) You can now use the new jumpblock just like the normal one.
;
;NB - you must be able to use addresses 8,9 and 10.
;

.beenine
di
exx
pop hl
ld e,(hl)
inc hl
ld d,(hl)
ex af,af'
ld a,d
res 7,d
res 6,d
rlca
rlca
rlca
rlca
xor c
and &c
xor c
push bc
call one
di
exx
ex af,af'
ld a,c
pop bc
and 3
res 1,c
res 0,c
or c
jr two
.one
push de
.two
ld c,a
out (c),c
or a
ex af,af'
exx
ei
ret

org 8           ;This must be kept the same
jp beenine

