6500_as.1 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. .\" $Header$
  2. .TH 6500_AS 1
  3. .ad
  4. .SH NAME
  5. 6500_as \- assembler for Mostek 6500
  6. .SH SYNOPSIS
  7. /usr/em/lib/6500_as [options] argument ...
  8. .SH DESCRIPTION
  9. This assembler is made with the general framework
  10. described in \fIuni_ass\fP(6).
  11. .SH "SEGMENTS and TYPES"
  12. An additional segment, the \fIzeropage\fP, can be started by the
  13. \&\fI.zero\fP pseudo-instruction.
  14. Some adressing-modes require an address between 0 and 255.
  15. Such an address must be defined with the means of the \fI.zero\fP
  16. pseudo-instruction.
  17. A plain number between 0 and 255 is not allowed.
  18. The assembler will complain that it must be a zero page expression.
  19. .IP example
  20. \&.zero
  21. .br
  22. answer: .space 1
  23. .br
  24. \&.text
  25. .br
  26. and (answer, x)
  27. .SH SYNTAX
  28. .IP expressions
  29. An two-byte expression followed by the pseudo-operator \fI.h\fP (\fI.l\fP)
  30. has the value of the higher (lower) byte of the expression.
  31. \&\fI.h\fP and \fI.l\fP bind stronger than all other operators.
  32. E.g. -1.h parses as -[1.h] which has value 0.
  33. You have to write [-1].h to get 0xFF.
  34. .IP "addressing modes"
  35. .nf
  36. .ta 8 16 24 32 40 48
  37. syntax meaning (name)
  38. #expr 8-bit value (immediate)
  39. expr address (direct)
  40. expr, x expr + contents of x
  41. or or
  42. expr, y expr + contents of y
  43. yields address (indexed)
  44. (expr) address of address (only with JMP) (indirect)
  45. In the next two addressing modes `expr' has to be
  46. a zeropage expression.
  47. (expr, x) expr + contents of x
  48. yields address (pre-indexed indirect)
  49. (expr), y contents of expr + contents of y
  50. yields address (post-indexed indirect)
  51. .fi
  52. .IP instructions
  53. There are two mnemonics that do not map onto one machine-instruction:
  54. `add' and `sub'. `Add mode' maps onto `clc; adc mode'.
  55. `Sub mode' maps onto `sec; sbc mode'.
  56. .SH "SEE ALSO"
  57. uni_ass(6),
  58. ack(1)