Somehow the implementation of rst 2 got lost, with hilarious results. Also fix
some register corruption issues (I hope).
This commit is contained in:
parent
22032575c5
commit
a91ab5c599
|
@ -9,8 +9,11 @@
|
||||||
.rst_init:
|
.rst_init:
|
||||||
mvi a, 0xc3 ! jmp <a16>
|
mvi a, 0xc3 ! jmp <a16>
|
||||||
sta 0x08
|
sta 0x08
|
||||||
|
sta 0x10
|
||||||
lxi h, rst1
|
lxi h, rst1
|
||||||
shld 0x09
|
shld 0x09
|
||||||
|
lxi h, rst2
|
||||||
|
shld 0x11
|
||||||
ret
|
ret
|
||||||
|
|
||||||
! de = [bc+const1] (remember bc is the frame pointer)
|
! de = [bc+const1] (remember bc is the frame pointer)
|
||||||
|
@ -30,3 +33,22 @@ rst1:
|
||||||
inx h
|
inx h
|
||||||
mov d, m
|
mov d, m
|
||||||
ret
|
ret
|
||||||
|
|
||||||
|
! [bc+const1] = de (remember bc is the frame pointer)
|
||||||
|
rst2:
|
||||||
|
pop h
|
||||||
|
mov a, m
|
||||||
|
inx h
|
||||||
|
push h
|
||||||
|
|
||||||
|
mov l, a
|
||||||
|
ral
|
||||||
|
sbb a
|
||||||
|
mov h, a
|
||||||
|
|
||||||
|
dad b
|
||||||
|
mov m, e
|
||||||
|
inx h
|
||||||
|
mov m, d
|
||||||
|
ret
|
||||||
|
|
||||||
|
|
|
@ -245,8 +245,7 @@ pat ldc yields {const2,highw($1)}
|
||||||
|
|
||||||
#ifdef USE_I80_RSTS
|
#ifdef USE_I80_RSTS
|
||||||
pat lol sfit($1, 8)
|
pat lol sfit($1, 8)
|
||||||
kills hlreg
|
uses hlreg, areg, dereg
|
||||||
uses hlreg, dereg
|
|
||||||
gen
|
gen
|
||||||
rst {const1, 1}
|
rst {const1, 1}
|
||||||
data1 {const1, $1}
|
data1 {const1, $1}
|
||||||
|
@ -463,7 +462,7 @@ with dereg yields de de leaving stl $1
|
||||||
#ifdef USE_I80_RSTS
|
#ifdef USE_I80_RSTS
|
||||||
pat stl sfit($1, 8)
|
pat stl sfit($1, 8)
|
||||||
with dereg
|
with dereg
|
||||||
kills hlreg, areg
|
uses hlreg, areg
|
||||||
gen
|
gen
|
||||||
rst {const1, 2}
|
rst {const1, 2}
|
||||||
data1 {const1, $1}
|
data1 {const1, $1}
|
||||||
|
|
Loading…
Reference in a new issue