1 .\" $Id: z80_as.6,v 1.4 1994/06/24 14:02:31 ceriel Exp $
2 .TH Z80_AS 6 "$Revision: 1.4 $"
5 z80_as \- assembler for Zilog z80
7 ~em/lib.bin/z80/as [options] argument ...
9 This assembler is made with the general framework
10 described in \fIuni_ass\fP(6). It is an assembler generating relocatable
11 object code in \fIack.out\fP(5) format.
14 The z80 has six general-purpose 8-bit registers: b, c, d, e, h, l;
15 an 8-bit accumulator: a; an 8-bit flag register: f; an 8-bit interrupt
16 vector: i; an 8-bit memory refresh register: r; two 16-bit index registers:
17 ix, iy; a 16-bit stack pointer: sp; and a 16-bit program counter: pc.
18 The general-purpose registers can be paired to form three registers pairs of
19 16 bits each: bc, de, hl.
20 An alternate set of registers is provided that duplicates the accumulator,
21 the flag register, and the general-purpose registers. The "exx"-instruction
22 exchanges the contents of the two sets of general-purpose registers; the
23 contents of the accumulator and flag register can be exchanged with the contents
24 of their alternates by the "ex af, af2"-instruction.
25 .IP "addressing modes"
27 .ta 8n 16n 24n 32n 40n 48n
30 expr dependent on the instruction, the
31 value of \fIexpr\fP can be immediate
32 data or the address of the operand.
33 There is no special notation for
37 (ireg - expr) the contents of ireg (which must be
38 one of the index-registers) + or -
39 the - one byte - value of \fIexpr\fP
40 yield the address of the operand.
42 (expr) the value of \fIexpr\fP is the address of
45 reg the contents of \fIreg\fP - one of the above-
46 mentioned registers - is the operand.
48 (reg) the contents of \fIreg\fP - one of the 16-bit
49 registers except pc - is the address of
53 po, pe, p, m the letters indicate a condition-code:
54 nonzero, zero, carry, no carry,
55 parity odd, parity even, sign positive,
56 sign negative respectively. Used by conditional
57 jump, call, and return instructions.
61 The jr-instruction will automatically be replaced by a jp-instruction if the
68 Z80 Users Manual, Joseph J. Carr, Reston Publishing Company, 1980