rst 1 now takes an eight-bit parameter, not a 16 bit one. Reduces Star Trek

again from 43205 to 42339 bytes.
This commit is contained in:
David Given 2019-02-07 08:45:20 +01:00
parent 5ac280026e
commit 9d8ea79c7f
2 changed files with 21 additions and 18 deletions

View file

@ -13,15 +13,18 @@
shld 0x09
ret
! de = [bc+const2] (remember bc is the frame pointer)
! de = [bc+const1] (remember bc is the frame pointer)
rst1:
pop h
mov e, m
inx h
mov d, m
mov a, m
inx h
push h
xchg ! hl = offset
mov l, a
ral
sbb a
mov h, a
dad b
mov e, m
inx h

View file

@ -131,7 +131,7 @@ INSTRUCTIONS
/* rpe cost(1, 8). */
/* rpo cost(1, 8). */
rrc kills a:cc cost(1, 4).
rst const1:ro kills a:cc cost(1,11).
rst const1:ro cost(1,11).
/* rz cost(1, 8). */
sbb reg1:ro kills a:cc cost(1, 4).
/* sbi const1:ro kills a:cc cost(2, 7). */
@ -244,14 +244,15 @@ pat ldc yields {const2,highw($1)}
{const2,loww($1)}
#ifdef USE_I80_RSTS
pat lol
pat lol sfit($1, 8)
kills hlreg
uses hlreg, dereg
gen
rst {const1, 1}
data2 {const2, $1}
data1 {const1, $1}
yields de
#else
#endif
pat lol
uses hlreg={const2, $1}, dereg
gen
@ -260,7 +261,6 @@ pat ldc yields {const2,highw($1)}
inx hl
mov d,{m}
yields de
#endif
pat loe
uses hlreg