mirror of
https://github.com/hsoft/collapseos.git
synced 2024-12-24 14:38:05 +11:00
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
|
||||
238 OP3ddnn 240 OP3nn
|
||||
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
|
||||
220 LOAD 222 LOAD 223 LOAD 224 LOAD 226 LOAD 228 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,
|
||||
A L LDrr,
|
||||
H ORr,
|
||||
HL 0 LDddnn,
|
||||
IFZ,
|
||||
( false, make 1 )
|
||||
HL INCss,
|
||||
THEN,
|
||||
HL PUSHqq,
|
||||
PUSHZ,
|
||||
;CODE
|
||||
|
||||
CODE +
|
||||
@ -656,9 +651,6 @@ CODE S=
|
||||
DE POPqq,
|
||||
HL POPqq,
|
||||
chkPS,
|
||||
( pre-push false )
|
||||
BC 0 LDddnn,
|
||||
BC PUSHqq,
|
||||
BEGIN, ( loop )
|
||||
LDA(DE),
|
||||
(HL) CPr,
|
||||
@ -668,11 +660,8 @@ CODE S=
|
||||
HL INCss,
|
||||
DE INCss,
|
||||
JRNZ, AGAIN, ( loop )
|
||||
( success, change false to true )
|
||||
HL POPqq,
|
||||
HL INCss,
|
||||
HL PUSHqq,
|
||||
L1 FSET ( end )
|
||||
PUSHZ,
|
||||
;CODE
|
||||
|
||||
CODE CMP
|
||||
@ -703,14 +692,12 @@ CODE _find
|
||||
IFNZ,
|
||||
( not found )
|
||||
HL PUSHqq,
|
||||
DE 0 LDddnn,
|
||||
DE PUSHqq,
|
||||
PUSH0,
|
||||
JPNEXT,
|
||||
THEN,
|
||||
( found )
|
||||
DE PUSHqq,
|
||||
DE 1 LDddnn,
|
||||
DE PUSHqq,
|
||||
PUSH1,
|
||||
;CODE
|
||||
|
||||
CODE (im1)
|
||||
@ -718,15 +705,8 @@ CODE (im1)
|
||||
EI,
|
||||
;CODE
|
||||
|
||||
CODE 0
|
||||
HL 0 LDddnn,
|
||||
HL PUSHqq,
|
||||
;CODE
|
||||
|
||||
CODE 1
|
||||
HL 1 LDddnn,
|
||||
HL PUSHqq,
|
||||
;CODE
|
||||
CODE 0 PUSH0, ;CODE
|
||||
CODE 1 PUSH1, ;CODE
|
||||
|
||||
CODE -1
|
||||
HL -1 LDddnn,
|
||||
|
Loading…
Reference in New Issue
Block a user