Avocet 8048 Cross-Assembler Mar81
Avocet 8048 Cross-Assembler Mar81
Avocet 8048 Cross-Assembler Mar81
CROSS-ASSEMBLER
USERIS MANUAL
The name AVOCET and the bird logo are trademarks of Avocet Systems.
CPIM is a trademark of Digital Resear!=h.
MS-DOS Is a trademark of Microsoft Corp.
VEDIT is a trademark of Compuview Products.
WORDSTAR is a trademark of Micropro.
(302) 734-0151
%ASM48 User's Manual Table ot' Contents
Section 1 Introduction 1
Section 5 Pseudo-Opera.tions
Appendix A
Error Messages and Flags A-I
Appendix B
Object File Formats B-1
Appendix C
Summary of Instruction Sets C-l
Appendix D
Instruction Mnemonics and Opcodes ••••••••• D-l
XASM48 User's Manual Page 1
1.0 Introduction
The d:'s are optional drive specifiers (eg. A:, B:, etc.).
The file extension (.ext) is also optional; if omitted, it
defaults to .ASM. The second d: specifies a disk dri ve' for
the output files (object and listing);' if it is omitted,
these files are placed on the currently-logged drive. The
switches are (optional) Single characters which control the
output of the assembler, as described below.
X No assembly listing.
Y No symbol-table listing
3.1 Statements
Source files consist of a sequence of statements of one o:f
the forms:
[;comment]
3.2 §ymbols
3 • 3 lIumeric Constants
Numeric constants consist of a sequence of digits,
optionally preceeded or followed by a radix specifier. The
first character must be either a leading radix specifier or
a decimal digit (0 .. 9). The de:fault. radix is ten. For
compatiblity with existing assemblers, other bases may be
denoted by either a leading or a trailing specifier. The
leading radix specifiers are:
3.6 Expressions
Arithmetic expressions are composed of symbols, numeric
constants, character constants, and operators. All operators
except +, -, *, and / must be separated from their operands
by at least one space. Symbols which are operators are
reserved, and may not be redefined as user symbols.
A description of the operators follows:
XASM~ User's Manual Page 7
MOD Remainder;
x MOD y gives the remainder of x/y
OR Logical sum.
XOR Exclusive-OR.
These are all bitwise operators; that is, the same operation
is performed on each operand bit position, with no carry
from one bit position to the next.
HIGH LOW
+ -
EQ NE LT LE GT GE
NOT
AND
5.0 Pseudo-Opera.tions
DB arg[,arg ••• ]
would be in error.
DW expression[,expression ••• ]
m expression
ORG expression
END [expression]
The construct
IF expression
statement
ENDIF
IF expression
statement
ELSE
statement
ENDIF
PAGE [expression]
WIDTH expression
PGI.D expression
fiTIB dtextd
Sm'TL dtextd
5 .7 Operator Syno!JjllJS
The statement
The instruction sets for the five machine groups are listed
in appendices C and D.
XASM8 User I s Manual Page 11
6.0 Errors
7.1 ~ Beadings
(blank line)
(blank line)
(assembler name and version)
(blank line)
(title and page number)
(subtitle)
(blank line)
followed by the name of the input file in the t'orm name. ext.
The page number is listed at the right-hand end ot' this same
line, always within the specified page width.
8YMl9
8YM2
8YM20
8YM21
8YM3
8YM4
XASM48 User's Manual Page A-I
Object files are in the Intel HEX format, which represents binary
data bytes as two-digit ASCII hexadecimal numbers. An object
file consists of a sequence of data records, followed by a single
end record.
Data Record:
End Record:
Like data record, but number of data bytes is zero and the
load address field contains the program starting address.
ADDC A,#data X X X X X
ANL A,#data X X X X X
ANL BUS,#data X
CALL addr X X X X X
CLR A X X X X X
CLR C X X X X X
CLR FO X X X
CLR F1 X X X
CPL A X X X X X
CPL C X X X X X
CPL FO X X X
CPL F1 X X X
DA A X X X X X
XASM48 User's Manual Page C-2
DEC Rr (r=O .• 7) X X X
DIS I X X X X
DIS TCNTI X X X X
EN DMA X
EN FLAGS X
EN I X X X X
EN T.CNTI X X X X
ENTO CLK X
IN A,DBB X X
IN A,PO X X
INC A X X X X X
INC Rr (r=O •. 7) X X X X X
INS A,BUS X
JC addr X X X X X
JFO addr X X X
JFl addr X X X
JMp addr X X X X X
JMPP @A X X X X X
JNC addr X X X X X
XASM48 User's Manual Page C-3
JNIBF addr X X
JNTO addr X X X X
JNT1 addr X X X X X
JNZ addr X X X X X
JOBF addr X X
JTF addr X X X X X
JTO addr X X X X
JT1 addr X X X X X
JZ addr X X· X X X
MOV A,#data X X X X X
MOV A,PSW X X X
MOV A,T X X X X X
MOV PSW,A X X X
MOV STS,A X
MOV T,A X X X X X
MOVP3 A,@A X X X
NOP X X X X X
ORL A,#data X X X X X
ORL BUS,#data X
OUTL BUS ,A X
OUTL PO,A ·X X
HAD X
RET X X X X 'X
RETI X
RETR X X X
RL A X X X X X
RLC A X X X X X
RR A X X X X X
RRC A X X X X X
SEL ANO X
XASM48 User's Manual Page C-5
SEL MBO X
SEL MB1 X
SEL ROO X X X
SEL RBI X X X
STOP TCNT X X X X X
STRT CNT X X X X X
STRT T X X X X X
SWAP A X X X X X
XRL A,#data X X X X X
015D 17 INC A
015E 18 INC RO
015F 19 INC R1
0160 1A INC R2
0161 1B INC R3
0162 1C INC R4
0163 1D INC R5
0164 lE INC R6
0165 IF INC R7
0166 10 INC @RO
0167 11 INC @H1
0168 08 INS A, BUS ;8048 only
0169 1244 JBO ADDR2 ;Not in 8022,8021_
016B 3244 JB1 ADDR2 ;Not in 8022,8021
016D 5244 JB2 ADDR2 ;Not in 8022,8021
016F 7244 JB3 ADDR2 ;Not in 8022,8021
0171 9244 JB4 ADDR2 ;Not in 8022,8021
0173 B244 JB5 ADDR2 ;Not in 8022,8021
0175 D244 JB6 ADDR2 ;Hot in 8022,8021
0177 F244 JB7 ADDR2 ;Hot in 8022,8021
0179 F644 JC ADDR2
017B B644 JFO ADDR2 ;Not in 8022,8021
017D 7644 JFl ADDR2 ;Hot in 8022,8021
017F
017F 242A JMP ADDR1
0181 B3 JMPP @A
0l.F5 E7 RL A
0lF6 F7 RLC A
01F7 77 RR A
0l.F8 67 RRC A
WOlF9 85 SEL ANO ;8022 only
WOl.FA 95 SEL ANI ;8022 only
OlFB E5 SEL MOO ;8048 only
0l.FC F5 SEL MB1 ;8048 only
OlFD C5 SEL ROO ;Not in 8022,8021
OlFE D5 SEL RBI ;Not in 8022,8021
OIFF 65 STOP TCNT
0200 45 STRT CNT
0201 55 STRT T
0202 47 SWAP A
0203 28 XCH A,RO
0204 29 XCH A,R1
0205 2A XCH A,R2
0206 2B XCH A,R3
0207 2C XCH A,R4
0208 2D XCH A,R5
0209 2E XCH A,R6
020A 2F XCH A,R7
020B 20 XCH A,@RO
020C. 21 XCH A,@Rl
020D 30 XCHD A,@RO
020E 31 XCHD A,@Rl.
020F D8 XRL A,RO
0210 D9 XRL A,Rl
0211 DA XRL A,R2
0212 DB XRL A,R3
0213 DC XRL A,R4
0214 DD XRL A,R5
0215 DE XRL A,R6
0216 DF XRL A,R7
0217 DO XRL A,@RO
0218 Dl XRL A,@Rl
0219 D305 XRL A,#GRINCH
8048 CROSS-ASSEMBLER NOTES (8080/Z80 HOST SYSTEMS) Page 1
Current Versions
Enhancements In Vl.64
DS
EQU
IF
LOe
ORG
SET
2. When the assembly listing is sent directly to the printer, the page
headings no longer contain LF characters with the high-order bit set.
Byte 1
2 •• 3 00 (no. of data bytes)
4 .• 7 0000 (or execution address, if
specified in END statement)
8 •• 9 01 (record type)
10 FF (checksum)
FOO EQU RO
BAR EQU RS
MOV A,@FOO
MOV BAR,#27B
3. INTERRUPTING ASSEMBLY
Current Versions
2. Forward references are not allowed in ORG, OS, IF, EQU, but
are not flagged as errors if present.
The assembly listing now goes to a .PRN file (not to the printer)
unless otherwise specified. The 'D' switch is no longer recognized.
The 'po switch has been added. It causes the assembly ~isting to
be sent to the printer.
Byte 1
2 .. 3 00 ( no. of data bytes)
4 .. 7 0000 (or execution address, if
specified in END statement)
8 .. 9 01 (record type)
10 FF ( checksum)
FOO EQU RO
BAA EQU R5
MOV A,@FOO
MOV BAA,#27B
4. INTERRUPTING ASSEMBLY
Current Versions
Inharcements In Vi.54
1
.1. • The DreserCE of a ror-prirtinf ASCII character in a ~curCf
· p'rn.. a.; rFl'I'~
1 lD._ ~~·",_e an
'.1 'c:,'
" .e. ro.,
"T",er rra! caUSE t"ne 1·l!1e t ,0 ce
T'
interpreted incorrectly.
Quasi-Pug: Assembler in~ut (ie. source file) must be upper-casp,
~.
<- •
except within quote~ 5trin~s and Character constants.
.EytE 1 .
(no. of data bytes)
(or execution address, if
spFcifif~ in END statE~ent)
(record type)
(checKsurr)