ack/man/6500_as.6
1991-10-01 12:18:39 +00:00

70 lines
1.9 KiB
Groff

.\" $Header$
.TH 6500_AS 6 "$Revision$"
.ad
.SH NAME
6500_as \- assembler for Mostek 6500
.SH SYNOPSIS
~em/lib.bin/6500/as [options] argument ...
.SH DESCRIPTION
This assembler is made with the general framework
described in \fIuni_ass\fP(6). It is an assembler-loader.
Output is in \fIack.out\fP(5) object format, but not relocatable.
.SH "SECTIONS and TYPES"
An additional section, the \fIzeropage\fP, can be started by the
\&\fI.sect .zero\fP pseudo-instruction.
Some adressing-modes require an address between 0 and 255.
Such an address must be defined with the means of the \fI.sect .zero\fP
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
\&.sect .zero
.br
answer: .space 1
.br
\&.sect .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
.ta 16n 24n 32n 40n 48n
syntax meaning (name)
#expr 8-bit value (immediate)
expr address (direct)
expr, x expr + contents of x
or or
expr, y expr + contents of y
yields address (indexed)
(expr) address of address (only with JMP) (indirect)
.fi
In the next two addressing modes \fIexpr\fP has to be
a zeropage expression.
.nf
(expr, x) expr + contents of x
yields address (pre-indexed indirect)
(expr), y contents of expr + contents of y
yields address (post-indexed indirect)
.fi
.IP instructions
There are two mnemonics that do not map onto one machine-instruction:
\fIadd\fP and \fIsub\fP. \fIAdd mode\fP maps onto \fIclc; adc mode\fP.
\fISub mode\fP maps onto \fIsec; sbc mode\fP.
.SH "SEE ALSO"
uni_ass(6),
ack(1),
ack.out(5),