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

  1. ----------------------------------------------------------------
  2. |                                                              |
  3. |                                                              |
  4. |                            Intel                             |
  5. |                                                              |
  6. |             88888      000      22222     22222              |
  7. |            8     8    0   0    2     2   2     2             |
  8. |            8     8   0   0 0        2         2              |
  9. |             88888    0  0  0     222       222               |
  10. |            8     8   0 0   0    2         2                  |
  11. |            8     8    0   0    2         2                   |
  12. |             88888      000     2222222   2222222             |
  13. |                                                              |
  14. |                8022 Single-Chip MICROCOMPUTER                |
  15. |                   Instruction Set Summary                    |
  16. |                                                              |
  17. |                                                              |
  18. |                                                              |
  19. |                                                              |
  20. |                    _________    _________                    |
  21. |                  _|         \__/         |_                  |
  22. |        <--> P26 |_|1                   40|_| Vcc (+5V)       |
  23. |                  _|                      |_                  |
  24. |        <--> P27 |_|2                   39|_| P25 <-->        |
  25. |                  _|                      |_                  |
  26. |            AVss |_|3                   38|_| P24 <-->        |
  27. |                  _|                      |_                  |
  28. |           Varef |_|4                   37|_| PROG -->        |
  29. |                  _|                      |_                  |
  30. |         --> AN1 |_|5                   36|_| P23 <-->        |
  31. |                  _|                      |_                  |
  32. |         --> AN0 |_|6                   35|_| P22 <-->        |
  33. |                  _|                      |_                  |
  34. |            AVcc |_|7                   34|_| P21 <-->        |
  35. |                  _|                      |_                  |
  36. |          --> T0 |_|8                   33|_| P20 <-->        |
  37. |                  _|                      |_                  |
  38. |             Vth |_|9                   32|_| P17 <-->        |
  39. |                  _|                      |_                  |
  40. |        <--> P00 |_|10       8022       31|_| P16 <-->        |
  41. |                  _|                      |_                  |
  42. |        <--> P01 |_|11                  30|_| P15 <-->        |
  43. |                  _|                      |_                  |
  44. |        <--> P02 |_|12                  29|_| P14 <-->        |
  45. |                  _|                      |_                  |
  46. |        <--> P03 |_|13                  28|_| P13 <-->        |
  47. |                  _|                      |_                  |
  48. |        <--> P04 |_|14                  27|_| P12 <-->        |
  49. |                  _|                      |_                  |
  50. |        <--> P05 |_|15                  26|_| P11 <-->        |
  51. |                  _|                      |_                  |
  52. |        <--> P06 |_|16                  25|_| P10 <-->        |
  53. |                  _|                      |_                  |
  54. |        <--> P07 |_|17                  24|_| RESET <--       |
  55. |                  _|                      |_                  |
  56. |         <-- ALE |_|18                  23|_| X1 <--          |
  57. |                  _|                      |_                  |
  58. |          <-- T1 |_|19                  22|_| X2 <--          |
  59. |                  _|                      |_                  |
  60. |       (GND) Vss |_|20                  21|_| SUBSTRATE       |
  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. |CPL  A    |37|-|G|1|Complement accumulator    |A=~A           |
  98. |CPL  C    |A7|*|G|1|Complement carry status   |C=~C           |
  99. |DA   A    |57|-|G|1|Decimal Adjust accumulator|A=BCD{A}       |
  100. |DEC  A    |07|-|G|1|Decrement accumulator     |A=A-1          |
  101. |DIS  I    |15|-|G|1|Disable external interrupt|               |
  102. |DIS  TCNTI|35|-|G|1|Disable timer interrupt   |               |
  103. |DJNZ rr,l |E8|-|H|2|Dec. and Jump if Non-Zero |rr=rr-1,if rr  |
  104. |EN   I    |05|-|G|1|Enable external interrupt |               |
  105. |EN   TCNTI|25|-|G|1|Enable timer interrupt    |               |
  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. |INC  @r   |10|-|B|1|Increment memory          |[r]=[r]+1      |
  110. |JC   l    |F6|-|K|2|Jump if Carry set         |If C=1         |
  111. |JMP  a    |04|-|F|2|Unconditional Jump        |PC=a           |
  112. |JMPP @A   |B3|-|G|2|Jump on accumulator       |PC=PC<8:11>+A  |
  113. |JNC  l    |E6|-|K|2|Jump if Not Carry         |If C=0         |
  114. |JNT0 l    |26|-|K|2|Jump if Not Test i/p #0   |If T0=0        |
  115. |JNT1 l    |46|-|K|2|Jump if Not Test i/p #1   |If T1=0        |
  116. |JNZ  l    |96|-|K|2|Jump if Not Zero          |If A<>0        |
  117. |JTF  l    |16|-|K|2|Jump if Timer Flag set    |If TF=1, TF=0  |
  118. |JT0  l    |36|-|K|2|Jump if Test i/p #0 set   |If T1=0        |
  119. |JT1  l    |56|-|K|2|Jump if Test i/p #1 set   |If T1=1        |
  120. |JZ   l    |C6|-|K|2|Jump if Zero              |If A=0         |
  121. |MOV  A,#n |23|-|C|2|Move from immediate       |A=n            |
  122. |MOV  A,rr |F8|-|A|1|Move from register        |A=rr           |
  123. |MOV  A,@r |F0|-|B|1|Move from memory          |A=[r]          |
  124. |MOV  A,T  |42|-|G|1|Move from timer           |A=T            |
  125. |MOV  rr,A |A8|-|A|1|Move to register          |rr=A           |
  126. |MOV  rr,#n|B8|-|L|2|Move immediate to register|rr=n           |
  127. |MOV  @r,A |A0|-|B|1|Move to memory            |[r]=A          |
  128. |MOV  @r,#n|B0|-|M|2|Move immediate to memory  |[r]=n          |
  129. |MOV  T,A  |62|-|G|1|Move to timer             |T=A            |
  130. |MOVD A,ep |0C|-|E|2|Move from expander port   |A=ep           |
  131. |MOVP A,@A |A3|-|G|1|2 |Move from memory       |A=[PC<8:11>+A] |
  132. |NOP       |00|-|G|1|No Operation              |               |
  133. |ORL  A,rr |48|-|A|1|OR Logical register       |A=Avrr         |
  134. |ORL  A,@r |40|-|B|1|OR Logical memory         |A=Av[r]        |
  135. |ORL  A,#n |43|-|C|2|OR Logical immediate      |A=Avn          |
  136. |ORLD ep,A |8C|-|E|2|OR Logical expander port  |ep=epvA        |
  137. |OUTL p,A  |38|-|I|2|Output to I/O port        |p=A            |
  138. |RAD       |80|-|G| |Read Analogue input       |A=A/D reg      |
  139. |RET       |83|-|G|2|Return from subroutine    |PC=[SP]-       |
  140. |RET  I    |93|*|G|2|Return from Interrupt     |{PC,PSW}=[SP]- |
  141. |RL   A    |E7|-|G|1|Rotate Left               |A={A}<-        |
  142. |RLC  A    |F7|*|G|1|Rotate Left thru Carry    |A={A,C}<-      |
  143. |RR   A    |77|-|G|1|Rotate Right              |A=->{A}        |
  144. |RRC  A    |67|*|G|1|Rotate Right thru Carry   |A=->{C,A}      |
  145. |SEL  AN0  |85|-|N|1|Select Analogue input #0  |               |
  146. |SEL  AN1  |95|-|N|1|Select Analogue input #1  |               |
  147. |STOP TCNT |65|-|G|1|Stop timer/counter        |               |
  148. |STRT CNT  |45|-|G|1|Start counter             |               |
  149. |STRT T    |55|-|G|1|Start timer               |               |
  150. |SWAP A    |47|-|G|1|Swap accumulator nibbles  |A<0:3><->A<4:7>|
  151. |XCH  A,rr |28|-|A|1|Exchange register         |A<->rr         |
  152. |XCH  A,@r |20|-|B|1|Exchange memory           |A<->[r]        |
  153. |XCHD A,@r |30|-|B|1|Exchange lower nibbles    |A<0:3><->[r<:>]|
  154. |XRL  A,rr |D8|-|A|1|Exclusive OR register     |A=Axrr         |
  155. |XRL  A,@r |D0|-|B|1|Exclusive OR memory       |A=Ax[r]        |
  156. |XRL  A,#n |D3|-|C|2|Exclusive OR immediate    |A=Axn          |
  157. |----------+--+-+-+-+------------------------------------------|
  158. |          |Op| | |~|Hex opcode/machine cycles                 |
  159. |          |  |C|F| |Carry flag/opcode format                  |
  160. ----------------------------------------------------------------
  161. ----------------------------------------------------------------
  162. |Mnemonic     |C|F| |Description                               |
  163. |-------------+-+-+-+------------------------------------------|
  164. |             |C| | |Carry flag                                |
  165. |             |-| | |Carry unaffected                          |
  166. |             |*| | |Carry affected                            |
  167. |             |0| | |Carry reset                               |
  168. |---------------+-+-+------------------------------------------|
  169. | -----nnn      |A| |nnn = R0/R1/R2/R3/R4/R5/R6/R7 (3 bits)    |
  170. | -------r      |B| |r   = R0/R1 (1 bit)                       |
  171. | -------- MM   |C| |MM  = 8 bits of immediate data            |
  172. | ------pp MM   |D| |pp  = P0/P1/P2/? (2 bits)                 |
  173. | ------ee      |E| |ee  = P4/P5/P6/P7 (2 bits)                |
  174. | xxx----- XX   |F| |xxx = high-order 3 bits of memory address |
  175. | --------      |G| |XX  = low-order 8 bits of memory address  |
  176. | -----nnn XX   |H| |nnn = as above                            |
  177. | ------qq      |I| |qq  = as pp above                         |
  178. | bbb----- XX   |J| |bbb = 3-bit bit number of accumulator     |
  179. | -------- XX   |K| |XX  = as above                            |
  180. | -----nnn MM   |L| |nnn = as above                            |
  181. | -------r MM   |M| |r   = as above                            |
  182. |-------------------+------------------------------------------|
  183. | A                 |Accumulator (8-bit)                       |
  184. | AN0               |Analogue Input #0                         |
  185. | AN1               |Analogue Input #1                         |
  186. | C                 |Carry flag (1-bit)                        |
  187. | CNT               |Event Counter                             |
  188. | I                 |Interrupt                                 |
  189. | IBF               |Input Buffer Full flag (1-bit)            |
  190. | OBF               |Output Buffer Full flag (1-bit)           |
  191. | P0                |I/O Port #0 (8-bit)                       |
  192. | P1                |I/O Port #1 (8-bit)                       |
  193. | P2                |I/O Port #2 (8-bit)                       |
  194. | PC                |Program Counter register (12-bit)         |
  195. | PSW               |Processor Status Word (8-bit)             |
  196. | Rn                |Registers (8-bit, n=0-7)                  |
  197. | Rn'               |Alternative Registers (8-bit, n=0-7)      |
  198. | SP                |Stack Pointer (3-bit)                     |
  199. | T                 |Timer                                     |
  200. | TCNT              |Timer/counter                             |
  201. | T0                |Test input #0                             |
  202. | T1                |Test input #1                             |
  203. |-------------------+------------------------------------------|
  204. | a                 |11-bit address quantity (0 to 2047)       |
  205. | ep                |8243 expander port P4, P5, P6 or P7       |
  206. | l                 |Low-order 8 bits of a memory address      |
  207. | n                 |8-bit data quantity (0 to 255)            |
  208. | p                 |I/O port P0, P1 or P2                     |
  209. | r                 |Register R0 or R1                         |
  210. | rr                |Register R0, R1, R2, R3, R4, R5, R6 or R7 |
  211. |-------------------+------------------------------------------|
  212. | +                 |Arithmetic addition                       |
  213. | -                 |Arithmetic subtraction                    |
  214. | &                 |Logical AND                               |
  215. | ~                 |Logical NOT                               |
  216. | v                 |Logical inclusive OR                      |
  217. | x                 |Logical exclusive OR                      |
  218. | <-                |Rotate left                               |
  219. | ->                |Rotate right                              |
  220. | <->               |Exchange                                  |
  221. | < >               |Bit number                                |
  222. | < : >             |Bit range                                 |
  223. | [ ]               |Indirect addressing                       |
  224. | [ ]+              |Indirect addressing auto-increment        |
  225. | -[ ]              |Auto-decrement indirect addressing        |
  226. | { }               |Combination of operands                   |
  227. |-------------------+------------------------------------------|
  228. | 00H to 07H        |General purpose registers R0-R7 (8-bit)   |
  229. | 08H to 17H        |Stack area S0-S7 (16-bit)                 |
  230. | 18H to 1FH        |Alternative registers R0'-R7' (8-bit)     |
  231. | 20H to 3FH        |General scratchpad memory area            |
  232. |--------------------------------------------------------------|
  233. |                                                              |
  234. |                                                              |
  235. |                                                              |
  236. |                                                              |
  237. |                                                              |
  238. |                                                              |
  239. |                                                              |
  240. ----------------------------------------------------------------
  241.