home *** CD-ROM | disk | FTP | other *** search
/ Crawly Crypt Collection 1 / crawlyvol1.bin / program / compiler / fasbin21 / fas_src / as8051 / as8051.doc < prev    next >
Text File  |  1990-12-11  |  5KB  |  317 lines

  1. .HM A 1 1 1 1 1 1
  2. .H 1 "Appendix for as8051 Frankenstein Assembler"
  3. .H 2 "Pseudo Operations"
  4. .H 3 "Standard Pseudo Operation Mnemonics"
  5. .VL 40 5 1
  6. .LI "End"
  7. END
  8. .LI "File Inclusion"
  9. INCL
  10. INCLUDE
  11. .LI "If"
  12. IF
  13. .LI "Else"
  14. ELSE
  15. .LI "End If"
  16. ENDI
  17. .LI "Equate"
  18. EQU
  19. .LI "Set"
  20. SET
  21. .LI "Org"
  22. ORG
  23. .LI "Reserve Memory"
  24. RESERVE
  25. RMB
  26. .LI "Define Byte Data"
  27. BYTE
  28. DB
  29. FCB
  30. .LI "Define Word Data"
  31. DW
  32. FDB
  33. WORD
  34. .LI "Define String Data"
  35. FCC
  36. STRING
  37. .LI "Define Character Set Translation"
  38. CHARSET
  39. .LI "Define Character Value"
  40. CHARDEF
  41. CHD
  42. .LI "Use Character Translation"
  43. CHARUSE
  44. .LE
  45. .H 3 "Machine Dependent Pseudo Operations"
  46. .H 4 "Define Word Data"
  47. The Define Word Data pseudo-operations generate the byte reversed form
  48. for 16 bit constants.
  49. The first byte is the low order half, followed by the high order byte.
  50. .H 2 "Instructions"
  51. .H 3 "Instruction List"
  52. .TS H
  53. ;
  54. l l l.
  55. Opcode    Syntax    Selection Criteria
  56. .sp
  57. .TH
  58. .sp
  59. ACALL    expr
  60. .sp
  61. ADD    A ',' '#' expr    
  62. ADD    A ',' '@' REG    R01
  63. ADD    A ',' REG    R07
  64. ADD    A ',' expr    
  65. .sp
  66. ADDC    A ',' '#' expr    
  67. ADDC    A ',' '@' REG    R01
  68. ADDC    A ',' REG    R07
  69. ADDC    A ',' expr    
  70. .sp
  71. AJMP    expr
  72. .sp
  73. ANL    A ',' '#' expr    
  74. ANL    A ',' '@' REG    R01
  75. ANL    A ',' REG    R07
  76. ANL    A ',' expr    
  77. ANL    C ',' '/' bit    
  78. ANL    C ',' '/' expr    
  79. ANL    C ',' bit    
  80. ANL    C ',' expr    
  81. ANL    expr ',' '#' expr
  82. ANL    expr ','A
  83. .sp
  84. CJNE    A ',' '#' expr ',' expr    
  85. CJNE    A ',' expr ',' expr    
  86. CJNE    '@' REG ',' '#' expr ',' expr    R01
  87. CJNE    REG ',' '#' expr ',' expr    R07
  88. .sp
  89. CLR    A    
  90. CLR    C    
  91. CLR    bit
  92. CLR    expr
  93. .sp
  94. CPL    A    
  95. CPL    C    
  96. CPL    bit
  97. CPL    expr
  98. .sp
  99. DA    A    
  100. .sp
  101. DEC    '@' REG    R01
  102. DEC    A    
  103. DEC    REG    R07
  104. DEC    expr
  105. .sp
  106. DIV    AB    
  107. .sp
  108. DJNZ    REG ',' expr    R07
  109. DJNZ    expr ',' expr
  110. .sp
  111. INC    '@' REG    R01
  112. INC    A    
  113. INC    DPTR    
  114. INC    REG    R07
  115. INC    expr
  116. .sp
  117. JB    bit ',' expr
  118. JB    expr ',' expr
  119. .sp
  120. JBC    bit ',' expr
  121. JBC    expr ',' expr
  122. .sp
  123. JC    expr
  124. .sp
  125. JMP    '@' A '+' DPTR    
  126. .sp
  127. JNB    bit ',' expr
  128. JNB    expr ',' expr
  129. .sp
  130. JNC    expr
  131. .sp
  132. JNZ    expr
  133. .sp
  134. JZ    expr
  135. .sp
  136. LCALL    expr
  137. .sp
  138. LJMP    expr
  139. .sp
  140. MOV    '@' REG ',' '#' expr    R01
  141. MOV    '@' REG ',' A    R01
  142. MOV    '@' REG ',' expr    R01
  143. MOV    A ',' '#' expr    
  144. MOV    A ',' '@' REG    R01
  145. MOV    A ',' REG    R07
  146. MOV    A ',' expr    
  147. MOV    C ',' bit    
  148. MOV    C ',' expr    
  149. MOV    DPTR ',' '#' expr    
  150. MOV    REG ',' A    R07
  151. MOV    REG ',' '#' expr    R07
  152. MOV    REG ',' expr    R07
  153. MOV    bit ',' C    
  154. MOV    expr ',' '#' expr
  155. MOV    expr ',' '@' REG    R01
  156. MOV    expr ',' A    
  157. MOV    expr ',' C    
  158. MOV    expr ',' REG    R07
  159. MOV    expr ',' expr
  160. .sp
  161. MOVC    A ',' '@' A '+' DPTR    
  162. MOVC    A ',' '@' A '+' PC    
  163. .sp
  164. MOVX    '@' DPTR ',' A    
  165. MOVX    '@' REG ',' A    R01
  166. MOVX    A ',' '@' DPTR    
  167. MOVX    A ',' '@' REG    R01
  168. .sp
  169. MUL    AB    
  170. .sp
  171. NOP    
  172. .sp
  173. ORL    A ',' '#' expr    
  174. ORL    A ',' '@' REG    R01
  175. ORL    A ',' REG    R07
  176. ORL    A ',' expr    
  177. ORL    C ',' '/' bit    
  178. ORL    C ',' '/' expr    
  179. ORL    C ',' bit    
  180. ORL    C ',' expr    
  181. ORL    expr ',' '#' expr
  182. ORL    expr ',' A    
  183. .sp
  184. POP    expr
  185. .sp
  186. PUSH    expr
  187. .sp
  188. RET    
  189. .sp
  190. RETI    
  191. .sp
  192. RL    A    
  193. .sp
  194. RLC    A    
  195. .sp
  196. RR    A    
  197. .sp
  198. RRC    A    
  199. .sp
  200. SETB    C    
  201. SETB    bit
  202. SETB    expr
  203. .sp
  204. SJMP    expr
  205. .sp
  206. SUBB    A ',' '#' expr    
  207. SUBB    A ',' '@' REG    R01
  208. SUBB    A ',' REG    R07
  209. SUBB    A ',' expr    
  210. .sp
  211. SWAP    A    
  212. .sp
  213. XCH    A ',' '@' REG    R01
  214. XCH    A ',' REG    R07
  215. XCH    A ',' expr    
  216. .sp
  217. XCHD    A ',' '@' REG    R01
  218. .sp
  219. XRL    A ',' '#' expr    
  220. XRL    A ',' '@' REG    R01
  221. XRL    A ',' REG    R07
  222. XRL    A ',' expr    
  223. XRL    expr ',' '#' expr
  224. XRL    expr ',' A    
  225. .TE
  226. .H 3 "Selection Criteria Keywords"
  227. .VL 25 5 
  228. .LI R01
  229. Only the reserved symbols R0 and R1 (or r0, r1) are acceptable as
  230. the REG operand.
  231. .LI R07
  232. All the reserved symbols R0 thru R7 are acceptable as the REG operand.
  233. .LE
  234. .H 3 "Bit Operands"
  235. Bit Addresses can be in two forms.
  236. .P
  237. One form is "expression.constant" where expression gives an address for a 
  238. bit addressable register and constant (in the range of 0 to 7) gives the 
  239. bit number in the byte.
  240. Expression values must be either in the range of 20h to 2fh, or
  241. the multiples of 8 between 80h and f8h, and defined in the first pass.
  242. .P
  243. The second form is an symbolic expression with value between 0 and 255.
  244. The value of the expression is placed in the operand field of the
  245. instruction without modification.
  246. .H 3 "Apostrophes"
  247. The apostrophes in the syntax field are a notation used for the
  248. parser generator and are not put in the assembler source statement.
  249. .H 2 "Notes"
  250. .H 3 "Address Spaces"
  251. The Four address spaces, Program Memory, Internal Data Memory, Bit Numbers, 
  252. and External Data Memory are not differentiated in the symbol table.
  253. Which address space a symbol refers to is determined by the context of
  254. the instruction operands it appears in.
  255. .H 3 "Reserved Symbols"
  256. .H 4 "Machine Dependent Reserved Symbols"
  257. A
  258. AB
  259. C
  260. DPTR
  261. PC
  262. R0
  263. R1
  264. R2
  265. R3
  266. R4
  267. R5
  268. R6
  269. R7
  270. a
  271. ab
  272. c
  273. dptr
  274. pc
  275. r0
  276. r1
  277. r2
  278. r3
  279. r4
  280. r5
  281. r6
  282. r7
  283. .H 4 "Standard Reserved Symbols"
  284. AND
  285. DEFINED
  286. EQ
  287. GE
  288. GT
  289. HIGH
  290. LE
  291. LOW
  292. LT
  293. MOD
  294. NE
  295. NOT
  296. OR
  297. SHL
  298. SHR
  299. XOR
  300. and
  301. defined
  302. eq
  303. ge
  304. gt
  305. high
  306. le
  307. low
  308. lt
  309. mod
  310. ne
  311. not
  312. or
  313. shl
  314. shr
  315. xor
  316. .TC 1 1 7
  317.