1987-03-02 11:28:52 +00:00
|
|
|
.\" $Header$
|
1991-10-01 12:18:39 +00:00
|
|
|
.TH 6805_AS 6 "$Revision$"
|
1987-03-02 11:28:52 +00:00
|
|
|
.ad
|
|
|
|
.SH NAME
|
|
|
|
6805_as \- assembler for Motorola 6805
|
|
|
|
.SH SYNOPSIS
|
1991-10-01 12:18:39 +00:00
|
|
|
~em/lib.bin/6805/as [options] argument ...
|
1987-03-02 11:28:52 +00:00
|
|
|
.SH DESCRIPTION
|
|
|
|
This assembler is made with the general framework
|
|
|
|
described in \fIuni_ass\fP(6). It is an assembler generating relocatable
|
|
|
|
object code in \fIack.out\fP(5) format.
|
|
|
|
.SH SYNTAX
|
|
|
|
.IP registers
|
|
|
|
The 6805 has an accumulator register A and an index register X. An
|
|
|
|
instruction (from the read-modify-write group) that references the
|
|
|
|
A-register has an "a" suffixed to the mnemonic. In a similar way
|
|
|
|
the X-register, apart from indexing operations, is addressed with
|
|
|
|
an "x" suffix, i.e. "lsra" and "negx".
|
|
|
|
.IP "addressing modes"
|
|
|
|
The assembler automatically selects the shortest opcode if
|
|
|
|
appropriate and possible. Thus "sub 10" will use the direct
|
|
|
|
addressing mode whereas "neg 0,x" will use indexed (no offset) mode.
|
|
|
|
There are sick constructions where the assembler can't find out
|
|
|
|
the shortest form in time. In those cases the longest form is used.
|
|
|
|
.br
|
|
|
|
Branches are handled in much the same way. If a branch is out of
|
|
|
|
range it is replaced by a reversed condition branch, followed by
|
|
|
|
a jump, automatically.
|
|
|
|
.sp
|
|
|
|
.nf
|
|
|
|
.ta 8n 16n 24n 32n 40n 48n
|
|
|
|
syntax meaning (name)
|
|
|
|
|
|
|
|
#expr a one byte value (immediate)
|
|
|
|
<expr 1-byte zero page address. Allowed in
|
|
|
|
the register/memory and read-modify-
|
|
|
|
write instruction groups. (direct)
|
|
|
|
>expr 2-byte address. Allowed in the register
|
|
|
|
memory group. (extended)
|
|
|
|
expr 1-byte address if appropriate, 2-byte
|
|
|
|
in other cases. (auto-direct/extended)
|
|
|
|
,x indexed with zero offset. (indexed)
|
|
|
|
<expr,x indexed with 8 bit offset. (indexed-1)
|
|
|
|
>expr,x indexed with 16 bit offset. (indexed-2)
|
|
|
|
expr,x indexed with the shortest possible off-
|
|
|
|
set. (auto indexed)
|
|
|
|
bit,expr bit number and direct address.
|
|
|
|
(bit set/clear)
|
|
|
|
bit,expr,tag bit number, direct address and branch
|
|
|
|
tag. Automatically changed to reversed
|
|
|
|
condition branch and jump if appropri-
|
|
|
|
ate. (bit test and branch)
|
|
|
|
tag branch tag. Converted to reversed con-
|
|
|
|
dition branch and jump if appropriate.
|
|
|
|
(branch)
|
|
|
|
.fi
|
|
|
|
.IP "PSEUDO INSTRUCTIONS"
|
|
|
|
|
|
|
|
.cmos assemble cmos version instructions.
|
|
|
|
.SH "SEE ALSO"
|
|
|
|
uni_ass(6),
|
|
|
|
ack(1),
|
|
|
|
ack.out(5)
|
|
|
|
.br
|
|
|
|
M6805 HMOS, M146805 CMOS family, Motorola,
|
|
|
|
Prentice-Hall, Inc., 1983, (ISBN 0-13-541375-3).
|
|
|
|
.SH AUTHOR
|
|
|
|
Written by Gijs Mos.
|
|
|
|
Not a member of the ACK group.
|
|
|
|
.SH BUGS
|
|
|
|
The assembler has not been well tested.
|