z80a: add PUSH0, PUSH1, PUSHZ, macros
This commit is contained in:
parent
7464c67c80
commit
338769a0a8
2
blk/200
2
blk/200
@ -10,4 +10,4 @@ Z80 Assembler
|
|||||||
234 OP2r 236 OP2ss
|
234 OP2r 236 OP2ss
|
||||||
238 OP3ddnn 240 OP3nn
|
238 OP3ddnn 240 OP3nn
|
||||||
242 Specials 246 Flow
|
242 Specials 246 Flow
|
||||||
|
249 Macros
|
||||||
|
2
blk/212
2
blk/212
@ -5,4 +5,4 @@ H@ 0x59 RAM+ !
|
|||||||
213 LOAD 215 LOAD 216 LOAD 217 LOAD 218 LOAD 219 LOAD
|
213 LOAD 215 LOAD 216 LOAD 217 LOAD 218 LOAD 219 LOAD
|
||||||
220 LOAD 222 LOAD 223 LOAD 224 LOAD 226 LOAD 228 LOAD
|
220 LOAD 222 LOAD 223 LOAD 224 LOAD 226 LOAD 228 LOAD
|
||||||
230 LOAD 232 LOAD 234 LOAD 236 LOAD 238 LOAD 240 LOAD
|
230 LOAD 232 LOAD 234 LOAD 236 LOAD 238 LOAD 240 LOAD
|
||||||
242 LOAD 243 LOAD 244 LOAD 246 LOAD 247 LOAD
|
242 LOAD 243 LOAD 246 LOAD 247 LOAD 249 LOAD
|
||||||
|
6
blk/249
Normal file
6
blk/249
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
( Macros )
|
||||||
|
( clear carry + SBC )
|
||||||
|
: SUBHLss, A ORr, SBCHLss, ;
|
||||||
|
: PUSH0, BC 0 LDddnn, BC PUSHqq, ;
|
||||||
|
: PUSH1, BC 1 LDddnn, BC PUSHqq, ;
|
||||||
|
: PUSHZ, BC 0 LDddnn, IFZ, BC INCss, THEN, BC PUSHqq, ;
|
Binary file not shown.
@ -489,12 +489,7 @@ CODE NOT
|
|||||||
chkPS,
|
chkPS,
|
||||||
A L LDrr,
|
A L LDrr,
|
||||||
H ORr,
|
H ORr,
|
||||||
HL 0 LDddnn,
|
PUSHZ,
|
||||||
IFZ,
|
|
||||||
( false, make 1 )
|
|
||||||
HL INCss,
|
|
||||||
THEN,
|
|
||||||
HL PUSHqq,
|
|
||||||
;CODE
|
;CODE
|
||||||
|
|
||||||
CODE +
|
CODE +
|
||||||
@ -656,9 +651,6 @@ CODE S=
|
|||||||
DE POPqq,
|
DE POPqq,
|
||||||
HL POPqq,
|
HL POPqq,
|
||||||
chkPS,
|
chkPS,
|
||||||
( pre-push false )
|
|
||||||
BC 0 LDddnn,
|
|
||||||
BC PUSHqq,
|
|
||||||
BEGIN, ( loop )
|
BEGIN, ( loop )
|
||||||
LDA(DE),
|
LDA(DE),
|
||||||
(HL) CPr,
|
(HL) CPr,
|
||||||
@ -668,11 +660,8 @@ CODE S=
|
|||||||
HL INCss,
|
HL INCss,
|
||||||
DE INCss,
|
DE INCss,
|
||||||
JRNZ, AGAIN, ( loop )
|
JRNZ, AGAIN, ( loop )
|
||||||
( success, change false to true )
|
|
||||||
HL POPqq,
|
|
||||||
HL INCss,
|
|
||||||
HL PUSHqq,
|
|
||||||
L1 FSET ( end )
|
L1 FSET ( end )
|
||||||
|
PUSHZ,
|
||||||
;CODE
|
;CODE
|
||||||
|
|
||||||
CODE CMP
|
CODE CMP
|
||||||
@ -703,14 +692,12 @@ CODE _find
|
|||||||
IFNZ,
|
IFNZ,
|
||||||
( not found )
|
( not found )
|
||||||
HL PUSHqq,
|
HL PUSHqq,
|
||||||
DE 0 LDddnn,
|
PUSH0,
|
||||||
DE PUSHqq,
|
|
||||||
JPNEXT,
|
JPNEXT,
|
||||||
THEN,
|
THEN,
|
||||||
( found )
|
( found )
|
||||||
DE PUSHqq,
|
DE PUSHqq,
|
||||||
DE 1 LDddnn,
|
PUSH1,
|
||||||
DE PUSHqq,
|
|
||||||
;CODE
|
;CODE
|
||||||
|
|
||||||
CODE (im1)
|
CODE (im1)
|
||||||
@ -718,15 +705,8 @@ CODE (im1)
|
|||||||
EI,
|
EI,
|
||||||
;CODE
|
;CODE
|
||||||
|
|
||||||
CODE 0
|
CODE 0 PUSH0, ;CODE
|
||||||
HL 0 LDddnn,
|
CODE 1 PUSH1, ;CODE
|
||||||
HL PUSHqq,
|
|
||||||
;CODE
|
|
||||||
|
|
||||||
CODE 1
|
|
||||||
HL 1 LDddnn,
|
|
||||||
HL PUSHqq,
|
|
||||||
;CODE
|
|
||||||
|
|
||||||
CODE -1
|
CODE -1
|
||||||
HL -1 LDddnn,
|
HL -1 LDddnn,
|
||||||
|
Loading…
Reference in New Issue
Block a user