Use pop rather than inx;inx to retract the stack; consumes a register but
halves the number of calls. Reduces Star Trek from 39976 to 39771 bytes.
This commit is contained in:
parent
b34ff2bdec
commit
35d1f36ca4
|
@ -2053,46 +2053,29 @@ gen 1:
|
|||
/* Group 15: Miscellaneous */
|
||||
/******************************************/
|
||||
|
||||
pat asp $1<=0-6
|
||||
with STACK
|
||||
uses hlreg={const2,$1}
|
||||
gen dad sp
|
||||
pat asp ($1<=0-12) || ($1>=12)
|
||||
with STACK
|
||||
uses hlreg={const2,$1}
|
||||
gen
|
||||
dad sp
|
||||
sphl.
|
||||
|
||||
pat asp $1==0-4
|
||||
with STACK
|
||||
gen dcx sp
|
||||
dcx sp
|
||||
dcx sp
|
||||
dcx sp
|
||||
|
||||
pat asp $1==0-2
|
||||
with STACK
|
||||
gen dcx sp
|
||||
dcx sp
|
||||
pat asp ($1<0) && ($1>0-12)
|
||||
with STACK
|
||||
gen
|
||||
push hl
|
||||
leaving
|
||||
asp $1+2
|
||||
|
||||
pat asp $1==0 /* do nothing */
|
||||
|
||||
pat asp $1==2
|
||||
with exact src1or2
|
||||
with STACK
|
||||
gen inx sp
|
||||
inx sp
|
||||
|
||||
pat asp $1==4
|
||||
with exact src1or2 leaving asp 2
|
||||
with STACK
|
||||
gen inx sp
|
||||
inx sp
|
||||
inx sp
|
||||
inx sp
|
||||
|
||||
pat asp $1>=6
|
||||
with exact src1or2 leaving asp $1-2
|
||||
with STACK
|
||||
uses hlreg={const2,$1}
|
||||
gen dad sp
|
||||
sphl.
|
||||
pat asp ($1>0) && ($1<12)
|
||||
with STACK
|
||||
uses hlreg
|
||||
gen
|
||||
pop hl
|
||||
leaving
|
||||
asp $1-2
|
||||
|
||||
pat ass $1==2
|
||||
with hlreg STACK
|
||||
|
|
Loading…
Reference in a new issue