ack/man/6500_as.1

67 lines
1.8 KiB
Groff
Raw Normal View History

1984-07-12 15:18:13 +00:00
.\" $Header$
1987-03-02 10:35:44 +00:00
.TH 6500_AS 1ACK
1984-07-12 14:51:48 +00:00
.SH NAME
6500_as \- assembler for Mostek 6500
.SH SYNOPSIS
1987-03-02 10:35:44 +00:00
~em/lib/6500/as [options] argument ...
1984-07-12 14:51:48 +00:00
.SH DESCRIPTION
This assembler is made with the general framework
1987-03-02 10:35:44 +00:00
described in \fIuni_ass\fP(6). It is an assembler-loader.
.SH "SECTIONS and TYPES"
An additional section, the \fIzeropage\fP, can be started by the
\&\fI.sect .zero\fP pseudo-instruction.
1984-07-12 14:51:48 +00:00
Some adressing-modes require an address between 0 and 255.
1987-03-02 10:35:44 +00:00
Such an address must be defined with the means of the \fI.sect .zero\fP
1984-07-12 14:51:48 +00:00
pseudo-instruction.
A plain number between 0 and 255 is not allowed.
The assembler will complain that it must be a zero page expression.
.IP example
1987-03-02 10:35:44 +00:00
\&.sect .zero
1984-07-12 14:51:48 +00:00
.br
answer: .space 1
.br
\&.text
.br
and (answer, x)
.SH SYNTAX
.IP expressions
An two-byte expression followed by the pseudo-operator \fI.h\fP (\fI.l\fP)
has the value of the higher (lower) byte of the expression.
\&\fI.h\fP and \fI.l\fP bind stronger than all other operators.
E.g. -1.h parses as -[1.h] which has value 0.
You have to write [-1].h to get 0xFF.
.IP "addressing modes"
.nf
1986-01-20 20:39:09 +00:00
.ta 16n 24n 32n 40n 48n
syntax meaning (name)
1984-07-12 14:51:48 +00:00
1986-01-20 20:39:09 +00:00
#expr 8-bit value (immediate)
1984-07-12 14:51:48 +00:00
1986-01-20 20:39:09 +00:00
expr address (direct)
1984-07-12 14:51:48 +00:00
1986-01-20 20:39:09 +00:00
expr, x expr + contents of x
or or
expr, y expr + contents of y
yields address (indexed)
1984-07-12 14:51:48 +00:00
1986-01-20 20:39:09 +00:00
(expr) address of address (only with JMP) (indirect)
.fi
1984-07-12 14:51:48 +00:00
1986-01-20 20:39:09 +00:00
In the next two addressing modes \fIexpr\fP has to be
1984-07-12 14:51:48 +00:00
a zeropage expression.
1986-01-20 20:39:09 +00:00
.nf
1984-07-12 14:51:48 +00:00
(expr, x) expr + contents of x
1986-01-20 20:39:09 +00:00
yields address (pre-indexed indirect)
1984-07-12 14:51:48 +00:00
(expr), y contents of expr + contents of y
1986-01-20 20:39:09 +00:00
yields address (post-indexed indirect)
1984-07-12 14:51:48 +00:00
.fi
.IP instructions
There are two mnemonics that do not map onto one machine-instruction:
1986-01-20 20:39:09 +00:00
\fIadd\fP and \fIsub\fP. \fIAdd mode\fP maps onto \fIclc; adc mode\fP.
\fISub mode\fP maps onto \fIsec; sbc mode\fP.
1984-07-12 14:51:48 +00:00
.SH "SEE ALSO"
uni_ass(6),
ack(1)