ack/man/6500_as.1

67 lines
1.7 KiB
Groff
Raw Normal View History

1984-07-12 15:18:13 +00:00
.\" $Header$
1984-07-12 14:51:48 +00:00
.TH 6500_AS 1
.SH NAME
6500_as \- assembler for Mostek 6500
.SH SYNOPSIS
/usr/em/lib/6500_as [options] argument ...
.SH DESCRIPTION
This assembler is made with the general framework
described in \fIuni_ass\fP(6).
.SH "SEGMENTS and TYPES"
An additional segment, the \fIzeropage\fP, can be started by the
\&\fI.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.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
\&.zero
.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)