.\" $Header$
.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
.ta 8 16 24 32 40 48
syntax		meaning

expr		dependent on the instruction, the
		value of `expr' can be immediate
		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 -
		the - one byte - value of `expr'
		yield the address of the operand.

(expr)		the value of `expr' is the address of
		the operand.

reg		the contents of `reg' - one of the above-
		mentioned registers - is the operand.

(reg)		the contents of `reg' - one of the 16-bit
		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