z80_as.1 2.1 KB

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