ack/man/z80_as.1

67 lines
2.1 KiB
Groff
Raw Normal View History

1984-07-12 15:18:13 +00:00
.\" $Header$
1984-07-12 14:55:49 +00:00
.TH z80_AS 1
.ad
.SH NAME
z80_as \- assembler for Zilog z80
.SH SYNOPSIS
/usr/em/lib/z80_as [options] argument ...
.SH DESCRIPTION
This assembler is made with the general framework
described in \fIuni_ass\fP(6).
.SH SYNTAX
.IP registers
The z80 has six general-purpose 8-bit registers: b, c, d, e, h, l;
an 8-bit accumulator: a; an 8-bit flag register: f; an 8-bit interrupt
vector: i; an 8-bit memory refresh register: r; two 16-bit index registers:
ix, iy; a 16-bit stack pointer: sp; and a 16-bit program counter: pc.
The general-purpose registers can be paired to form three registers pairs of
16 bits each: bc, de, hl.
An alternate set of registers is provided that duplicates the accumulator,
the flag register, and the general-purpose registers. The "exx"-instruction
exchanges the contents of the two sets of general-purpose registers; the
contents of the accumulator and flag register can be exchanged with the contents
of their alternates by the "ex af, af2"-instruction.
.IP "addressing modes"
.nf
1986-01-20 20:39:09 +00:00
.ta 8n 16n 24n 32n 40n 48n
1984-07-12 14:55:49 +00:00
syntax meaning
expr dependent on the instruction, the
1986-01-20 20:39:09 +00:00
value of \fIexpr\fP can be immediate
1984-07-12 14:55:49 +00:00
data or the address of the operand.
There is no special notation for
immediate data.
(ireg + expr)
(ireg - expr) the contents of ireg (which must be
one of the index-registers) + or -
1986-01-20 20:39:09 +00:00
the - one byte - value of \fIexpr\fP
1984-07-12 14:55:49 +00:00
yield the address of the operand.
1986-01-20 20:39:09 +00:00
(expr) the value of \fIexpr\fP is the address of
1984-07-12 14:55:49 +00:00
the operand.
1986-01-20 20:39:09 +00:00
reg the contents of \fIreg\fP - one of the above-
1984-07-12 14:55:49 +00:00
mentioned registers - is the operand.
1986-01-20 20:39:09 +00:00
(reg) the contents of \fIreg\fP - one of the 16-bit
1984-07-12 14:55:49 +00:00
registers except pc - is the address of
the operand.
nz, z, nc, c,
po, pe, p, m the letters indicate a condition-code:
nonzero, zero, carry, no carry,
parity odd, parity even, sign positive,
sign negative respectively. Used by conditional
jump, call, and return instructions.
.fi
.IP instructions
The jr-instruction will automatically be replaced by a jp-instruction if the
target is too remote.
.SH "SEE ALSO"
uni_ass(6),
ack(1),
.br
Z80 Users Manual, Joseph J. Carr, Reston Publishing Company, 1980