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

  1. ----------------------------------------------------------------
  2. |                                                              |
  3. |                                                              |
  4. |                           Motorola                           |
  5. |                                                              |
  6. |                666      88888      000      1                |
  7. |               6        8     8    0   0    11                |
  8. |              6         8     8   0   0 0    1                |
  9. |              666666     88888    0  0  0    1                |
  10. |              6     6   8     8   0 0   0    1                |
  11. |              6     6   8     8    0   0     1                |
  12. |               66666     88888      000     111               |
  13. |                                                              |
  14. |             6801/68701 Single-Chip MICROCOMPUTER             |
  15. |                   Instruction Set Summary                    |
  16. |                                                              |
  17. |                                                              |
  18. |                                                              |
  19. |                                                              |
  20. |                    _________    _________                    |
  21. |                  _|         \__/         |_                  |
  22. |             Vcc |_|1                   40|_| E -->           |
  23. |                  _|                      |_                  |
  24. |     Vcc Standby |_|2                   39|_| SC1 <-->        |
  25. |                  _|                      |_                  |
  26. |         --> CC1 |_|3                   38|_| SC2 -->         |
  27. |                  _|                      |_                  |
  28. |         --> CC2 |_|4                   37|_| P30 <-->        |
  29. |           _____  _|                      |_                  |
  30. |       --> Reset |_|5                   36|_| P31 <-->        |
  31. |             ___  _|                      |_                  |
  32. |         --> IRQ |_|6                   35|_| P32 <-->        |
  33. |             ___  _|                      |_                  |
  34. |         --> NMI |_|7                   34|_| P33 <-->        |
  35. |                  _|                      |_                  |
  36. |        <--> P10 |_|8                   33|_| P34 <-->        |
  37. |                  _|                      |_                  |
  38. |        <--> P11 |_|9                   32|_| P35 <-->        |
  39. |                  _|                      |_                  |
  40. |        <--> P12 |_|10       6801       31|_| P36 <-->        |
  41. |                  _|                      |_                  |
  42. |        <--> P13 |_|11                  30|_| P37 <-->        |
  43. |                  _|                      |_                  |
  44. |        <--> P14 |_|12                  29|_| P41 <-->        |
  45. |                  _|                      |_                  |
  46. |        <--> P15 |_|13                  28|_| P41 <-->        |
  47. |                  _|                      |_                  |
  48. |        <--> P16 |_|14                  27|_| P42 <-->        |
  49. |                  _|                      |_                  |
  50. |        <--> P17 |_|15                  26|_| P43 <-->        |
  51. |                  _|                      |_                  |
  52. |        <--> P20 |_|16                  25|_| P44 <-->        |
  53. |                  _|                      |_                  |
  54. |        <--> P21 |_|17                  24|_| P45 <-->        |
  55. |                  _|                      |_                  |
  56. |        <--> P22 |_|18                  23|_| P46 <-->        |
  57. |                  _|                      |_                  |
  58. |        <--> P23 |_|19                  22|_| P47 <-->        |
  59. |                  _|                      |_                  |
  60. |        <--> P24 |_|20                  21|_| Vss             |
  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        September 1981                                 |
  78. |Updated        April 1985                                     |
  79. |Issue          1.5                Copyright (C) J.P.Bowen 1985|
  80. ----------------------------------------------------------------
  81. ----------------------------------------------------------------
  82. |Mnem. |Op|HINZVC|IEXD#R|Description              |Notes       |
  83. |------+--+------+------+-------------------------+------------|
  84. |ABA   |1B|*-****|X     |Add accumulators         |A=A+B       |
  85. |ABX   |3A|------|X     |Add registers            |X=X+B       |
  86. |ADCr s|B9|*-****| XXXX |Add with Carry           |r=r+s+C     |
  87. |ADDr s|BB|*-****| XXXX |Add                      |r=r+s       |
  88. |ADDD s|F3|--****| XXX* |Add Double accumulator   |D=D+s       |
  89. |ANDr s|B4|--**0-| XXXX |Logical AND              |r=r&s       |
  90. |ASL  d|78|--****| XX   |Arithmetic Shift Left    |d=d*2       |
  91. |ASLr  |48|--****|X     |Arithmetic Shift Left    |r=r*2       |
  92. |ASLD  |05|--****|X     |Arithmetic Shift Left    |D=D*2       |
  93. |ASR  d|77|--****| XX   |Arithmetic Shift Right   |d=d/2       |
  94. |ASRr  |47|--****|X     |Arithmetic Shift Right   |r=r/2       |
  95. |BCC  a|24|------|     X|Branch if Carry Clear    |If C=0      |
  96. |BCS  a|25|------|     X|Branch if Carry Set      |If C=1      |
  97. |BEQ  a|27|------|     X|Branch if Equal          |If Z=1      |
  98. |BGE  a|2C|------|     X|Branch if Greater/Equal  |If NxV=0    |
  99. |BGT  a|2E|------|     X|Branch if Greater Than   |If Zv{NxV}=0|
  100. |BHI  a|22|------|     X|Branch if Higher         |If CvZ=0    |
  101. |BHS  a|24|------|     X|Branch if Higher or Same |If C=0      |
  102. |BITr s|B5|--**0-| XXXX |Bit Test                 |r&s         |
  103. |BLE  a|2F|------|     X|Branch if Less or Equal  |If Zv{NxV}=0|
  104. |BLO  a|25|------|     X|Branch if Lower          |If C=1      |
  105. |BLS  a|23|------|     X|Branch if Lower or Same  |If CvZ=1    |
  106. |BLT  a|2D|------|     X|Branch if Less Than      |If NxV=1    |
  107. |BMI  a|2B|------|     X|Branch if Minus          |If N=1      |
  108. |BNE  a|26|------|     X|Branch if Not Equal      |If Z=0      |
  109. |BPL  a|2A|------|     X|Branch if Plus           |If N=0      |
  110. |BRA  a|20|------|     X|Branch Always            |PC=a        |
  111. |BRN  a|21|------|     X|Branch Never             |No op       |
  112. |BSR  a|8D|------|     X|Branch to Subroutine     |-[S]=PC,PC=a|
  113. |BVC  a|28|------|     X|Branch if Overflow Clear |If V=0      |
  114. |BVS  a|29|------|     X|Branch if Overflow Set   |If V=1      |
  115. |CBA   |11|--****|X     |Compare accumulators     |A-B         |
  116. |CLC   |0C|-----0|X     |Clear Carry              |C=0         |
  117. |CLI   |0E|-0----|X     |Clear Interrupt Mask     |I=0         |
  118. |CLR  d|7F|--0100| XX   |Clear                    |d=0         |
  119. |CLRr  |4F|--0100|X     |Clear accumulator        |r=0         |
  120. |CLV   |0A|----0-|X     |Clear Overflow           |V=0         |
  121. |CMPr s|B1|--****| XXXX |Compare                  |r-s         |
  122. |COM  d|63|--**01| XX   |Complement               |d=~d        |
  123. |COMr  |43|--**01|X     |Complement accumulator   |r=~r        |
  124. |CPX  s|BC|--****| XXX* |Compare Index Register   |X-s         |
  125. |DAA   |19|--****|X     |Decimal Adjust Acc.      |A=BCD format|
  126. |DEC  d|7A|--**?-| XX   |Decrement                |d=d-1       |
  127. |DECr  |4A|--**?-|X     |Decrement accumulator    |r=r-1       |
  128. |DES   |34|------|X     |Decrement Stack Pointer  |S=S-1       |
  129. |DEX   |09|---*--|X     |Decrement Index Register |X=X-1       |
  130. |EORr s|B8|--**0-| XXXX |Logical Exclusive OR     |r=rxs       |
  131. |INC  d|7C|--**?-| XX   |Increment                |d=d+1       |
  132. |INCr  |4C|--**?-|X     |Increment accumulator    |r=r+1       |
  133. |INS   |31|------|X     |Increment Stack Pointer  |S=S+1       |
  134. |INX   |08|---*--|X     |Increment Index Register |X=X+1       |
  135. |JMP  d|7E|------| XX   |Jump                     |PC=d        |
  136. |JSR  d|BD|------| XX   |Jump to Subroutine       |-[S]=PC,PC=d|
  137. |LDAr s|B6|--**0-| XXXX |Load Accumulator         |r=s         |
  138. |LDD  s|FC|--**0-| XXX* |Load Double accumulator  |D=s         |
  139. |LDS  s|BE|--**0-| XXX* |Load Stack Pointer       |S=s         |
  140. |LDX  s|FE|--**0-| XXX* |Load Index Register      |X=s         |
  141. |LSR  d|74|--0***| XX   |Logical Shift Right      |d=->{0,d,C} |
  142. |LSRr  |44|--0***|X     |Logical Shift Right      |r=->{0,r,C} |
  143. |LSRD  |04|--0***|X     |Logical Shift Right      |D=->{0,D,C} |
  144. |MUL   |3D|-----*|X     |Multiply                 |D=A*B       |
  145. |NEG  d|70|--****| XX   |Negate                   |d=-d        |
  146. |NEGr  |40|--****|X     |Negate accumulator       |r=-r        |
  147. |NOP   |01|------|X     |No Operation             |            |
  148. |ORAr s|BA|--**0-| XXXX |Logical inclusive OR     |r=rvs       |
  149. |PSHA  |36|------|X     |Push                     |-[S]=A      |
  150. |PSHB  |37|------|X     |Push                     |-[S]=B      |
  151. |PSHX  |3C|------|X     |Push Index Register      |-[S]=X      |
  152. |PULA  |32|------|X     |Pull                     |A=[S]+      |
  153. |PULB  |33|------|X     |Pull                     |B=[S]+      |
  154. |PULX  |38|------|X     |Pull Index Register      |X=[S]+      |
  155. |ROL  d|79|--**?*| XX   |Rotate Left              |d={C,d}<-   |
  156. |ROLr  |49|--**?*|X     |Rotate Left accumulator  |r={C,r}<-   |
  157. |ROR  d|76|--**?*| XX   |Rotate Right             |d=->{C,d}   |
  158. |RORr  |46|--**?*|X     |Rotate Right accumulator |r=->{C,r}   |
  159. |RTI   |3B|??????|X     |Return from Interrupt    |{regs}=[S]+ |
  160. ----------------------------------------------------------------
  161. ----------------------------------------------------------------
  162. |Mnem. |Op|HINZVC|IEXD#R|Description              |Notes       |
  163. |------+--+------+------+-+-----------------------+------------|
  164. |RTS   |39|------|X     |Return from Subroutine   |PC=[S]+     |
  165. |SBA   |10|--****|X     |Subtract accumulators    |A=A-B       |
  166. |SBCr s|B2|--****| XXXX |Subtract with Carry      |r=r-s-C     |
  167. |SEC   |0D|-----1|X     |Set Carry                |C=1         |
  168. |SEI   |0F|-1----|X     |Set Interrupt Mask       |I=1         |
  169. |SEV   |0B|----1-|X     |Set Overflow             |V=1         |
  170. |STAr d|B7|--**0-| XXX  |Store Accumulator        |d=r         |
  171. |STD  d|FD|--**0-| XXX  |Store Double accumulator |D=r         |
  172. |STS  d|BF|--**0-| XXX  |Store Stack Pointer      |d=S         |
  173. |STX  d|FF|--**0-| XXX  |Store Index Register     |d=X         |
  174. |SUBr s|B0|--****| XXXX |Subtract                 |r=r-s       |
  175. |SUBD s|B3|--****| XXX* |Subtract Double acc.     |D=D-s       |
  176. |SWI   |3F|-1----|X     |Software Interrupt       |-[S]={regs} |
  177. |TAB   |17|--**0-|X     |Transfer accumulators    |B=A         |
  178. |TAP   |06|******|X     |Transfer to CCR          |P=A         |
  179. |TBA   |17|--**0-|X     |Transfer accumulators    |A=B         |
  180. |TPA   |07|------|X     |Transfer from CCR        |A=P         |
  181. |TST  s|7D|--**00| XX   |Test                     |s           |
  182. |TSTr  |4D|--**00|X     |Test accumulator         |r           |
  183. |TSX   |30|------|X     |Transfer Stack Pointer   |X=S         |
  184. |TXS   |35|------|X     |Transfer Index Register  |S=X         |
  185. |WAI   |3E|-*----|X     |Wait for Interrupt       |-[S]={regs} |
  186. |---------+------+------+--------------------------------------|
  187. | CCR     |-*01? |      |Unaffected/affected/reset/set/unknown |
  188. | H       |H     |      |Half carry (Bit 5)                    |
  189. | I       | I    |      |Interrupt mask (Bit 4)                |
  190. | N       |  N   |      |Negative (Bit 3)                      |
  191. | Z       |   Z  |      |Zero (Bit 2)                          |
  192. | V       |    V |      |Overflow (Bit 1)                      |
  193. | C       |     C|      |Carry (Bit 0)                         |
  194. |----------------+------+--------------------------------------|
  195. | r              |I     |Inherent (A:Op=4XH/BXH, B:Op=5XH/FXH) |
  196. | nn,E           | E    |Extended (Op=E, ~s=e)                 |
  197. | nn,X           |  X   |Index (Op=E-10H, ~s=e+1, JSR ~s=e-1)  |
  198. | n,D            |   D  |Direct (Op=E-20H, ~s=e-1)             |
  199. | #n             |    # |Immediate (8-bit, Op=E-30H, ~s=e-2)   |
  200. | #nn            |    * |Immediate (16-bit, Op=E-30H, ~s=e-2)  |
  201. | a              |     R|Relative (PC=PC+2+offset)             |
  202. | r              |      |Inherent (r=A,Op=BXH, r=B,Op=FXH)     |
  203. |-----------------------+--------------------------------------|
  204. |DIRECT                 |Direct addressing mode                |
  205. |EXTEND                 |Extended addressing mode              |
  206. |FCB      n             |Form Constant Byte                    |
  207. |FCC      'string'      |Form Constant Characters              |
  208. |FDB      nn            |Form Double Byte                      |
  209. |RMB      nn            |Reserve Memory Bytes                  |
  210. |-----------------------+--------------------------------------|
  211. | A  B                  |Accumulators (8-bit, r=A/B,Op=BXH/FXH)|
  212. | D                     |A and B combined (16-bit, A hi, B lo) |
  213. | P                     |Condition Code Register (8-bit, CCR)  |
  214. | PC                    |Program Counter (16-bit)              |
  215. | S                     |Stack Pointer (16-bit)                |
  216. | X                     |Index Register (16-bit)               |
  217. |-----------------------+--------------------------------------|
  218. | a                     |Relative address (-125 to +129)       |
  219. | d  s                  |Destination/source                    |
  220. | n  nn                 |8/16-bit expression (0 to 255/65535)  |
  221. | r                     |Accumulator register A or B           |
  222. | +  -  *  /            |Add/subtract/multiply/divide          |
  223. | &  ~  v  x            |AND/NOT/inclusive OR/exclusive OR     |
  224. | <-  ->                |Rotate left/right                     |
  225. | [ ]  [ ]+  -[ ]       |Indirect address/increment/decrement  |
  226. | { }  {regs}           |Combination of operands/{PC,X,A,B,P}  |
  227. |-----------------------+--------------------------------------|
  228. | 0000H to 001FH        |Internal registers                    |
  229. | 0080H to 00FFH        |128 bytes of internal RAM             |
  230. | F800H to FFFFH        |2K bytes of internal ROM/EPROM        |
  231. | FFF0H to FFFFH        |Interrupt vectors                     |
  232. | FFF0H to FFF1H        |IRQ2 serial I/O interrupt vector      |
  233. | FFF2H to FFF3H        |IRQ2 timer overflow vector            |
  234. | FFF4H to FFF5H        |IRQ2 timer output compare vector      |
  235. | FFF6H to FFF7H        |IRQ2 timer input capture vector       |
  236. | FFF8H to FFF9H        |IRQ1 interrupt strobe 3 vector        |
  237. | FFFAH to FFFBH        |SWI instruction interrupt vector      |
  238. | FFFCH to FFFDH        |Non-maskable interrupt vector         |
  239. | FFFEH to FFFFH        |Reset vector                          |
  240. ----------------------------------------------------------------
  241.