1984-07-12 15:18:13 +00:00
|
|
|
.\" $Header$
|
1984-07-12 14:51:48 +00:00
|
|
|
.TH 6800_AS 1
|
|
|
|
.ad
|
|
|
|
.SH NAME
|
|
|
|
6800_as \- assembler for Motorola 6800
|
|
|
|
.SH SYNOPSIS
|
|
|
|
/usr/em/lib/6800_as [options] argument ...
|
|
|
|
.SH DESCRIPTION
|
|
|
|
This assembler is made with the general framework
|
|
|
|
described in \fIuni_ass\fP(6).
|
|
|
|
.SH SYNTAX
|
|
|
|
.IP registers
|
|
|
|
The 6800 has two accumulator registers, A and B. An instruction that refers
|
|
|
|
to accumulator A, has an "a" as last character. In the same way a "b" means
|
|
|
|
that the instruction uses B as accumulator.
|
|
|
|
.IP "addressing modes"
|
|
|
|
.nf
|
1986-01-20 20:39:09 +00:00
|
|
|
.ta 8n 16n 24n 32n 40n 48n
|
1984-07-12 14:51:48 +00:00
|
|
|
syntax meaning (name)
|
|
|
|
|
|
|
|
#expr with cpx, ldx, lds a 2-byte value,
|
|
|
|
otherwise a 1-byte value (immediate)
|
|
|
|
|
|
|
|
<expr 1-byte address. Not allowed with:
|
|
|
|
asl, asr, clr, com, dec, inc, lsl, lsr,
|
|
|
|
neg, rol, ror, tst (base page direct)
|
|
|
|
|
|
|
|
expr 2-byte address (extended direct)
|
|
|
|
|
|
|
|
expr, x 1-byte expr + contents of x
|
|
|
|
yields address (indexed)
|
|
|
|
.fi
|
|
|
|
.SH "SEE ALSO"
|
|
|
|
uni_ass(6),
|
|
|
|
ack(1),
|
|
|
|
.br
|
|
|
|
A. Osborne, 6800 programming for logic design,
|
|
|
|
Adam Osborne and Associates Inc., 1977
|
|
|
|
.SH EXAMPLE
|
|
|
|
An example of Motorola 6800 assembly code.
|
|
|
|
.sp 2
|
|
|
|
.nf
|
1986-01-20 20:39:09 +00:00
|
|
|
.ta 8n 16n 32n 40n 48n 56n 64n
|
1984-07-12 14:51:48 +00:00
|
|
|
.data
|
|
|
|
val: 0
|
|
|
|
.text
|
|
|
|
ldx <val
|
|
|
|
com val, x
|
|
|
|
bhs someplace ! branch on carry clear
|
|
|
|
sta <val
|
|
|
|
adda #18 ! add 18 to accumulator A
|
|
|
|
.fi
|
|
|
|
.SH BUGS
|
|
|
|
You have to specify whether an address fits in one byte
|
1986-01-20 20:39:09 +00:00
|
|
|
with the token \fI<\fP. It should be done automatically.
|