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

  1. .HM A 1 1 1 1 1 1
  2. .H 1 "Appendix for as8048 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 "Instruction Set Selection"
  47. .DS I N
  48. CPU string
  49. .DE
  50. The instruction set can be specified in the source file with the CPU 
  51. pseudooperation.
  52. The string, delimited by quotes or apostrophes, is scanned for a
  53. substring which selects which instruction set is used.
  54. When the program is invoked, this operation is performed on the name of
  55. the program, then the -p optional arguement, if any, and then any CPU
  56. statements.
  57. The last one selects which subset of the instructions the assembler will
  58. accept.
  59. The instruction set can be changed at any place in the source file. 
  60. .VL 30 5 1
  61. .LI "Instruction Set"
  62. Substrings
  63. .LI "80C48"
  64. C48 
  65. c48 
  66. C35 
  67. c35 
  68. .LI "80C49"
  69. C49
  70. c49 
  71. C39 
  72. c39 
  73. .LI "80C50"
  74. C50 
  75. c50 
  76. C40 
  77. c40 
  78. .LI "8048"
  79. 48 
  80. 35 
  81. .LI "8049"
  82. 49 
  83. 39 
  84. .LI "8050"
  85. 50 
  86. 40 
  87. .LI "8041"
  88. 41 
  89. .LI "8042"
  90. 42 
  91. .LE
  92. .H 4 "Register Set"
  93. .DS I N
  94. Label REGISTER expr 
  95. .DE
  96. .P
  97. The REGISTER statement is a version of the SET statement that checks that the
  98. value of its expression is a valid data register location for the current
  99. CPU selection.
  100. The REGISTER statement sets the symbol specified in the label field with the
  101. numeric value of the expression.
  102. The REGISTER statement can change the value of a symbol, but only if the
  103. symbol is originally defined in a previous SET or REGISTER statement.
  104. .DS I N
  105. Example
  106. .SP
  107. dtabl    register    32
  108.  
  109.     mov    r1, #dtabl
  110.     mov    a, @r1
  111. .DE
  112. .H 2 "Instructions"
  113. .H 3 "Instruction List"
  114. .TS H
  115. ;
  116. l l l.
  117. Opcode    Syntax    Selection Criteria
  118. .sp
  119. .TH
  120. .sp
  121. ADD     A ',' '#' expr    
  122. ADD     A ',' '@' REG    
  123. ADD     A ',' REG    
  124. .sp
  125. ADDC     A ',' '#' expr    
  126. ADDC     A ',' '@' REG    
  127. ADDC     A ',' REG    
  128. .sp
  129. ANL     A ',' '#' expr    
  130. ANL     A ',' '@' REG    
  131. ANL     A ',' REG    
  132. ANL     BUS ',' '#' expr    INSTNOT41
  133. ANL     P1 ',' '#' expr    
  134. ANL     P2 ',' '#' expr    
  135. .sp
  136. ANLD     P47 ',' A    
  137. .sp
  138. CALL     expr
  139. .sp
  140. CLR     A    
  141. CLR     C    
  142. CLR     F0    
  143. CLR     F1    
  144. .sp
  145. CPL     A    
  146. CPL     C    
  147. CPL     F0    
  148. CPL     F1    
  149. .sp
  150. DA     A    
  151. .sp
  152. DEC     A    
  153. DEC     REG
  154. .sp
  155. DIS     I    
  156. DIS     TCNTI    
  157. .sp
  158. DJNZ     REG ',' expr
  159. .sp
  160. EN     DMA    INST41
  161. EN     FLAGS    INST41
  162. EN     I    
  163. EN     TCNTI    
  164. .sp
  165. ENT0     CLK    INSTNOT41
  166. .sp
  167. HALT        INSTIDL
  168. .sp
  169. IDL        INSTIDL
  170. .sp
  171. IN     A ',' DBB    INST41
  172. IN     A ',' P1
  173. IN     A ',' P2    
  174. .sp
  175. INC     '@' REG
  176. INC     A    
  177. INC     REG
  178. .sp
  179. INS     A ',' BUS    INSTNOT41
  180. .sp
  181. JB0     expr
  182. .sp
  183. JB1     expr
  184. .sp
  185. JB2     expr
  186. .sp
  187. JB3     expr
  188. .sp
  189. JB4     expr
  190. .sp
  191. JB5     expr
  192. .sp
  193. JB6     expr
  194. .sp
  195. JB7     expr
  196. .sp
  197. JC     expr
  198. .sp
  199. JF0     expr
  200. .sp
  201. JF1     expr
  202. .sp
  203. JMP     expr
  204. .sp
  205. JMPP     '@' A    
  206. .sp
  207. JNC     expr
  208. .sp
  209. JNI     expr    INSTNOT41
  210. .sp
  211. JNIBF     expr    INST41
  212. .sp
  213. JNT0     expr
  214. .sp
  215. JNT1     expr
  216. .sp
  217. JNZ     expr
  218. .sp
  219. JOBF     expr    INST41
  220. .sp
  221. JT0     expr
  222. .sp
  223. JT1     expr
  224. .sp
  225. JTF     expr
  226. .sp
  227. JZ     expr
  228. .sp
  229. MOV     '@' REG ',' '#' expr
  230. MOV     '@' REG ',' A    
  231. MOV     A ',' '#' expr    
  232. MOV     A ',' '@' REG    
  233. MOV     A ',' PSW    
  234. MOV     A ',' T    
  235. MOV     A ',' REG    
  236. MOV     PSW ',' A    
  237. MOV     STS ',' A    
  238. MOV     T ',' A    
  239. MOV     REG ',' '#' expr
  240. MOV     REG ',' A    
  241. .sp
  242. MOVD     A ',' P47     
  243. MOVD     P47 ',' A    
  244. .sp
  245. MOVP3     A ',' '@' A    
  246. .sp
  247. MOVP     A ',' '@' A    
  248. .sp
  249. MOVX     '@' REG ',' A    INSTNOT41
  250. MOVX     A ',' '@' REG    INSTNOT41
  251. .sp
  252. NOP    
  253. .sp
  254. ORL     A ',' '#' expr    
  255. ORL     A ',' '@' REG    
  256. ORL     A ',' REG    
  257. ORL     BUS ',' '#' expr    INSTNOT41
  258. ORL     P1 ',' '#' expr    
  259. ORL     P2 ',' '#' expr    
  260. .sp
  261. ORLD     P47 ',' A    
  262. .sp
  263. OUT     DBB ',' A    INST41
  264. .sp
  265. OUTL     BUS ',' A    INSTNOT41
  266. OUTL     P1 ',' A    
  267. OUTL     P2 ',' A    
  268. .sp
  269. RET    
  270. .sp
  271. RETR    
  272. .sp
  273. RL     A    
  274. .sp
  275. RLC     A    
  276. .sp
  277. RR     A    
  278. .sp
  279. RRC     A    
  280. .sp
  281. SEL     MSELC    INSTNOT41
  282. SEL     RSELC
  283. .sp
  284. STOP     TCNT    
  285. .sp
  286. STRT     CNT    
  287. STRT     T    
  288. .sp
  289. SWAP     A    
  290. .sp
  291. XCH     A ',' '@' REG    
  292. XCH     A ',' REG    
  293. .sp
  294. XCHD     A ',' '@' REG    
  295. .sp
  296. XRL     A ',' '#' expr    
  297. XRL     A ',' '@' REG    
  298. XRL     A ',' REG    
  299. .TE
  300. .H 3 "Operands"
  301. .VL 25 5
  302. .LI REG
  303. REG can be any of r0, r1, r2, r3, r4, r5, r6, r7, unless proceeded by a
  304. '@' where only r0, and r1 are accepted.
  305. .LI MSELC
  306. MSELC represents the symbols mb0 and mb1.
  307. .LI RSELC
  308. RSELC represents the symbols rb0 and rb1.
  309. .LI P47
  310. P47 represents the symbols p4, p5, p6, p7.
  311. .LE
  312. .P
  313. There are uppercase versions of all the reserved symbols.
  314. .H 3 "Selection Criteria Keywords"
  315. .VL 25 5 
  316. .LI INSTIDL
  317. The instruction is only available on CMOS implementations.
  318. .LI INSTNOT41
  319. The instruction is not available in the 8041.
  320. .LI INST41
  321. The instruction is only available in the 8041.
  322. .LE
  323. .H 3 "Apostrophes"
  324. The apostrophes in the syntax field are a notation used for the
  325. parser generator and are not put in the assembler source statement.
  326. .H 2 "Notes"
  327. .H 3 "Reserved Symbols"
  328. .H 4 "Machine Dependent Reserved Symbols"
  329. A
  330. BUS
  331. C
  332. CLK
  333. CNT
  334. DBB
  335. DMA
  336. F0
  337. F1
  338. FLAGS
  339. I
  340. MB0
  341. MB1
  342. P1
  343. P2
  344. P4
  345. P5
  346. P6
  347. P7
  348. PSW
  349. R0
  350. R1
  351. R2
  352. R3
  353. R4
  354. R5
  355. R6
  356. R7
  357. RB0
  358. RB1
  359. STS
  360. T
  361. TCNT
  362. TCNTI
  363. a
  364. bus
  365. c
  366. clk
  367. cnt
  368. dbb
  369. dma
  370. f0
  371. f1
  372. flags
  373. i
  374. mb0
  375. mb1
  376. p1
  377. p2
  378. p4
  379. p5
  380. p6
  381. p7
  382. psw
  383. r0
  384. r1
  385. r2
  386. r3
  387. r4
  388. r5
  389. r6
  390. r7
  391. rb0
  392. rb1
  393. sts
  394. t
  395. tcnt
  396. tcnti
  397. .H 4 "Standard Reserved Symbols"
  398. AND
  399. DEFINED
  400. EQ
  401. GE
  402. GT
  403. HIGH
  404. LE
  405. LOW
  406. LT
  407. MOD
  408. NE
  409. NOT
  410. OR
  411. SHL
  412. SHR
  413. XOR
  414. and
  415. defined
  416. eq
  417. ge
  418. gt
  419. high
  420. le
  421. low
  422. lt
  423. mod
  424. ne
  425. not
  426. or
  427. shl
  428. shr
  429. xor
  430. .TC 1 1 7
  431.