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:
|
||||
mvi a, 0xc3 ! jmp <a16>
|
||||
sta 0x08
|
||||
sta 0x10
|
||||
lxi h, rst1
|
||||
shld 0x09
|
||||
lxi h, rst2
|
||||
shld 0x11
|
||||
ret
|
||||
|
||||
! de = [bc+const1] (remember bc is the frame pointer)
|
||||
|
@ -30,3 +33,22 @@ rst1:
|
|||
inx h
|
||||
mov d, m
|
||||
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
|
||||
pat lol sfit($1, 8)
|
||||
kills hlreg
|
||||
uses hlreg, dereg
|
||||
uses hlreg, areg, dereg
|
||||
gen
|
||||
rst {const1, 1}
|
||||
data1 {const1, $1}
|
||||
|
@ -462,8 +461,8 @@ with dereg yields de de leaving stl $1
|
|||
|
||||
#ifdef USE_I80_RSTS
|
||||
pat stl sfit($1, 8)
|
||||
with dereg
|
||||
kills hlreg, areg
|
||||
with dereg
|
||||
uses hlreg, areg
|
||||
gen
|
||||
rst {const1, 2}
|
||||
data1 {const1, $1}
|
||||
|
|
Loading…
Reference in a new issue