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

  1. ----------------------------------------------------------------
  2. |                                                              |
  3. |                                                              |
  4. |                      Texas Instruments                       |
  5. |                                                              |
  6. |             99999     99999        4       000               |
  7. |            9     9   9     9      44      0   0              |
  8. |            9     9   9     9     4 4     0   0 0             |
  9. |             999999    999999    4  4     0  0  0             |
  10. |                  9         9   4444444   0 0   0             |
  11. |                 9         9        4      0   0              |
  12. |             9999      9999         4       000               |
  13. |                                                              |
  14. |         9940 MICROPROCESSOR Instruction Set Summary          |
  15. |                                                              |
  16. |                                                              |
  17. |                                                              |
  18. |                                                              |
  19. |                                                              |
  20. |                    _________    _________                    |
  21. |                  _|         \__/         |_                  |
  22. |             P23 |_|1                   40|_| Vss             |
  23. |                  _|                      |_                  |
  24. |             P22 |_|2                   39|_| P31             |
  25. |                  _|                      |_                  |
  26. |             P21 |_|3                   38|_| P30             |
  27. |                  _|                      |_  ____            |
  28. |             P20 |_|4                   37|_| INT2/PROG       |
  29. |                  _|                      |_                  |
  30. |             P19 |_|5                   36|_| P29             |
  31. |                  _|                      |_                  |
  32. |             P18 |_|6                   35|_| P28             |
  33. |                  _|                      |_                  |
  34. |          P17/EC |_|7                   34|_| P27             |
  35. |            ____  _|                      |_                  |
  36. |        P16/IDLE |_|8                   33|_| P26             |
  37. |            ____  _|                      |_                  |
  38. |        P15/HLDA |_|9                   32|_| P25             |
  39. |             ___  _|                      |_                  |
  40. |         P14/HLD |_|10       9940       31|_| P24             |
  41. |                  _|                      |_                  |
  42. |          P12/TD |_|11                  30|_| P7/A8           |
  43. |                  _|                      |_                  |
  44. |            Vcc1 |_|12                  29|_| P6/A7           |
  45. |                  _|                      |_                  |
  46. |            Vcc2 |_|13                  28|_| P5/A6           |
  47. |                  _|                      |_                  |
  48. |          P11/TC |_|14                  27|_| P4/A5           |
  49. |                  _|                      |_                  |
  50. |         P13/CLK |_|15                  26|_| P3/A4           |
  51. |                  _|                      |_                  |
  52. |      P10/CRUCLK |_|16                  25|_| P2/A3           |
  53. |                  _|                      |_                  |
  54. |       P9/CRUOUT |_|17                  24|_| P1/A2           |
  55. |                  _|                      |_                  |
  56. |        P8/CRUIN |_|18                  23|_| P0/A1           |
  57. |        ____      _|                      |_                  |
  58. |        INT1/TST |_|19                  22|_| XTAL2           |
  59. |          ___     _|                      |_                  |
  60. |          RST/PE |_|20                  21|_| XTAL1           |
  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.1                Copyright (C) J.P.Bowen 1985|
  80. ----------------------------------------------------------------
  81. ----------------------------------------------------------------
  82. |Mnemonic|Code|IDPVCEAL|F|Z|Description                        |
  83. |--------+----+--------+-+-+-----------------------------------|
  84. |A    s,d|A000|---*****|1|Y|Add                                |
  85. |AB   s,d|B000|--******|1|Y|Add Bytes                          |
  86. |ABS  d  |0740|---*****|6|Y|Absolute value                     |
  87. |AI   r,i|0220|---*****|8|Y|Add Immediate                      |
  88. |ANDI r,i|0240|-----***|8|Y|AND Immediate                      |
  89. |B    s  |0440|--------|6|N|Branch (PC=d)                      |
  90. |BL   s  |0680|--------|6|N|Branch and Link (R11=PC,PC=s)      |
  91. |BLWP s  |0400|--------|6|N|Branch & Load Workspace Ptr (3) (2)|
  92. |C    s,d|8000|-----***|1|N|Compare                            |
  93. |CB   s,d|9000|--*--***|1|N|Compare Bytes                      |
  94. |CI   r,i|0280|-----***|8|N|Compare Immediate                  |
  95. |CLR  d  |04C0|--------|6|N|Clear                              |
  96. |COC  s,r|2000|-----*--|3|N|Compare Ones Corresponding         |
  97. |CZC  s,r|2400|-----*--|3|N|Compare Zeros Corresponding        |
  98. |DCA     |2C00|-**-****|9|N|Decimal Correct Add (dedicated XOP)|
  99. |DCS     |2C00|-**-****|9|N|Decimal Correct Sub (dedicated XOP)|
  100. |DEC  d  |0600|---*****|6|Y|Decrement                          |
  101. |DECT d  |0640|---*****|6|Y|Decrement by Two                   |
  102. |DIV  d,r|3C00|---*----|9|N|Divide                             |
  103. |IDLE    |0340|--------|7|N|Computer Idle                      |
  104. |INC  d  |0580|---*****|6|Y|Increment                          |
  105. |INCT d  |05C0|---*****|6|Y|Increment by Two                   |
  106. |INV  d  |0540|-----***|6|Y|Invert                             |
  107. |JEQ  a  |1300|--------|2|N|Jump if Equal                      |
  108. |JGT  a  |1500|--------|2|N|Jump if Greater Than               |
  109. |JH   a  |1B00|--------|2|N|Jump if High                       |
  110. |JHE  a  |1400|--------|2|N|Jump if High or Equal              |
  111. |JL   a  |1A00|--------|2|N|Jump if Low                        |
  112. |JLE  a  |1200|--------|2|N|Jump if Low or Equal               |
  113. |JLT  a  |1100|--------|2|N|Jump if Less Than                  |
  114. |JMP  a  |1000|--------|2|N|Jump unconditionally               |
  115. |JNC  a  |1700|--------|2|N|Jump if No Carry                   |
  116. |JNE  a  |1600|--------|2|N|Jump if Not Equal                  |
  117. |JNO  a  |1900|--------|2|N|Jump if No Overflow                |
  118. |JOC  a  |1800|--------|2|N|Jump On Carry                      |
  119. |JOP  a  |1C00|--------|2|N|Jump if Odd Parity                 |
  120. |LDCR s,c|3000|--*--***|4|Y|Load Communication Register        |
  121. |LI   r,i|0200|-----***|8|N|Load Immediate                     |
  122. |LIIM i  |2C00|*-------|9|N|Load Interrupt Mask (dedicated XOP)|
  123. |LIMI i  |0300|*-------|8|N|Load Interrupt Mask Immediate      |
  124. |LWPI i  |02E0|--------|8|N|Load Workspace Pointer Immediate   |
  125. |MOV  s,d|C000|-----***|1|Y|Move                               |
  126. |MOVB s,d|D000|--*--***|1|Y|Move Bytes                         |
  127. |MPY  d,r|3800|--------|9|N|Multiply                           |
  128. |NEG  d  |0500|---*****|6|Y|Negate                             |
  129. |NOP     |1000|--------| |N|No Operation (pseudo-operation)    |
  130. |ORI  r,i|0260|-----***|8|Y|OR Immediate                       |
  131. |RT      |0458|--------| |N|Return (replaces 'B *11',pseudo-op)|
  132. |RTWP    |0380|????????|7|N|Return Workspace Pointer (4)       |
  133. |S    s,d|6000|---*****|1|N|Subtract                           |
  134. |SB   s,d|7000|--******|1|N|Subtract Bytes                     |
  135. |SBO  a  |1D00|--------|2|N|Set Bit to One                     |
  136. |SBZ  a  |1E00|--------|2|N|Set Bit to Zero                    |
  137. |SETO d  |0700|--------|6|N|Set to Ones                        |
  138. |SLA  r,c|0A00|----****|5|Y|Shift Left Arithmetic (1)          |
  139. |SOC  s,d|E000|-----***|1|Y|Set Ones Corresponding             |
  140. |SOCB s,d|F000|-----***|1|Y|Set Ones Corresponding Bytes       |
  141. |SRA  r,c|0800|----****|5|Y|Shift Right Arithmetic (1)         |
  142. |SRC  r,c|0800|----****|5|Y|Shift Right Circular (1)           |
  143. |SRL  r,c|0900|----****|5|Y|Shift Right Logical (1)            |
  144. |STCR s,c|3400|--*--***|4|Y|Store Communication Register       |
  145. |STST r  |02C0|--------|8|N|Store Status Register              |
  146. |STWP r  |02A0|--------|8|N|Store Workspace Pointer            |
  147. |SWPB d  |06C0|--------|6|N|Swap Bytes                         |
  148. |SZC  s,d|4000|-----***|1|Y|Set Zeros Corresponding            |
  149. |SZCB s,d|5000|-----***|1|Y|Set Zeros Corresponding Bytes      |
  150. |TB   a  |1F00|-----*--|2|N|Test Bit                           |
  151. |X    s  |0480|--------|6|N|Execute the instruction at s       |
  152. |XOP  s,c|2C00|--------|9|N|Extended Operation (5) (2)         |
  153. |XOR  s,r|2800|-----***|3|N|Exclusive OR                       |
  154. |--------+----+--------+-+-+-----------------------------------|
  155. |        |XXXX|        | | |Hexadecimal opcode (16-bit)        |
  156. |        |    |-*01?   | | |Unaffect/affected/reset/set/unknown|
  157. |        |    |        |F| |Format (1-9, see later)            |
  158. |        |    |        | |Y|Result compared to zero            |
  159. |        |    |        | |N|Result not compared to zero        |
  160. ----------------------------------------------------------------
  161. ----------------------------------------------------------------
  162. |Mnemonic     |IDPVCEAL|   |Description                        |
  163. |-------------+--------+---+-----------------------------------|
  164. |             |I       |   |Interrupt mask (Bits 14-15)        |
  165. | DC          | D      |   |Digit Carry from low BCD (Bit 7)   |
  166. | OP          |  P     |   |Odd Parity (Bit 5)                 |
  167. | OV          |   V    |   |Overflow (Bit 4)                   |
  168. | C           |    C   |   |Carry (Bit 3)                      |
  169. | EQ          |     E  |   |Equal (Bit 2)                      |
  170. | A>          |      A |   |Arithmetic greater than (Bit 1)    |
  171. | L>          |       L|   |Logical greater than (Bit 0)       |
  172. |--------------------------+-----------------------------------|
  173. | Rn                       |Workspace register (TT=00)         |
  174. | *Rn                      |Indirect workspace register (TT=01)|
  175. | *Rn+                     |Indirect auto increment (TT=11)    |
  176. | @nn                      |Symbolic (direct)                  |
  177. | nn(Rn)                   |Indexed (not R0, TT=10)            |
  178. | nn                       |Immediate (TT=10)                  |
  179. | a                        |PC relative (PC=PC+2+2*offset)     |
  180. | a                        |CRU relative (PC=CRU+offset)       |
  181. |--------------------------+-----------------------------------|
  182. |BES  nn                   |Block Ending with Symbol           |
  183. |BSS  nn                   |Block Starting with Symbol         |
  184. |BYTE e(,...)              |Byte (,byte...)                    |
  185. |DEFW nn(,...)             |Define Word (,word...)             |
  186. |EVEN                      |Even word boundary                 |
  187. |--------------------------+-----------------------------------|
  188. | CRU                      |Communication Reg (Bits 4-13, R12) |
  189. | PC                       |Program Counter (16-bit)           |
  190. | Rn                       |Workspace Register (16-bit)        |
  191. | n                        | ditto (if no mode conflict)       |
  192. | WP                       |Workspace Pointer (16-bit)         |
  193. | ST                       |Status Register (16-bit)           |
  194. |--------------------------+-----------------------------------|
  195. | a                        |Relative address (-128 to +127)    |
  196. | c                        |Count (4-bit, 0 to 15)             |
  197. | d                        |Destination                        |
  198. | e                        |8-bit expression (0 to 255)        |
  199. | i                        |Immediate                          |
  200. | n                        |Register number (0 to 15)          |
  201. | nn                       |16-bit expression (0 to 65535)     |
  202. | r                        |Workspace register                 |
  203. | s                        |Source                             |
  204. |--------------------------+-----------------------------------|
  205. | XXXBTTDDDDTTSSSS         |Format 1 (Arithmetic)              |
  206. | XXXXXXXXOOOOOOOO         |Format 2 (Jump)                    |
  207. | XXXXXXDDDDTTSSSS         |Format 3 (Logical)                 |
  208. | XXXXXXCCCCTTSSSS         |Format 4 (CRU)                     |
  209. | XXXXXXXXCCCCWWWW         |Format 5 (Shift)                   |
  210. | XXXXXXXXXXTTSSSS         |Format 6 (Program)                 |
  211. | XXXXXXXXXXXUUUUU         |Format 7 (Control)                 |
  212. | XXXXXXXXXXXUWWWW         |Format 8 (Immediate, word follows) |
  213. | XXXXXXDDDDTTSSSS         |Format 9 (MPY,DIV,XOP)             |
  214. |--------------------------+-----------------------------------|
  215. | B                        |Byte indicator (0=word, 1=byte)    |
  216. | CCCC                     |Transfer or shift count            |
  217. | DDDD                     |Destination address                |
  218. | OOOOOOOO                 |Offset (-128 to +127 words)        |
  219. | SSSS                     |Source address                     |
  220. | TT                       |Address modifiction                |
  221. | U                        |Unused                             |
  222. | WWWW                     |Workspace register number          |
  223. | X...X                    |Op code                            |
  224. |--------------------------+-----------------------------------|
  225. | (1)                      |If c=0 bits 12-14 of R0 are used   |
  226. | (2)                      |R13=old WP,R14=old PC,R15=old ST   |
  227. | (3)                      |WP=(s),PC=(s+2)                    |
  228. | (4)                      |WP=R13,PC=R14,ST=R15               |
  229. | (5)                      |WP=(40H+4c),PC=(42H+4c),R11=s      |
  230. |--------------------------------------------------------------|
  231. |                                                              |
  232. |                                                              |
  233. |                                                              |
  234. |                                                              |
  235. |                                                              |
  236. |                                                              |
  237. |                                                              |
  238. |                                                              |
  239. |                                                              |
  240. ----------------------------------------------------------------
  241.