home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Oakland CPM Archive
/
oakcpm.iso
/
cpm
/
debug
/
ddtz27.ark
/
XTDOPS.LIB
< prev
next >
Wrap
Text File
|
1988-05-29
|
2KB
|
147 lines
;
; Macros for the undocumented Z80 opcode set, names kept to 4 char
; for compatibility with various assemblers, especially DDTZ
; All references to h,l refer to xh,xl (or yh,yl), portions of X reg.
; References to a,b,c,d,e registers are normal
; EXCEPTION:
; mvix op1, value refers to xh,xl if op1 is h,l
; to [x+op1] for other op1
; (and similarly for mviy)
;
; For example, "adxr b" will be effectively "add b", BUT
; "adxr h" will create "add xh"
;
; An operand should be either h or l, else these are pointless.
;
inrx macro r
db 0ddh
inr r
endm
dcrx macro r
db 0ddh
dcr r
endm
adxr macro r
db 0ddh
add r
endm
acxr macro r
db 0ddh
adc r
endm
suxr macro r
db 0ddh
sub r
endm
sbxr macro r
db 0ddh
sbb r
endm
ndxr macro r
db 0ddh
ana r
endm
orxr macro r
db 0ddh
ora r
endm
xrxr macro r
db 0ddh
xra r
endm
cpxr macro r
db 0ddh
cmp r
endm
movx macro r1,r2
db 0ddh
mov r1,r2
endm
mvix macro r,n
db 0ddh
ifidn <r>,<h>
mvi h,n
else
ifidn <r>,<H>
mvi h,n
else
ifidn <r>,<l>
mvi l,n
else
ifidn <r>,<L>
mvi l,n
else
mvi m,r;; displacement here
db n
endif
endif
endif
endif
endm
inry macro r
db 0fdh
inr r
endm
dcry macro r
db 0fdh
dcr r
endm
adyr macro r
db 0fdh
add r
endm
acyr macro r
db 0fdh
adc r
endm
suyr macro r
db 0fdh
sub r
endm
sbyr macro r
db 0fdh
sbb r
endm
ndyr macro r
db 0fdh
ana r
endm
oryr macro r
db 0fdh
ora r
endm
xryr macro r
db 0fdh
xra r
endm
cpyr macro r
db 0fdh
cmp r
endm
movy macro r1,r2
db 0fdh
mov r1,r2
endm
mviy macro r,n
db 0fdh
ifidn <r>,<h>
mvi h,n
else
ifidn <r>,<H>
mvi h,n
else
ifidn <r>,<l>
mvi l,n
else
ifidn <r>,<L>
mvi l,n
else
mvi m,r;; displacement here
db n
endif
endif
endif
endif
endm
f