Robert Doolittle or by any means without prior written permission of

advertisement
LANGUAGE
ASSEMBLY
i!k)z
z7y)i
rrrvr
TRANSLATORS
tixji --
USER'S
Z-System Tools
GUIDE
by
Robert
ITOZ,
TZOI,
SOFTWARE.
ITOT
Doolittle
and TTOI are Copyright
1982,
1985 by
of this document may be reproduced in any
RD
part
or by any means without prior written permission of publisher.
Address requests to Echelon,
Inc., 101 First Street, Los Altos,
CA
94022.
No
way
TABLE'
OF
CONTENTS
Paqe
Author's
P'ote
and
ZTOI
...
................................... ii
USER'S
GUIDE
. .
COMMAX"D
FORMAT
LINE
. . . . . . .
INPUT
FILE FORMAT RULES
EXECUTION
. . . . . . . . . . . . . . . . .
ADNAME . . . . . . . . . . . . . . . . . .
.
.
8080
EXTEXDED
VERSUS ZILOG
ITOZ
1
.. . .. .. ..
user's guide
LINE
com1A.\'D
FORMAT . . .
IR'PLJT FILE FORMAT RULES
EXECUTION
. . . . . . . . . . . . .
ADNAP1F
EXTENDED
. .
.
..
. . .
.. .. ..
. . . . . . . . . . . . . . . . . . . . . . . .
. . .
..
. .
. . . . . . . .
..
.
. . . . . .
.. .. ..
.
.
. . . . . . . . . . . . . . . . . . . . . . . .
Z-80
MNEMOYIC
. . . . . . . . .
. . . . . . . . .
. .
..
TABLE
.
7
. . . . . . . . . . . . .
.
..
. . .
VERSUS
.
.. .. .. ..
. . . . . . . . . . . . . . . . . . . . . . . . . . .
TDL/CDL
-L -
MNEMONIC
TABLE
. .
L)
.. ..
. . . . . . . . . . . . . . . .
.. .. .. ..
5
. . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
8080
2
3
.. ..
rrcvr and trrrn
. . . .
.. ..
.
9
10
11
13
14
15
Author's
Note
These
tested
programs have been thoroughly
arid are belíeved
be
you
to
We
soE: ething
not t.o your
1ikiñ9
us know.
welcorne
comments,
criticjs!Tls
your
or questPlease
ons,
you experience
or m"ite
arre probien"is.
correct.
let
i
call
If
find
if
Doolittle
Robert
Echelon
Team Member
1290 Mouu1Tíertt Street
213/454-8270
Telephone
Pacific Palisades, CA 90272
—1
I-
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
ITÍ)Z and
*
*
*
*
*
*
USER'S
ZTOI
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
GUIDE
:k
*
*
*
1982,
Copyright
*
*
*
*
*
*
*
*
*
*
*
*
*
*
1985
*
*
by
*
*
RD SOFTWARE
*
*
*
*
*
*
*
*
*
*
*
*
*
These programs translate assembly source code from Intel
extended
8080 tQ Ztlog Z-80 mnemonics
(ITOZ) and x: ice versa
The output(ZTQI).
is wri-tten to disk and i 5
source
and
The
extended 8080
ccmµletely
formatted
ready for assembly.
set is that defined by Digital Research in their macro library
MAC.
Z8U.LIB furnished wit.h their macro assembler
Please not-e
8080
subset- of the Z-80
that
your source programs use only the
inst- ructions then you need not be concerned
with the Z80.LIB
extensions.
The use of ITOZ
and ZTOI are nearly identical.
Therefore
in
whatfcAlows we shall just refer to ITOZ with the understanding
that it also applies to ZTOI except where noted.
file
if
Page
I
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
K)RMAT
comAND LINE
*
*
*
*
*
*
*
jk
*
*
*
jAe
*
*
*
*
*
*
*
*
*
execute ITOZ for translation
of an 8080 source program
to Zilog Z-80 mnemonícs the Z-System (and CP/M) command Ji-ne
format is:
To
A
'ITOZ
if j lenamel f ijetype]
where the parameters
[
,'0]
in square bracket
s
are
source
source
as described
f íle
if ilename=input
of ilename=output
/O=options
[ofijename
]
[filetype]
optional
.
name
e name
f iibelow
t".wo switch
maintain
assemblers
some
compatibility w.ith
( .l')
The slash
must immediately
follow the
are available.
used.
Oríjy
slash
name
one
filetype
is
or
necessary
file
for either or both options.
The "c" option will add a colon after a label
one does
used
The "s" option will convert asterisks,
not already exist.
line delimiters, to semicolons i-n the output file. To
as comrnent
invoke both options,
for example, the format would be:
To
options
input
if
if
,/c's
or
,/sc
translat-ing a file
public label do not use
An optional
output- file name
command
line. If this optional name
out-putfile name for ITOZ is ZLG.ASM
If youa
represent
CP
'"M
i5
trademark
Page
2
a
are
regí stered
of Echelon.
trademark
that- uses a double
the "c" swit-c:h.
colon
t-o
is also permit-ted on the
is omitted then the default
and
for ZTOI is X80.ASN.
of Digi-tal Research;
Z-Syster.i
is
a
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
:k
*
*
*
*
*
*
*
*
*
*
*
:k
*
*
*
*
*
*
*
*
*
*
*
FORMAT
FILE
INPUT
*
*
*
*
*
*
*
*
*
*
RULES
*
*
*
*
*
*
*
*
*
*
*
*
Certain
input source f lle format- rules must be followed
Many
successful
a
of these are dictated
translation.
obtain
The
assembler
common
syntax rules.
rules are as follows:
1. Only one
All instructions must
3.
Each
and
4.
No
be
in upper case
in
line must terminate
line feed
line numbers are permitted
3. Lines must be less
comments
i.ncluding
than
128
a
carriage returri
in this version
characters
6.
All labels must start in column
7
The
by
8
.
mnemonic
at
There
end
or
least
one
instruct ion
space or tab
one
be
f ieldno must
label
if
12
.
be at
least one space or tab between the
label and the beginning of t.he instrtlct-j.c)r)
the label ends in a colon
of
EQTJ
and
arr,"
colurnri
Comment
asterisk
.
pseudo-op
SET
Comments
lines
and
Blank
lines,
supported .
be
must
may
statements
may
begin
beg
in in
begin
as
preceded by a semicolori
in any colunrí
or
following instructions on the same line
with a semicolon or asterisk arid
by at least one space or tab only
must also begin
must- be preceded
the asterisk
if
preceded
is present.
a
10. Other pseudo-ops or macro names must
defined fur instructions in Rule 7
li
long
must:
unless
9.
by
instruction per line is permitted
2.
.
to
as
i-s
used
well as blank lines following
a
label,
·
a
Page
re
3
to the variety of ass3errlbler pseudo-ops sorne compromises
made.
There is a logical problem
wit-h pseudo-ops
to
starting with an asterisk and comment lines delimited by an
This is solved in these translators by the following
asterisk.
additional rule:
Due
had
be
pseudo-ops are used which start with an asterisk
The
then a label must be used on the same line.
label
be
dummy
of course, may
a
Id addition, actual comment
.
lines following a label must be delirni-t.ed by a
If
13.
"-
sem-zcol
%
Page
4
on
.
,
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
X
*
*
*
*
*
*
*
*
*
EXECUTION
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
gt
*
*
*
*
*
*
When
on
begins ITOZ will prirít a message
program execution
an
the terminal indicating that the t ranslation is uríderway.
encourit.ered
message
unrecognizable
a
syntax
inst ruction is
error
is displayed at the console ale-mg with a line number indicator.
This line is also flagged in the output file by the comment line
If
"FOLLOWING
INSTRUCTION
attempt
translate this line but simply
to
NOT
RECOGNIZED."
translator makes no
copies
it to the cmtput
The
file. s t- o
a re
f t h e common pseudo-ops
a
voLt
get
tables.
translator's
intrrríal
If
pseudo-op
which
i
narne
imc-luded
in t.he
syñtcíx
4
error for a
:
rí
i-nput
or macro
source f .lle
appears
your
ADNAME.COM
bt")ow.
described
you should then run the
as
As not ed
preverit- future occurrences of thi-s error.
This w
below, this
does not translate or, more accurat-ely, .itresults in a one-to-oríe trarislatiorí (exact copy) of ent-ire I .i-nt".
that involve ar. index register
In all CPU instructions
disp!arement-,
the translators will interpret- the explicit lack of
a di-sµ1acernent argument
to imply the value-" O.
yj c)
utility,
ill
utility
0
Page
5
*
*
"
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
:k
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
ADNAME.COM
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
This utility permits
the user to add cust-om
macro names or
pseudo-ops to the translator's internal tabj es.
will operat.e
ITOZ.COM
ZTOI.CO31.
either
on
operate on either
will alsoPlease
or
note that no
of t-hese files
they have been renamed.
translatiurí occurs for these names. The use of ADNAME permits
the translators
to recognize these names and to copy the line
if
from
It
It
t-o t-he output
generating aíi
file
file without
experience
wit.h assembly of a
difficulty
error message. If you be
translated file it may
necessary to edit the translated fije
the
particular pseudo-ops used by your assembler.
to correct for
The
the input
coinmand
line format
for
A.'ADNANIF
ADNAME
is:
f i i ename
.
COM
ilenarne'
where
is ITOZ, ZTOI, or whater"er ycm may harí·
reríamed them. The program will then prompt you for the ríew names
to he entered. Each entry is terminated by a carriage return. A
blank line (CR) terminates the program. The old
is renamed
and with a fi.letype of BAK.
The new
wit: h the sanie filename
file
is renamed with the same filename and with a filetype of COM.
The new COM
new names.
you wish you may
file will Weinclude your recommend,
BAK
the
however,
strongly
that you
erase
file.
keep a backup copy cif the original files.
a l ways
The
space allocated in the translators for this function is
N
2()0 bytes.
is the number of new names and C is the': total
nunber of characters
in the new names t.hen 2*N"C must: be = 200.
Atternr't: s t-o exceed this number will not be accepted and a warning
message will be issued.
ADNAYF.
may be used on the currerit COM
as often as you
new names will be added to those
Any
already included
please.
and a ríew COM
file and new BAK file will be created.
'f
file
If
If
file
Page
6
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
8080
EXTENDED
*
*
*
*
*
*
*
*
VERSUS
*
*
*
*
*
*
*
*
*
*
Z-80
ZIIÁJG
*
*
*
*
*
*
*
*
*
MNEMONIC
*
*
*
*
*
*
*
*
*
*
*
*
*
*
TABLE
*
*
*
*
*
*
*
*
translat-ors use an extended 8080 mnemonic set which is
to the Technical Design Laboratories (TDL) mnemonics.
similar
The Z-80 peculiar
Trít-ei
8080 mnemonics
Al!
are preserved.
ZILOG
from
mnemonics
the
as shown in the
inst"ruc't ions dNífer
accompanyi-ng
mnemonic
set
table.
This
is identi.cal t-o thatby
Research
Z80.I.IB
released
as
to be usedi_onswith their
Digital
"MAC"
The
cp,"yj
Macro Assembler.
followiríg corívent
are used
the
table.
irí
These
- any register or memory stack
rr - any register pair or (O to pointer
255)
nn - 8 bit immediate data
d
8 bN: signed displacement(-128
to 127)
- 16
(O
immediate
address
data
nnnn
or
to 6553!!Á
bit
b
number
(O
7,
most
is
5ignificar)t)
to
- bit
addr - 16 bit address within PC+127 through PC-128
r
7
In cases involving a displacement.,
last one iri operand field.
EXT
8080
ZILOG
LD\"
LDY
STX
STY
r ,d
LD
M\'IX
P1\'IY
LDAI
LIJAR
STAT
r ,d
r ,d
r ,d
nn
rín
I,T)
,d
,d
star
LXIX
LXIY
LBCD
LDED
LSPD
nnnn
nnnn
nnnn
nnnn
nnnn
nnnn
LIXD
LIYD nnnn
SBCD nnnn
SDED nnnn
SSPD nnnn
SIXD
nnnn
SIYD
nnnri
SPIX
SPIY
PCSHIX
PUSHIY
LD
LD
LD
LD
LD
LD
LD
ld
LD
LD
LD
LD
LD
LD
LD
LD
LD
LD
LD
LD
LD
LD
r,(lX"d)
í-,(IY+dl
UX"d),r
(Iv-d) ,r
(Ix"d) ,nn
(1Y"d) ,nn
A, T
A ,R
,A
I
rIX,a
,nnnn
IV ,nnnri
BC, ( nnnn)
DE, (nnnn)
SF', (nnnn)
IX, (rinnn)
IY, (nnnn)
(nnnn ) ,BC
(nnnn ) ,DE
(nnnn) ,SP
(nnnn) ,IX
(nnnrí) , IV
SP,IX
SP,IY
push IX
PUSH IY
d,
t-his parameter
EXT
8080
LDIR
LDD
LDDR
CCI
CCIR
CCD
CCDR
ADDX d
ADDY d
adcx d
ADCY d
SUBX d
SIJBY d
SBBX d
SBBY d
ANAX d
ANAY d
XRAX d
XRAY d
ORAX d
ORAY d
CMPX d
CP1PY
d
INRX d
INRY d
DCRX d
is always
ZILCG
LDIR
LDIJ
LDDH
CPI
CPIR
CPI)
CPDR
ADD
ADD
adc
ADC
SUB
SUB
SBC
SBC
AND
AND
XOR
XOR
OR
OR
CP
CP
INC
INC
DEC
(Ix+d)
(IYTd)
ax-a
(1Y"d)
(IX-d)
(Í9'+d)
(IX+CÍ)
(j"Y"+d)
(lX+d)
(1Y"d)
(Ix±d)
(1Y+d)
(IX"CÍ)
(1Y+d)
(IX+dl
(1Y+d)
(IX+dl
(Tjí-d)
UX+-D
Page
Í7
POPIX
POPIY
EXAF
EXX
XTTX
XTIY
POP IX
POP IV
EX AF ,AF'
EXX
EX (SP) ,IX
EX (SI?) ,IY
LDT
ADD
ADD IY,
INC IX
INC TY
DEC IX
DEC IY
LDI
DADX
DADY
rr
rr
INXI-Y
DCXIX
DCXIY
BIT b, r
SET b,
r
RES b,
r
BIT b,(lX+d)
BIT b,(IY+D
SET b,(1x+d)
set b,(IY+¿j)
RES b,(1k"-d)
RES b, lIY"d)
JR addr
JR C ,addr
JR INC ,addr
JR Z ,addr
JR !"Z ,addr
DJNZ , addr
JP (IX)
JP (lV)
BIT b, r
SETB b, r
RES b,
r
BITX
b,d
b
BITY
SETX
A
b,d
b, d
RESX b,d
RFSY b, d
JR addr
JRC addr
JRNC addr
JR7, addr
JR?'Z addr
DJNZ addr
pcí X"
sety
PCIY
RE'TI
RETK
II'I?
OL'TP
INI
r
RRCY
RARR
RARX
RARY
SLAR
SLAX
SLAY
SRAR
SRAX
SRAY
SRLR
SRLX
SRLY
RLD
RRD
r, (C)
(C),r
r
*
8
rrcr
RRCX
RETI
RETN
IN
OUT
INT
I.ClEé
INIF'.
Page
IM1
IM2
DADC
DSBC
OIJTI
OUTIR
IND
INDR
OUTD
OUTDR
RLCR
RLCX
RLCY
RALR
RALX
RALY
IX,rr
rr
INXIX
DCRY
NEG
IMÚ
*
*
*
*
*
:k
*
*
*
*
*
*
*
*
*
*
*
*
*
d
(1Y"d)
DEC
NEG
IN
IM
Ó
l
IM 2
ADC FIL,
SBC FIL,
OUTI
OTIR
IND
INDR
OL'TD
OTDR
RLC
RLC (IX-uji)
RLC (IY+CÍ)
rr
rr
rr
rr
r
r
d
d
rl
r
r(JX-¢J)
d
d
RL
RL
r
rrc r
RRC
(IX-ól)
d
d
RRC
RR
RR
r
d
d
(jYm¿j)
r
(Ix-d)
(1Y+¿j)
RR
SLA
SLA
SLA
SRA
SRA
SRA
SRL
SRL
SRL
RLD
RRD
r
d
d
r
d
d
r
d
d
*
(IY"Á)
*
*
*
*
*
r
(Tx+d)
(Iv-d)
r
(IX"d)
(IY+d)
r(IX+CÍ)
(1Y"d)
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
:k
Copyright
*
*
*
*
*
*
*
*
*
*
USER'S
and TK)I
IIYJT
*
1982,
1985
*
*
*
*
*
by
*
*
GUIDE
RD SOFTWARE
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
These programs translate assembly
source code from Int.el
extended 8080 to TDL,"CDL (Xitan)
mnemonics (ITOT) and vice versa
The output source
(TTÜI).
is written to disk and i- s
The
formatted
completely
and ready for assembly.
extended 8080
Research
by
in their macro library
set is that defined
Digital
MAC.
Z80.LIB furnished with their macro assembler
Please note
8080
subset
only
the
that
of the Z-80
your source programs use
then
need
be
concerned
not
inst-ructions
with the Z80.LI13
you
ext.ensions .
The
Therefore
in
use of ITOT and TTOI are nearly identical.
what follows we shall just refer to ITOT with the understanding
also applies to TTOI except where noted.
that
file
if
it
Page
9
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
9:
*
*
*
COMMAND
*
*
*
To
TDL/'CDL
*
*
*
*
*
*
*
*
*
*
*
*
*
execute ITOT for translation
mnemonics the Z-System (and
ITOT
A
where
*
t.he
if ilename!
parameters
FORMAT
LINE
filetypel
*
for
an
Page
.END
10
name
*
*
*
*
*
*
*
*
source program
line format
t-o
is:
source
default-s
insert
will automaticallyassembler
since the TDL/CDL
arr opt.ional
file
f íle
to
.
name
name
X80.ASY
for
TTOT
arid
t-cj
colons after labels,
rint
requires
them.
also
will
t-o semic: olons
any asterisks, used as commerít delimiters,
ITOT
Furthermore,
wi II automatica l l y supp} y
same
reason.
required.
statement
ITOT
present,
ccmvert
for the
file
output
TTOT
*
lofi leriame] Ifiletype)
ifilename=input source
The c-)l")tiona]
TDL.ASM
*
of an 8080
CP "M) command
in square brackets
of ílename=output
*
:
if
It
if
*
*
*
*
*
*
*
*
*
*
*
*
IK
*
*
*
*
*
INPUT
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
FORMAT
FILE
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
RULES
*
*
*
Cert-ain input source f lie format rules must be followed
Many
of these are dictated
obtain a successful translation.
The
assembler syntax rules.
common
rules are as follows:
2.
All instructions must
3.
Each
4.
No
be
in upper case
line must terminate
in
feed
a
5. Lines must be less
inc hiding comments
than
128
in this versiorí
All labels must start in column
7.
The
at"
one
or iríst-ruc'tion
space or tab
if
long
characters
6.
mnemonic
and
carriage returrl
line numbers are permitted
least
by
instruction per line is permitted
1. Only one
lime
to
one
f ield must
no
label
be
15
by
preceded
present
8. There must be at least one space or tab between the end
of a labol and the beginning of the instruction unless
thr label ends i-n a colon
9.
EQL'
and
SET
pseudo-op
statements
l0. Other pjseLld(")-ops or macro
fur instructions in Rule
names
may
must
in
begiri
as defined
7
li.
Comment
and may
1.2
Comments
following instruct ions on the same
also begin with a semicolon or asterisk and
preceded by at least one space or tab only
asterisk is used
.
Blank
lines,
supported.
col
begin
cíny
umn
lines must be preceded by a semicolon or asterisk
begin in any column. (See also Rule U)
as
well as blank lines following
I ine must
be
must-
the
if
a
label
,
a
Page
re
11
to the variety of assembler pseudo-ops
be
made.
There is a logical problem
to
starting with an asterisk and comment lines
This is solved in these translators
asterisk.
Due
had
additional rule:
13.
--
Page
compromises
with pseudo-ops
delimited by an
by the followiríg
some
are used which start with an asterisk then
The
used on the same line.
label may,
of course, be a dummy.
In addition, actual comment. limes
fcÁlowing a label must be del imit-ed by a sernicolon.
pseudo-ops
If label
must
a
12
be
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
EXECUTION
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
When
begins ITOT will print a message on
program execution
an
the terminal indicating that the translation is underway.
message
encountered
a
unrecognizable
syntax
instruction is
error
is displayed at the console along with a line number indicator.
This line is also flagged in the output file by the comment
line
If
"FOLLOWING
attempt
file.
INSTRUCTION
NOT
RECOGNIZED."
to translate this line
but simply
The
translator makes no
it to the output
copies
pseudo-ops a r e included i n t h e
translator's
internal tables. If you get a syntax error for a
pseud(")-c)p
or macro name which appears in your input source f lle
ADNAME.COP1
should
then run the
you
as described below.
utility,
This will prevent future occurrences of this error. As noted
below, this
does nut. translate or, more accurately, itutility
a
results in
one-to-one translation (exact copy) of the eritire
line .
Most
o
f the
coInmQr)
These translators
do not support. the TDL .DEFINE (MACRO)
pseudo-op
since there is not, in general, a unique translation.
These can usuallv-L be handled after translat.ion with an editor.
The
pseudo-op is included,
however.
.EXIT (EXITM)
and logical operators of the TDL set
All arithmetic
the exception
of the
change.
supported
with
unary
radix
are
conditional assembly pseudo-ops of the TDL set.
are supported.
its
are: .IFN (IF) which is false
NUI.)
and
argument
.IFB
evaluates to zero
(IF
true otherwise,
which is true
it.s argument is blank, and .IFNB (IF NOT NUT.)
which is true
its argument is ríüt blank. The ELSE construct
is a]sc) supported. No part of the body of the IF or ELSE is
perrnit-ted on the same line as the IF statement
itself. Left and
right square brackets must- surround the arguments of .IFB arid
Three of the
These
if
if
if
Page
13
*
*
*
*
*
*
*
:k
*
*
X
*
*
*
X
X
*
*
*
*
*
ADNAME
*
This
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
.
*
*
*
*
*
*
*
*
*
*
*
9r
9t
*
*
*
*
*
COM
*
*
*
*
*
*
*
*
*
*
*
*
*
permits the user to add custom macro names or
pseudo-ops to the translator's internal tables.
It will operate
TTOT.CO.Y.
also
on either ITOT.COM
operate on either
will
or
Please note that no
of these fijes
they have been renamed.
translation occurs for these names. The use of ADNAP1E permits
the t: ranslators to recognize these names and to copy the line
from the input
without generating an
to the output
experience
message.
you
difficulty thewith assembly of a
error
may be necessary
translated fije
translated file
to edit
the
pseudo-ops
used
by
for
particular
your assembler.
to correct
The command
line format for ADNAME is:
utility
It
if
file
If
it
file
MADNAME
filename
TTOI
where 'filename' is ITOT,
renamed
or whatever you may havc'
The
them. A filetype of COM is automatically assigned by ADNAME.
program will then prompt you for the new names to be entered.
Each
entry is terminated by a carriage return. A blank line (CR)
The old
terminates the program.
is renamed with the same
BAK.
and
The new
a
filename
with
of
is renamed
filetype
and
The
COM.
wit-h the same filename
a
new COM
fi-letype of
with
wish
include
names.
new
may
you
erase the
your
you
file wAl
E3AK
We
keeE"' a
however,
always
le.
recommend,
strongly
that you
fi
backup copy of the original
The
space allocated in the
files.
N
200
bytes.
translators for Cthis function is
is the rmmber of
and
number
of characters in the new
is the total
new names
then 2*K'"C must be q = 200. Attempts to exceed this number
names
and a warning
not- be accepted
message will be issued.
wíll AM"AME
be used on t.he current COM
may
as ofterí as
Any new names will be added to those
already
you please.
included and a new COM file and riew BAK file will be created.
file
file
If
If
file
Page
14
*
*
*
*
*
*
*
Ik
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
8080
EXTENDED
*
*
*
*
*
*
*
*
VERSUS
*
*
*
*
:k
*
*
*
TDL/CDL
*
*
*
*
*
*
*
*
MNEMONIC
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
TABLE
*
:k
*
*
*
*
*
*
peculiar instructions
for TDL differ from the
set as used here. The extended 8080 mnemonic set
is identical to that released by Di-g-ital Research as Z80.LIB to
be used with their CP/M "MAC" .'lacro Assembler.
The following
convent.ions are used in the table.
The Z-80
extended 8080
r - any register or memory
- any regíster pair or stack pointer
rr
nn - 8 bit immediate data (O to 255)
d
displacement
(-128 to 127)
bit signed
16
address
immediate
data (O to 65535)
nnnn
or
bit
b
number
(O
7
is most significant-)
to 7,
- bit
addr - 16 bit address within PC+127 through PC-12R
8
In cases involving a displacement, d,
last one in operand field.
the
EXT
8080
TDL
LDX
LDY
STX
STY
.YIVIX
!'1\"IY
LDAI
LDAR
STAI
STAR
r ,d
r ,d
r ,d
r ,d
MOV
LXIX
LXIY
LBCD
LDED
I,SPD
LIXD
LIYD
rin
rirí
MOV
MOV
,d
,d
nnnn
nrínn
nnnn
nnnn
nnnn
nrínn
nnnn
nnnn
nrínn
SBCD
SDED
SSPD nnnn
SIXD
nnnn
SIYD
nnnn
SPIX
SPIY
PUSHIX
PUSHIY
POPIX
POPIY
EXAF
EXX
r,d(X)
r,óÍ(Y)
dl X) ,r
,r
LXl X,nnnn
IJXI Y ,nnnn
LBCD
LDED
LSPD
nnnn
nnnrí
nnnn
nnnn
nnnn
nnnn
nnrín
nnnn
nnnn
nnnn
LIXD
LIYD
SBCD
SDED
SSPD
SIXD
SIYD
SPIX
SPIY
PUSH
PUSH
POP
POP
EXAF
Ek"X
parameter
EXT
Óí(fí)
YIVI CÍ(X) ,r"írj
M'JI d(Y),nn
LDAI
LIJAR
STAI
STAR
MOL'
this
X
Y
X
Y
LDIR
I,DD
LDDR
CCI
CCIR
CCD
CCDR
ADDX
ADDY
ADCX
ADCY
SUBX
SUBY
SBBX
SBBY
ANAX
ANAY
XRAX
XRAY
ORAX
ORAY
CMPX
CMPY
INRX
INRY
DCRX
DCRY
NEG
IMO
IPll
8080
d
d
d
d
d
d
d
d
d
d
d
d
d
d
d
d
d
d
d
d
is always
TDL
LDIR
LDD
LDDR
CCI
CCTR
CCD
CCDR
ADD d(X)
ADD d(Y)
ADC d(x)
ADC d(v)
SUB d(x)
SUB d(Y)
SBB d(x)
SBB d(Yl
ANA d(x)
ANA d(Yl
XRA d(X)
XRA d(Y)
ORA d(X)
ORA d(Y)
CMP
CMP
INR
INR
DCR
DCR
NEG
IMO
1-¶1
d(x)
d(Y)
d(X)
d(Y)
d(X)
d(Y)
Page
15
XTIX
XTJY
XTlX
IP12
IM2
XTIY
LDI
LDI
DADX
DADY
DADX
DADY
INX X
INX y
DCX X
DCX Y
DADC
DSBC
OUTI
OUTIR
IND
INDR
OUTD
OUTDR
RLCR
RLCX d
RLCY d
RALR
RALX d
d
DADC r-r
DSBC
OÜTI
OUTIR
IND
INDR
OUTD
OUTDR
RLCR
RLCR d(X)
RLCR CÍ(Y)
rr
rr
INXIX
INXIY
DCXIX
DCXIY
BIT -b,
SETB b,
RES b,
r
r
r
BITX b,d
BITY b,d
SETX b,d
SETY b ,d
RESX b ,d
resy b,d
JR addr
JRC addr
JRNC addr
JRZ addr
JRNZ addr
DJNZ addr
pcI!í"
PCJ y
RETI
RETIV
IM'
OLTP
TKT
I>'1FI
Page
r
r
16
rr
rr
BIT b, r
SET b,
r
RES b,
r
BIT b,d(X)
BIT b,dci")
SET
b,d(x)
set b,dcv)
RES
RES
JMPR
JRC
JRNC
JRZ
JRNZ
DJNZ
PCIX
PCIY
RETI
RETN
INF'
OUTP
INI
INIR
b,d(x)
b,d(Y)
addr
addr
addr
addr
addr
addr
r
r
rr
rr
r
rrcy
RARR
RARX
RARY
SLAR
SLAX
SLAY
SRAR
SRAX
SRAY
SRLR
SRLX
SRLY
RI.D
RRD
r
r
r
ralr
RALR d(Xj
r
RALR
RRCR
RRCR
raly
RRCR
RRCX
rr
d
d
r
d
d
r
d
d
r
d
d
r
d
d
d(V)
r
d(X)
&Y)
rrcr
RARR
RARR
RARR
SLAR
SLAR
SLAR
SRAR
SRAR
SRAR
SRLR
SRLR
SRLR
RL.D
RRIJ
r
d(X"l
dlY)
r
CÍ(X)
C1(Y)
r
d(jO
CJ(Y)
r
d( X)
d(Y)
For
JPE
CPE
RPE
following additional translations are valid:
the
TTOI
nnnn
JO
nnnn
CO
JPO
CPO
RPO
nnnn
ñññrj
RO
following pseudo-ops
both translat-ors:
The
and
JNO
CNO
RNO
nnnn
nnnn
are also
operators
nnnn
nnnn
included
SET
PAGE
=
EQIJ
.PAGE
TITLE
IF
IF NEIL
DS(2)
.IFN
.IFB
END
.BLKW
.BYTE
.BLKB
.ENTRY
DW
.WORD
.ASCII
]{
DB
ORG
EXTRP'
ENDTF
.RADIX
LIST
.XLIST
EXIT
NOT
.LIST
.EXIT
DB
DS
ENTRY
ELSE
RADIX
XLIST
IF
$
.
@
ylor-)
XOR
SHR
*
*
*
*
*
*
*
*
*
.END
NOT
.IFNB
NUL
.LOC
.EXTERN
]
#
!
AND
SHL
<
*
*
*
.TITLE
or
""
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
in
*
*
*
&
..>
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
Page
17
Download