home *** CD-ROM | disk | FTP | other *** search
/ Columbia Kermit / kermit.zip / a / apxa1.c / user.nr < prev   
Text File  |  2020-01-01  |  4KB  |  160 lines

  1. .de hd
  2. 'sp 3
  3. .tl ''\fBas6502 User Notes\fR'Page %'
  4. 'sp 2
  5. ..
  6. .de fo
  7. 'bp
  8. ..
  9. .wh 0 hd
  10. .wh -3 fo
  11. .br
  12. \fBSOURCE LINE FORMAT\fR:
  13. .ti 0.5i
  14. .sp 1
  15. <label> <operation> <operand> <comment>
  16. .sp 1
  17. Each field is terminated by one or more spaces, a tab or a ';' (which
  18. begins the comment field immediately).
  19. .sp
  20. \fBLABEL FIELD\fR:
  21. .sp 1
  22. If first character is ';', entire line is a comment.
  23. If first character is space, label field is null.
  24. Labels are alphanumeric strings beginning
  25. with 'a' through 'z', 'A' through 'Z',
  26. underscore or period followed by any of the above
  27. characters or '0' through '9'.
  28. Currently, labels are limited to 19 characters.
  29. A, X, Y, a, x and y are reserved labels.
  30. .sp
  31. \fBOPERATION FIELD\fR:
  32. .sp 1
  33. Upper and lower case letters are equivalent.
  34. Machine operation mnemonics are:
  35. .in 0.5i
  36. .nf
  37. .sp 1
  38. ADC     BMI     CLD     DEX     JSR     PHA     RTS     STY
  39. AND     BNE     CLI     DEY     LDA     PHP     SBC     TAX
  40. ASL     BPL     CLV     EOR     LDX     PLA     SEC     TAY
  41. BCC     BRK     CMP     INC     LDY     PLP     SED     TSX
  42. BCS     BVC     CPX     INX     LSR     ROL     SEI     TXA
  43. BEQ     BVS     CPY     INY     NOP     ROR     STA     TXS
  44. BIT     CLC     DEC     JMP     ORA     RTI     STX     TYA
  45. .in 0
  46. .fi
  47. .sp 1
  48. Pseudo operation mnemonics are:
  49. .in 1.2i
  50. .ti 0.5i
  51. .sp 1
  52. =      equate label name to operand field value
  53. (space is not needed to terminate this operation).
  54. .ti 0.5i
  55. *=     set location counter to operand field value
  56. (space is not needed to terminate this operation).
  57. .ti 0.5i
  58. .tr*.
  59. *WORD  assign 16 bit value of operand field to next
  60. two locations; low byte of value first, then high byte.
  61. .ti 0.5i
  62. *DBYT  assign 16 bit value of operand field to next
  63. two locations; high byte of value first, then low byte.
  64. .ti 0.5i
  65. *BYTE  assign 8 bit value of operand field to next
  66. location.
  67. .ti 0.5i
  68. *NLST  turn listing mode off (this source
  69. line is not listed).
  70. .ti 0.5i
  71. *LIST  turn listing mode on (normal mode) (this
  72. source line is not listed).
  73. .tr**
  74. .in 0
  75. .sp 1
  76. \fBOPERAND FIELD\fR:
  77. .sp 1
  78. Operand field expressions use infix notation and are evaluated strictly
  79. from left to right.
  80. No imbedded spaces are permitted.
  81. .sp 1
  82. Operand field terms include labels and numbers.
  83. Asterisk (*) is the label for the location counter value.
  84. Numbers are binary, octal, decimal, hexadecimal or ASCII.
  85. Number type is indicated by the first character of the number string as follows:
  86. .nf
  87. .in 0.5i
  88. .sp 1
  89. %       binary prefix
  90. @ or 0  octal prefix
  91. 1 - 9   decimal by default (prefix is part of number)
  92. $       hexadecimal prefix
  93. .tr,'
  94. ,       ASCII character prefix
  95. .tr,,
  96. "       ASCII character string prefix and suffix; in the
  97.         string, \\t is a tab character, \\n is a new line.
  98. .in 0
  99. .fi
  100. .sp 1
  101. Operand field operations and the corresponding symbols are:
  102. .in 0.5i
  103. .nf
  104. .sp 1
  105. +       addition
  106. -       subtraction
  107. /       division
  108. *       multiplication
  109. %       modulo (remainder after integer division)
  110. ^       logical exclusive OR
  111. &       logical AND
  112. |       logical OR
  113. <       low byte
  114. >       high byte
  115. .in 0
  116. .fi
  117. .sp 1
  118. \fBERROR MESSAGES\fR:
  119. .in 0.5i
  120. .nf
  121. .sp 1
  122. Invalid operation code
  123. Invalid argument count (when as6502 was invoked)
  124. Open error for file
  125. Creat error for object file 6502.out
  126. Close error
  127. Close error (6502.out)
  128. Symbol table full
  129. Label multiply defined
  130. Sync error (pass 1 symbol value not equal pass 2 symbol value)
  131. Invalid branch address
  132. Operand field missing
  133. Invalid addressing mode
  134. Operand field size error
  135. Undefined symbol in operand field
  136. Invalid operand field
  137. .fi
  138. .in 0
  139. .sp 1
  140. \fBINVOKING as6502\fR:
  141. .sp 1
  142. .ti 0.5i
  143. as6502 {-ilnos} <source files descriptions>
  144. .sp 1
  145. Options:
  146. .in 0.5i
  147. .nf
  148. .sp 1
  149. -i   ignore any .nlst pseudo operations
  150. -l   list errors only
  151. -n   print addresses as <high byte><low byte>,
  152.      rather than as <low byte>:<high byte>.
  153. -o   generate ASCII object output in file 6502.out,
  154.      format is
  155.           ;<address lo><address hi><data>
  156. -s   print symbol table at end of listing
  157. -v   print assembler version
  158.  
  159.                      J. H. Van Ornum  11/5/84
  160.