6800_as.1 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. .\" $Header$
  2. .TH 6800_AS 1
  3. .ad
  4. .SH NAME
  5. 6800_as \- assembler for Motorola 6800
  6. .SH SYNOPSIS
  7. /usr/em/lib/6800_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 6800 has two accumulator registers, A and B. An instruction that refers
  14. to accumulator A, has an "a" as last character. In the same way a "b" means
  15. that the instruction uses B as accumulator.
  16. .IP "addressing modes"
  17. .nf
  18. .ta 8n 16n 24n 32n 40n 48n
  19. syntax meaning (name)
  20. #expr with cpx, ldx, lds a 2-byte value,
  21. otherwise a 1-byte value (immediate)
  22. <expr 1-byte address. Not allowed with:
  23. asl, asr, clr, com, dec, inc, lsl, lsr,
  24. neg, rol, ror, tst (base page direct)
  25. expr 2-byte address (extended direct)
  26. expr, x 1-byte expr + contents of x
  27. yields address (indexed)
  28. .fi
  29. .SH "SEE ALSO"
  30. uni_ass(6),
  31. ack(1),
  32. .br
  33. A. Osborne, 6800 programming for logic design,
  34. Adam Osborne and Associates Inc., 1977
  35. .SH EXAMPLE
  36. An example of Motorola 6800 assembly code.
  37. .sp 2
  38. .nf
  39. .ta 8n 16n 32n 40n 48n 56n 64n
  40. .data
  41. val: 0
  42. .text
  43. ldx <val
  44. com val, x
  45. bhs someplace ! branch on carry clear
  46. sta <val
  47. adda #18 ! add 18 to accumulator A
  48. .fi
  49. .SH BUGS
  50. You have to specify whether an address fits in one byte
  51. with the token \fI<\fP. It should be done automatically.