home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Oakland CPM Archive
/
oakcpm.iso
/
cpm
/
debug
/
ddtz27.ark
/
XTDOPS.MAC
< prev
next >
Wrap
Text File
|
1988-05-29
|
2KB
|
103 lines
; Demo. file of undocumented Z80 opcodes. (numerical order)
; These allow use of xh,xl,yh,yl as byte registers.
;
; nlist/list for SLRMAC, .xlist/.list for M80
nlist
include XTDOPS.LIB
list
;
nn equ 20h; a value
n equ 05h; displacement
inrx h; xh := xh+1
dcrx h; xh := xh-1
mvix h,nn; xh := nn
inrx l; xl := xl+1
dcrx l; xl := xl-1
mvix l,nn; xl := nn
movx b,h; b := xh
movx b,l; b := xl
movx c,h; c := xh
movx c,l; c := xl
movx d,h; d := xh
movx d,l; d := xl
movx e,h; e := xh
movx e,l; e := xl
movx h,b; xh := b
movx h,c; xh := c
movx h,d; xh := d
movx h,e; xh := e
movx h,a; xh := a
movx l,b; xl := b
movx l,c; xl := c
movx l,d; xl := d
movx l,e; xl := e
movx l,a;; xl := a
movx a,h; a := xh
movx a,l; a := xl
adxr h; a := a + xh
adxr l; a := a + xl
acxr h; a := a + xh + cy
acxr l; a := a + xl + cy
suxr h; a := a - xh
suxr l; a := a - xl
sbxr h; a := a - xh - cy
sbxr l; a := a - xl - cy
ndxr h; a := a AND xh
ndxr l; a := a AND xl
xrxr h; a := a XOR xh
xrxr l; a := a XOR xl
orxr h; a := a OR xh
orxr l; a := a OR xl
cpxr h; flags on a-xh
cpxr l; flags on a-xl
;
; equivalent set for y
inry h; yh := yh+1
dcry h; yh := yh-1
mviy h,nn; yh := nn
inry l; yl := yl+1
dcry l; yl := yl-1
mviy l,nn; yl := nn
movy b,h; b := yh
movy b,l; b := yl
movy c,h; c := yh
movy c,l; c := yl
movy d,h; d := yh
movy d,l; d := yl
movy e,h; e := yh
movy e,l; e := yl
movy h,b; yh := b
movy h,c; yh := c
movy h,d; yh := d
movy h,e; yh := e
movy h,a; yh := a
movy l,b; yl := b
movy l,c; yl := c
movy l,d; yl := d
movy l,e; yl := e
movy l,a;; yl := a
movy a,h; a := yh
movy a,l; a := yl
adyr h; a := a + yh
adyr l; a := a + yl
acyr h; a := a + yh + cy
acyr l; a := a + yl + cy
suyr h; a := a - yh
suyr l; a := a - yl
sbyr h; a := a - yh - cy
sbyr l; a := a - yl - cy
ndyr h; a := a AND yh
ndyr l; a := a AND yl
xryr h; a := a XOR yh
xryr l; a := a XOR yl
oryr h; a := a OR yh
oryr l; a := a OR yl
cpyr h; flags on a-yh
cpyr l; flags on a-yl
; Check that overloaded mvix/mviy still create original code
mvix n,nn; [x+n] := nn; (now overloaded)
mviy n,nn; [y+n] := nn; (now overloaded)
end
ëⁿ