home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.barnyard.co.uk
/
2015.02.ftp.barnyard.co.uk.tar
/
ftp.barnyard.co.uk
/
cpm
/
walnut-creek-CDROM
/
CPM
/
BDOS
/
DOSPLSOR.ARK
/
Z80.LIB
< prev
Wrap
Text File
|
1986-11-02
|
3KB
|
183 lines
.xlist
.sall
;
; Macros for CCP+, DOS+. Intel mnemnonics, z80 opcodes
; Needed with M80, not necessary with SLRMAC. Allows slight
; source revision to assemble with MAC and RMAC also.
a equ 7
b equ 0
c equ 1
d equ 2
e equ 3
h equ 4
l equ 5
m equ 6
;
pushix macro
db 0ddh,0e5h
endm
popix macro
db 0ddh,0e1h
endm
pushiy macro
db 0fdh,0e5h
endm
popiy macro
db 0fdh,0e1h
endm
inxix macro
db 0ddh,023h
endm
dcxix macro
db 0ddh,02bh
endm
jrc macro where
db 038h
db where-$-1
endm
jr macro where
db 018h
db where-$-1
endm
jrz macro where
db 028h
db where-$-1
endm
jrnc macro where
db 030h
db where-$-1
endm
jrnz macro where
db 020h
db where-$-1
endm
djnz macro where
db 010h
db where-$-1
endm
bit macro num,reg
db 0cbh,040h + num shl 3 + reg
endm
res macro num,reg
db 0cbh,080h + reg + num shl 3
endm
bitx macro num,disp
db 0ddh,0cbh,disp,046h+num shl 3
endm
setx macro num,disp
db 0ddh,0cbh,disp,0c6h+num shl 3
endm
resx macro num,disp
db 0ddh,0cbh,disp,086h+num shl 3
endm
bity macro num,disp
db 0fdh,0cbh,disp,046h+num shl 3
endm
sety macro num,disp
db 0fdh,0cbh,disp,0c6h+num shl 3
endm
resy macro num,disp
db 0fdh,0cbh,disp,086h+num shl 3
endm
ldx macro reg,disp
db 0ddh
mov reg,m
db disp
endm
stx macro reg,disp
db 0ddh
mov m,reg
db disp
endm
ldy macro reg,disp
db 0fdh
mov reg,m
db disp
endm
sty macro reg,disp
db 0fdh
mov m,reg
db disp
endm
andx macro disp
db 0ddh
ana m
db disp
endm
subx macro disp
db 0ddh
sub m
db disp
endm
sbcx macro disp
db 0ddh
sbb m
db disp
endm
cmpx macro disp
db 0ddh
cmp m
db disp
endm
inrx macro disp
db 0ddh
inr m
db disp
endm
xorx macro disp
db 0ddh
xra m
db disp
endm
lbcd macro addr
db 0edh,04bh
dw addr
endm
sbcd macro addr
db 0edh,043h
dw addr
endm
lded macro addr
db 0edh,05bh
dw addr
endm
sded macro addr
db 0edh,053h
dw addr
endm
lspd macro addr
db 0edh,07bh
dw addr
endm
sspd macro addr
db 0edh,073h
dw addr
endm
lixd macro addr
db 0ddh
lhld addr
endm
sixd macro addr
db 0ddh
shld addr
endm
ldir macro
db 0edh,0b0h
endm
ralr macro reg
db 0cbh,010h+reg
endm
rarr macro reg
db 0cbh,018h+reg
endm
slar macro reg
db 0cbh,020h+reg
endm
srlr macro reg
db 0cbh,038h+reg
endm
dsbc macro reg
db 0edh,042h+reg shl 3
endm
.list
⌡■