home *** CD-ROM | disk | FTP | other *** search
/ messroms.de / 2007-01-13_www.messroms.de.zip / CPU / 8021 < prev    next >
Text File  |  2007-01-13  |  16KB  |  241 lines

  1. ----------------------------------------------------------------
  2. |                                                              |
  3. |                                                              |
  4. |                            Intel                             |
  5. |                                                              |
  6. |               88888      000      22222     1                |
  7. |              8     8    0   0    2     2   11                |
  8. |              8     8   0   0 0        2     1                |
  9. |               88888    0  0  0     222      1                |
  10. |              8     8   0 0   0    2         1                |
  11. |              8     8    0   0    2          1                |
  12. |               88888      000     2222222   111               |
  13. |                                                              |
  14. |                8021 Single-Chip MICROCOMPUTER                |
  15. |                   Instruction Set Summary                    |
  16. |                                                              |
  17. |                                                              |
  18. |                                                              |
  19. |                                                              |
  20. |                                                              |
  21. |                                                              |
  22. |                                                              |
  23. |                                                              |
  24. |                                                              |
  25. |                                                              |
  26. |                    _________    _________                    |
  27. |                  _|         \__/         |_                  |
  28. |        <--> P22 |_|1                   28|_| Vcc (+5V)       |
  29. |                  _|                      |_                  |
  30. |        <--> P23 |_|2                   27|_| P21 <-->        |
  31. |                  _|                      |_                  |
  32. |        <-- PSEN |_|3                   26|_| P20 <-->        |
  33. |                  _|                      |_                  |
  34. |        <--> P00 |_|4                   25|_| P17 <-->        |
  35. |                  _|                      |_                  |
  36. |        <--> P01 |_|5                   24|_| P16 <-->        |
  37. |                  _|                      |_                  |
  38. |        <--> P02 |_|6                   23|_| P15 <-->        |
  39. |                  _|                      |_                  |
  40. |        <--> P03 |_|7        8021       22|_| P14 <-->        |
  41. |                  _|                      |_                  |
  42. |        <--> P04 |_|8                   21|_| P13 <-->        |
  43. |                  _|                      |_                  |
  44. |        <--> P05 |_|9                   20|_| P12 <-->        |
  45. |                  _|                      |_                  |
  46. |        <--> P06 |_|10                  19|_| P11 <-->        |
  47. |                  _|                      |_                  |
  48. |        <--> P07 |_|11                  18|_| P10 <-->        |
  49. |                  _|                      |_                  |
  50. |         <-- ALE |_|12                  17|_| RESET <--       |
  51. |                  _|                      |_                  |
  52. |          --> T1 |_|13                  16|_| XTAL2 <--       |
  53. |                  _|                      |_                  |
  54. |       (GND) Vss |_|14                  15|_| XTAL1 <--       |
  55. |                   |______________________|                   |
  56. |                                                              |
  57. |                                                              |
  58. |                                                              |
  59. |                                                              |
  60. |                                                              |
  61. |                                                              |
  62. |                                                              |
  63. |                                                              |
  64. |                                                              |
  65. |                                                              |
  66. |                                                              |
  67. |                                                              |
  68. |Written by     Jonathan Bowen                                 |
  69. |               Programming Research Group                     |
  70. |               Oxford University Computing Laboratory         |
  71. |               8-11 Keble Road                                |
  72. |               Oxford OX1 3QD                                 |
  73. |               England                                        |
  74. |                                                              |
  75. |               Tel +44-865-273840                             |
  76. |                                                              |
  77. |Created        May 1983                                       |
  78. |Updated        April 1985                                     |
  79. |Issue          1.1                Copyright (C) J.P.Bowen 1985|
  80. ----------------------------------------------------------------
  81. ----------------------------------------------------------------
  82. |Mnemonic  |Op|C|F|~|Description               |Notes          |
  83. |----------+--+-+-+-+--------------------------+---------------|
  84. |ADD  A,rr |68|*|A|1|Add register              |A=A+rr         |
  85. |ADD  A,@r |60|*|B|1|Add memory                |A=A+[r]        |
  86. |ADD  A,#n |03|*|C|2|Add immediate             |A=A+n          |
  87. |ADDC A,rr |78|*|A|1|Add with Carry register   |A=A+rr+C       |
  88. |ADDC A,@r |70|*|B|1|Add with Carry memory     |A=A+[r]+C      |
  89. |ADDC A,#n |13|*|C|2|Add with Carry immediate  |A=A+n+C        |
  90. |ANL  A,rr |58|-|A|1|AND Logical register      |A=A&rr         |
  91. |ANL  A,@r |50|-|B|1|AND Logical memory        |A=A&[r]        |
  92. |ANL  A,#n |53|-|C|2|AND Logical Immediate     |A=A&n          |
  93. |ANLD ep,A |9C|-|E|2|AND Logical expander port |ep=ep&A        |
  94. |CALL a    |14|-|F|2|Call subroutine           |[SP]+={PSW,PC},|
  95. |CLR  A    |27|-|G|1|Clear accumulator         |A=0        PC=a|
  96. |CLR  C    |97|0|G|1|Clear carry status        |C=0            |
  97. |CLR  F0   |85|-|G|1|Clear flag #0             |F0=0           |
  98. |CLR  F1   |A5|-|G|1|Clear flag #1             |F1=0           |
  99. |CPL  A    |37|-|G|1|Complement accumulator    |A=~A           |
  100. |CPL  C    |A7|*|G|1|Complement carry status   |C=~C           |
  101. |CPL  F0   |95|-|G|1|Complement flag #0        |F0=~F0         |
  102. |CPL  F1   |B5|-|G|1|Complement flag #1        |F1=~F1         |
  103. |DA   A    |57|-|G|1|Decimal Adjust accumulator|A=BCD{A}       |
  104. |DEC  A    |07|-|G|1|Decrement accumulator     |A=A-1          |
  105. |DJNZ rr,l |E8|-|H|2|Dec. and Jump if Non-Zero |rr=rr-1,if rr  |
  106. |IN   A,p  |08|-|I|2|Input from I/O port       |A=p            |
  107. |INC  A    |17|-|G|1|Increment accumulator     |A=A+1          |
  108. |INC  rr   |18|-|A|1|Increment register        |rr=rr+1        |
  109. |JC   l    |F6|-|K|2|Jump if Carry set         |If C=1         |
  110. |JMP  a    |04|-|F|2|Unconditional Jump        |PC=a           |
  111. |JMPP @A   |B3|-|G|2|Jump on accumulator       |PC=PC<8:11>+A  |
  112. |JNC  l    |E6|-|K|2|Jump if Not Carry         |If C=0         |
  113. |JNZ  l    |96|-|K|2|Jump if Not Zero          |If A<>0        |
  114. |JTF  l    |16|-|K|2|Jump if Timer Flag set    |If TF=1, TF=0  |
  115. |JT1  l    |56|-|K|2|Jump if Test i/p #1 set   |If T1=1        |
  116. |JZ   l    |C6|-|K|2|Jump if Zero              |If A=0         |
  117. |MOV  A,#n |23|-|C|2|Move from immediate       |A=n            |
  118. |MOV  A,rr |F8|-|A|1|Move from register        |A=rr           |
  119. |MOV  A,@r |F0|-|B|1|Move from memory          |A=[r]          |
  120. |MOV  A,T  |42|-|G|1|Move from timer           |A=T            |
  121. |MOV  rr,A |A8|-|A|1|Move to register          |rr=A           |
  122. |MOV  rr,#n|B8|-|L|2|Move immediate to register|rr=n           |
  123. |MOV  @r,A |A0|-|B|1|Move to memory            |[r]=A          |
  124. |MOV  @r,#n|B0|-|M|2|Move immediate to memory  |[r]=n          |
  125. |MOV  T,A  |62|-|G|1|Move to timer             |T=A            |
  126. |MOVD A,ep |0C|-|E|2|Move from expander port   |A=ep           |
  127. |MOVD ep,A |3C|-|E|2|Move to expander port     |ep=A           |
  128. |MOVP A,@A |A3|-|G|1|2|Move from memory        |A=[PC<8:11>+A] |
  129. |NOP       |00|-|G|1|No Operation              |               |
  130. |ORL  A,rr |48|-|A|1|OR Logical register       |A=Avrr         |
  131. |ORL  A,@r |40|-|B|1|OR Logical memory         |A=Av[r]        |
  132. |ORL  A,#n |43|-|C|2|OR Logical immediate      |A=Avn          |
  133. |ORLD ep,A |8C|-|E|2|OR Logical expander port  |ep=epvA        |
  134. |OUTL p,A  |38|-|I|2|Output to I/O port        |p=A            |
  135. |RET       |83|-|G|2|Return from subroutine    |PC=[SP]-       |
  136. |RL   A    |E7|-|G|1|Rotate Left               |A={A}<-        |
  137. |RLC  A    |F7|*|G|1|Rotate Left thru Carry    |A={A,C}<-      |
  138. |RR   A    |77|-|G|1|Rotate Right              |A=->{A}        |
  139. |RRC  A    |67|*|G|1|Rotate Right thru Carry   |A=->{C,A}      |
  140. |STOP TCNT |65|-|G|1|Stop timer/counter        |               |
  141. |STRT CNT  |45|-|G|1|Start counter             |               |
  142. |STRT T    |55|-|G|1|Start timer               |               |
  143. |SWAP A    |47|-|G|1|Swap accumulator nibbles  |A<0:3><->A<4:7>|
  144. |XCH  A,rr |28|-|A|1|Exchange register         |A<->rr         |
  145. |XCH  A,@r |20|-|B|1|Exchange memory           |A<->[r]        |
  146. |XCHD A,@r |30|-|B|1|Exchange lower nibbles    |A<0:3><->[r<:>]|
  147. |XRL  A,rr |D8|-|A|1|Exclusive OR register     |A=Axrr         |
  148. |XRL  A,@r |D0|-|B|1|Exclusive OR memory       |A=Ax[r]        |
  149. |XRL  A,#n |D3|-|C|2|Exclusive OR immediate    |A=Axn          |
  150. |----------+--+-+-+-+------------------------------------------|
  151. |Mnemonic  |  | | | |Assembler mnemonic                        |
  152. |          |Op| | | |Hex opcode                                |
  153. |          |  |C| | |Carry flag                                |
  154. |          |  | |F| |Opcode format                             |
  155. |          |  | | |~|Machine cycles                            |
  156. |-------------+-+---+------------------------------------------|
  157. |             |-|   |Carry unaffected                          |
  158. |             |*|   |Carry affected                            |
  159. |             |0|   |Carry reset                               |
  160. ----------------------------------------------------------------
  161. ----------------------------------------------------------------
  162. |Mnemonic       |F| |Description                               |
  163. |---------------+-+-+------------------------------------------|
  164. | -----nnn      |A| |nnn = R0/R1/R2/R3/R4/R5/R6/R7 (3 bits)    |
  165. | -------r      |B| |r   = R0/R1 (1 bit)                       |
  166. | -------- MM   |C| |MM  = 8 bits of immediate data            |
  167. | ------pp MM   |D| |pp  = 01 for P1 or 10 for P2 (2 bits)     |
  168. | ------ee      |E| |ee  = P4/P5/P6/P7 (2 bits)                |
  169. | xxx----- XX   |F| |xxx = high-order 3 bits of memory address |
  170. | --------      |G| |XX  = low-order 8 bits of memory address  |
  171. | -----nnn XX   |H| |nnn = as above                            |
  172. | ------qq      |I| |qq  = as pp above                         |
  173. | bbb----- XX   |J| |bbb = 3-bit bit number of accumulator     |
  174. | -------- XX   |K| |XX  = as above                            |
  175. | -----nnn MM   |L| |nnn = as above                            |
  176. | -------r MM   |M| |r   = as above                            |
  177. |-------------------+------------------------------------------|
  178. | A                 |Accumulator (8-bit)                       |
  179. | IBF               |Input Buffer Full flag (1-bit)            |
  180. | OBF               |Output Buffer Full flag (1-bit)           |
  181. | P1                |I/O Ports #1 (8-bit)                      |
  182. | P2                |I/O Ports #2 (8-bit)                      |
  183. | PC                |Program Counter register (12-bit)         |
  184. | PORT              |I/O Port P1 and P2                        |
  185. | PSW               |Processor Status Word (8-bit)             |
  186. | Rn                |Registers (8-bit, n=0-7)                  |
  187. | Rn'               |Alternative Registers (8-bit, n=0-7)      |
  188. | T1                |Test input                                |
  189. |-------------------+------------------------------------------|
  190. | a                 |11-bit address quantity (0 to 2047)       |
  191. | ep                |8243 expander port P4, P5, P6 or P7       |
  192. | k                 |1-bit data quantity (0 or 1)              |
  193. | l                 |Low-order 8 bits of a memory address      |
  194. | n                 |8-bit data quantity (0 to 255)            |
  195. | p                 |I/O port P1 or P2                         |
  196. | pp                |I/O port PORT, P1 or P2                   |
  197. | r                 |Register R0 or R1                         |
  198. | rr                |Register R0, R1, R2, R3, R4, R5, R6 or R7 |
  199. |-------------------+------------------------------------------|
  200. | +                 |Arithmetic addition                       |
  201. | -                 |Arithmetic subtraction                    |
  202. | &                 |Logical AND                               |
  203. | ~                 |Logical NOT                               |
  204. | v                 |Logical inclusive OR                      |
  205. | x                 |Logical exclusive OR                      |
  206. | <-                |Rotate left                               |
  207. | ->                |Rotate right                              |
  208. | <->               |Exchange                                  |
  209. | < >               |Bit number                                |
  210. | < : >             |Bit range                                 |
  211. | [ ]               |Indirect addressing                       |
  212. | [ ]+              |Indirect addressing auto-increment        |
  213. | -[ ]              |Auto-decrement indirect addressing        |
  214. | { }               |Combination of operands                   |
  215. |-------------------+------------------------------------------|
  216. | 00H to 07H        |General purpose registers R0-R7 (8-bit)   |
  217. | 08H to 17H        |Stack area S0-S7 (16-bit)                 |
  218. | 18H to 1FH        |Alternative registers R0'-R7' (8-bit)     |
  219. | 20H to 3FH        |General scratchpad memory area            |
  220. |--------------------------------------------------------------|
  221. |                                                              |
  222. |                                                              |
  223. |                                                              |
  224. |                                                              |
  225. |                                                              |
  226. |                                                              |
  227. |                                                              |
  228. |                                                              |
  229. |                                                              |
  230. |                                                              |
  231. |                                                              |
  232. |                                                              |
  233. |                                                              |
  234. |                                                              |
  235. |                                                              |
  236. |                                                              |
  237. |                                                              |
  238. |                                                              |
  239. |                                                              |
  240. ----------------------------------------------------------------
  241.