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

  1. ----------------------------------------------------------------
  2. |                                                              |
  3. |                                                              |
  4. |                            Intel                             |
  5. |                                                              |
  6. |             88888      000         4      88888              |
  7. |            8     8    0   0       44     8     8             |
  8. |            8     8   0   0 0     4 4     8     8             |
  9. |             88888    0  0  0    4  4      88888              |
  10. |            8     8   0 0   0   4444444   8     8             |
  11. |            8     8    0   0        4     8     8             |
  12. |             88888      000         4      88888              |
  13. |                                                              |
  14. |          8048/8049/8748/8749/8035/8039 Single-Chip           |
  15. |            MICROCOMPUTER Instruction Set Summary             |
  16. |                                                              |
  17. |                                                              |
  18. |                                                              |
  19. |                                                              |
  20. |                    _________    _________                    |
  21. |                  _|         \__/         |_                  |
  22. |         <--> T0 |_|1                   40|_| Vcc (+5V)       |
  23. |                  _|                      |_                  |
  24. |       --> XTAL1 |_|2                   39|_| T1 <--          |
  25. |                  _|                      |_                  |
  26. |       --> XTAL2 |_|3                   38|_| P27 <-->        |
  27. |           _____  _|                      |_                  |
  28. |       --> RESET |_|4                   37|_| P26 <-->        |
  29. |              __  _|                      |_                  |
  30. |          --> SS |_|5                   36|_| P25 <-->        |
  31. |             ___  _|                      |_                  |
  32. |         --> INT |_|6                   35|_| P24 <-->        |
  33. |                  _|                      |_                  |
  34. |          --> EA |_|7                   34|_| P17 <-->        |
  35. |              __  _|                      |_                  |
  36. |          <-- RD |_|8                   33|_| P16 <-->        |
  37. |            ____  _|                      |_                  |
  38. |        <-- PSEN |_|9        8048       32|_| P15 <-->        |
  39. |              __  _|         8049         |_                  |
  40. |          <-- WR |_|10       8748       31|_| P14 <-->        |
  41. |                  _|         8749         |_                  |
  42. |         <-- ALE |_|11       8035       30|_| P13 <-->        |
  43. |                  _|         8039         |_                  |
  44. |        <--> DB0 |_|12                  29|_| P12 <-->        |
  45. |                  _|                      |_                  |
  46. |        <--> DB1 |_|13                  28|_| P11 <-->        |
  47. |                  _|                      |_                  |
  48. |        <--> DB2 |_|14                  27|_| P10 <-->        |
  49. |                  _|                      |_                  |
  50. |        <--> DB3 |_|15                  26|_| Vdd             |
  51. |                  _|                      |_                  |
  52. |        <--> DB4 |_|16                  25|_| PROG <-->       |
  53. |                  _|                      |_                  |
  54. |        <--> DB5 |_|17                  24|_| P23 <-->        |
  55. |                  _|                      |_                  |
  56. |        <--> DB6 |_|18                  23|_| P22 <-->        |
  57. |                  _|                      |_                  |
  58. |        <--> DB7 |_|19                  22|_| P21 <-->        |
  59. |                  _|                      |_                  |
  60. |       (GND) Vss |_|20                  21|_| P20 <-->        |
  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|CA|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. |ANL  pp,#n|98|--|D|2|AND Logical I/O port     |pp=pp&n        |
  94. |ANLD ep,A |9C|--|E|2|AND Logical expander port|ep=ep&A        |
  95. |CALL a    |14|--|F|2|Call subroutine          |[SP]+={PSW,PC},|
  96. |CLR  A    |27|--|G|1|Clear accumulator        |A=0        PC=a|
  97. |CLR  C    |97|0-|G|1|Clear carry status       |C=0            |
  98. |CLR  F0   |85|--|G|1|Clear flag #0            |F0=0           |
  99. |CLR  F1   |A5|--|G|1|Clear flag #1            |F1=0           |
  100. |CPL  A    |37|--|G|1|Complement accumulator   |A=~A           |
  101. |CPL  C    |A7|*-|G|1|Complement carry status  |C=~C           |
  102. |CPL  F0   |95|--|G|1|Complement flag #0       |F0=~F0         |
  103. |CPL  F1   |B5|--|G|1|Complement flag #1       |F1=~F1         |
  104. |DA   A    |57|--|G|1|Decimal Adjust acc.      |A=BCD{A}       |
  105. |DEC  A    |07|--|G|1|Decrement accumulator    |A=A-1          |
  106. |DEC  rr   |C8|--|A|1|Decrement register       |rr=rr-1        |
  107. |DIS  I    |15|--|G|1|Disable external int.    |               |
  108. |DIS  TCNTI|35|--|G|1|Disable timer interrupt  |               |
  109. |DJNZ rr,l |E8|--|H|2|Dec. and Jump if Non-Zero|rr=rr-1,if rr  |
  110. |EN   I    |05|--|G|1|Enable external interrupt|               |
  111. |EN   TCNTI|25|--|G|1|Enable timer interrupt   |               |
  112. |ENT0 CLK  |75|--|G|1|Enable timer output      |               |
  113. |IN   A,p  |08|--|I|2|Input from I/O port      |A=p            |
  114. |INC  A    |17|--|G|1|Increment accumulator    |A=A+1          |
  115. |INC  rr   |18|--|A|1|Increment register       |rr=rr+1        |
  116. |INC  @r   |10|--|B|1|Increment memory         |[r]=[r]+1      |
  117. |INS  A,BUS|08|--|G|2|Input bus with strobe    |A=BUS          |
  118. |JBn  l    |12|--|J|2|Jump if Bit set (n=0-7)  |If A<n>=1      |
  119. |JC   l    |F6|--|K|2|Jump if Carry set        |If C=1         |
  120. |JF0  l    |B6|--|K|2|Jump if Flag #0 set      |If F0=1        |
  121. |JF1  l    |76|--|K|2|Jump if Flag #1 set      |If F1=1        |
  122. |JMP  a    |04|--|F|2|Unconditional Jump       |PC=a           |
  123. |JMPP @A   |B3|--|G|2|Jump on accumulator      |PC=PC<8:11>+A  |
  124. |JNC  l    |E6|--|K|2|Jump if Not Carry        |If C=0         |
  125. |JNI  l    |86|--|K|2|Jump if Not Interrupt    |If I=0         |
  126. |JNT0 l    |26|--|K|2|Jump if Not Test i/p #0  |If T0=0        |
  127. |JNT1 l    |46|--|K|2|Jump if Not Test i/p #1  |If T1=0        |
  128. |JNZ  l    |96|--|K|2|Jump if Not Zero         |If A<>0        |
  129. |JOBF l    |86|--|K|2|Jump if OBF set          |If OBF=1       |
  130. |JTF  l    |16|--|K|2|Jump if Timer Flag set   |If TF=1, TF=0  |
  131. |JT0  l    |36|--|K|2|Jump if Test i/p #0 set  |If T0=1        |
  132. |JT1  l    |56|--|K|2|Jump if Test i/p #1 set  |If T1=1        |
  133. |JZ   l    |C6|--|K|2|Jump if Zero             |If A=0         |
  134. |MOV  A,#n |23|--|C|2|Move from immediate      |A=n            |
  135. |MOV  A,PSW|C7|--|G|1|Move from PSW            |A=PSW          |
  136. |MOV  A,rr |F8|--|A|1|Move from register       |A=rr           |
  137. |MOV  A,@r |F0|--|B|1|Move from memory         |A=[r]          |
  138. |MOV  A,T  |42|--|G|1|Move from timer          |A=T            |
  139. |MOV  PSW,A|D7|**|G|1|Move to PSW              |PSW=A          |
  140. |MOV  rr,A |A8|--|A|1|Move to register         |rr=A           |
  141. |MOV  rr,#n|B8|--|L|2|Move immediate to reg.   |rr=n           |
  142. |MOV  @r,A |A0|--|B|1|Move to memory           |[r]=A          |
  143. |MOV  @r,#n|B0|--|M|2|Move immediate to memory |[r]=n          |
  144. |MOV  T,A  |62|--|G|1|Move to timer            |T=A            |
  145. |MOVD A,ep |0C|--|E|2|Move from expander port  |A=ep           |
  146. |MOVD ep,A |3C|--|E|2|Move to expander port    |ep=A           |
  147. |MOVP A,@A |A3|--|G|1|2|Move from memory       |A=[PC<8:11>+A] |
  148. |MOVP3 A,@A|E3|--|G|2|Move from memory         |A=[300H+A]     |
  149. |MOVX A,@r |80|--|B|2|Move from external memory|A=[r]          |
  150. |MOVX @r,A |90|--|B|2|Move to external memory  |[r]=A          |
  151. |NOP       |00|--|G|1|No Operation             |               |
  152. |ORL  A,rr |48|--|A|1|OR Logical register      |A=Avrr         |
  153. |ORL  A,@r |40|--|B|1|OR Logical memory        |A=Av[r]        |
  154. |ORL  A,#n |43|--|C|2|OR Logical immediate     |A=Avn          |
  155. |ORL  pp,#n|88|--|D|2|OR Logical I/O port      |pp=ppvn        |
  156. |ORLD ep,A |8C|--|E|2|OR Logical expander port |ep=epvA        |
  157. |OUTL BUS,A|02|--|G|2|Output to bus            |BUS=A          |
  158. |OUTL p,A  |38|--|I|2|Output to I/O port       |p=A            |
  159. |RET       |83|--|G|2|Return from subroutine   |PC=[SP]-       |
  160. ----------------------------------------------------------------
  161. ----------------------------------------------------------------
  162. |Mnemonic  |Op|CA|F|~|Description              |Notes          |
  163. |----------+--+--+-+-+-------------------------+---------------|
  164. |RETR      |93|**|G|2|Return and Restore status|{PC,PSW}=[SP]- |
  165. |RL   A    |E7|--|G|1|Rotate Left              |A={A}<-        |
  166. |RLC  A    |F7|*-|G|1|Rotate Left thru Carry   |A={A,C}<-      |
  167. |RR   A    |77|--|G|1|Rotate Right             |A=->{A}        |
  168. |RRC  A    |67|*-|G|1|Rotate Right thru Carry  |A=->{C,A}      |
  169. |SEL  MBk  |E5|--|N|1|Select Memory Bank       |PC<11>=k       |
  170. |SEL  RBk  |C5|--|N|1|Select Register Bank     |Reg bank=k     |
  171. |STOP TCNT |65|--|G|1|Stop timer/counter       |               |
  172. |STRT CNT  |45|--|G|1|Start counter            |               |
  173. |STRT T    |55|--|G|1|Start timer              |               |
  174. |SWAP A    |47|--|G|1|Swap accumulator nibbles |A<0:3><->A<4:7>|
  175. |XCH  A,rr |28|--|A|1|Exchange register        |A<->rr         |
  176. |XCH  A,@r |20|--|B|1|Exchange memory          |A<->[r]        |
  177. |XCHD A,@r |30|--|B|1|Exchange lower nibbles   |A<0:3><->[r<:>]|
  178. |XRL  A,rr |D8|--|A|1|Exclusive OR register    |A=Axrr         |
  179. |XRL  A,@r |D0|--|B|1|Exclusive OR memory      |A=Ax[r]        |
  180. |XRL  A,#n |D3|--|C|2|Exclusive OR immediate   |A=Axn          |
  181. |-------------+--+-+-+-----------------------------------------|
  182. | PSW         |-*| | |Flag unaffected/affected or zero (0)     |
  183. | C           |C | | |Carry (Bit 7)                            |
  184. | AC          | A| | |Auxilary Carry (Bit 6)                   |
  185. | F0   F1     |  | | |Flags (F0, bit 5, F1 bit 4)              |
  186. | SP          |  | | |Stack Pointer (Bits 0-2)                 |
  187. |----------------+-+-+-----------------------------------------|
  188. | -----nnn       |A| |nnn = R0/R1/R2/R3/R4/R5/R6/R7 (3 bits)   |
  189. | -------r       |B| |r   = R0/R1 (1 bit)                      |
  190. | -------- MM    |C| |MM  = 8 bits of immediate data           |
  191. | ------pp MM    |D| |pp  = BUS/P1/P2/? (2 bits)               |
  192. | ------ee       |E| |ee  = P4/P5/P6/P7 (2 bits)               |
  193. | xxx----- XX    |F| |xxx = high-order 3 bits of memory address|
  194. | --------       |G| |XX  = low-order 8 bits of memory address |
  195. | -----nnn XX    |H| |nnn = as above                           |
  196. | ------qq       |I| |qq  = ?/P1/P2/? (2 bits)                 |
  197. | bbb----- XX    |J| |bbb = 3-bit bit number of accumulator    |
  198. | -------- XX    |K| |XX  = as above                           |
  199. | -----nnn MM    |L| |nnn = as above                           |
  200. | -------r MM    |M| |r   = as above                           |
  201. | ---k----       |N| |k   = 0/1 (1 bit)                        |
  202. |--------------------+-----------------------------------------|
  203. | A                  |Accumulator (8-bit)                      |
  204. | BUS                |Bus I/O port (8-bit)                     |
  205. | OBF                |Output Buffer Full flag (1-bit)          |
  206. | MB0  MB1           |Memory Banks                             |
  207. | P1   P2            |I/O Ports (8-bit)                        |
  208. | PC                 |Program Counter register (12-bit)        |
  209. | PORT               |I/O Port P1 and P2                       |
  210. | PSW                |Processor Status Word (8-bit)            |
  211. | RB0  RB1           |Register Banks                           |
  212. | Rn                 |Registers (8-bit, n=0-7)                 |
  213. | Rn'                |Alternative Registers (8-bit, n=0-7)     |
  214. | T0   T1            |Test inputs                              |
  215. |--------------------+-----------------------------------------|
  216. | a                  |11-bit address quantity (0 to 2047)      |
  217. | ep                 |8243 expander port P4, P5, P6 or P7      |
  218. | k                  |1-bit data quantity (0 or 1)             |
  219. | l                  |Low-order 8 bits of a memory address     |
  220. | n                  |8-bit data quantity (0 to 255)           |
  221. | p                  |I/O port P1 or P2                        |
  222. | pp                 |I/O port PORT, P1 or P2                  |
  223. | r                  |Register R0 or R1                        |
  224. | rr                 |Register R0, R1, R2, R3, R4, R5, R6 or R7|
  225. |--------------------+-----------------------------------------|
  226. | +    -             |Arithmetic addition/subtraction          |
  227. | &    ~             |Logical AND/NOT                          |
  228. | v    x             |Logical inclusive/exclusive OR           |
  229. | <-   ->            |Rotate left/right                        |
  230. | <->                |Exchange                                 |
  231. | < >  < : >         |Bit number/range                         |
  232. | [ ]                |Indirect addressing                      |
  233. | [ ]+ -[ ]          |Indirect address auto-increment/decrement|
  234. | { }                |Combination of operands                  |
  235. |--------------------+-----------------------------------------|
  236. | 00H to 07H         |General purpose registers R0-R7 (8-bit)  |
  237. | 08H to 17H         |Stack area S0-S7 (16-bit)                |
  238. | 18H to 1FH         |Alternative registers R0'-R7' (8-bit)    |
  239. | 20H to 3FH         |General scratchpad memory area           |
  240. ----------------------------------------------------------------
  241.