home *** CD-ROM | disk | FTP | other *** search
/ Amiga Format CD 17 / amigaformatcd17.iso / -in_the_mag- / emulation / 68xx_crossasm / m6809.text < prev    next >
Text File  |  1997-07-01  |  36KB  |  643 lines

  1.   ›7mMotorola 6809 Instruction Set ›0m 
  2.    Description Of The Motorola 6809 Instruction Set 
  3.  #FILE: m6809.html 
  4.  #REV: 1.1 
  5.  #DATE: 01/06/95 
  6.  #AUTHOR: ›7mPaul D. Burgin ›0m 
  7.  #DISCLAIMER: All information provided as is etc. 
  8.  #HISTORY: 1.0 30/01/94, 1.1 01/06/95 
  9.  #XREF: 
  10.  #SOURCE: 
  11.  #COPYRIGHT: This information is copyrighted by Motorola Semiconductors 
  12. Inc. 
  13.  
  14.  
  15. This file is intended to be a complete description of the 6809 instruction
  16. set. Any additions, corrections and suggestions welcome.
  17.  
  18. Contents
  19. ========
  20.  
  21. <A HREF = "#part1">[1]  Table Of 6809 Instructions</A>
  22. <A HREF = "#part2">[2]  Indexed Addressing Post Byte Register Bit Assignments</A>
  23. <A HREF = "#part3">[3]  Push/Pull Post Byte</A>
  24. <A HREF = "#part4">[4]  Stacking Order</A>
  25. <A HREF = "#part5">[5]  Transfer/Exchange Post Byte</A>
  26. <A HREF = "#part6">[6]  Interrupt Vectors</A>
  27. <A HREF = "#part7">[7]  Interrupt Functionality</A>
  28. <A HREF = "#part8">[8]  Branch Instructions</A>
  29. <A HREF = "#part9">[9]  References</A>
  30. <A HREF = "#part10">[10] Acknowledgements</A>
  31.  
  32. <A NAME = "part1"></A>------------------------------------------------------------------------------
  33.  
  34. Subject: [1]  Table Of 6809 Instructions
  35.  
  36.  +-----------------------------------------------------------------+
  37.  |                       Page 0 Instructions                       |
  38.  +------------+-------------+--------------+---------------+-------+
  39.  | Opcode     |             | Addressing   |               |       |
  40.  | Hex   Dec  | Instruction | Mode         | Cycles  Bytes | HNZVC |
  41.  +------------+-------------+--------------+-------+-------+-------+
  42.  | 00    0000 | NEG         | DIRECT       |   6   |   2   | uaaaa |
  43.  | 01    0001 | ILLEGAL     | ILLEGAL      |   1   |   1   | uuuuu |
  44.  | 02    0002 | ILLEGAL     | ILLEGAL      |   1   |   1   | uuuuu |
  45.  | 03    0003 | COM         | DIRECT       |   6   |   2   | -aa01 |
  46.  | 04    0004 | LSR         | DIRECT       |   6   |   2   | -0a-s |
  47.  | 05    0005 | ILLEGAL     | ILLEGAL      |   1   |   1   | uuuuu |
  48.  | 06    0006 | ROR         | DIRECT       |   6   |   2   | -aa-s |
  49.  | 07    0007 | ASR         | DIRECT       |   6   |   2   | uaa-s |
  50.  | 08    0008 | LSL/ASL     | DIRECT       |   6   |   2   | naaas |
  51.  | 09    0009 | ROL         | DIRECT       |   6   |   2   | -aaas |
  52.  | 0A    0010 | DEC         | DIRECT       |   6   |   2   | -aaa- |
  53.  | 0B    0011 | ILLEGAL     | ILLEGAL      |   1   |   1   | uuuuu |
  54.  | 0C    0012 | INC         | DIRECT       |   6   |   2   | -aaa- |
  55.  | 0D    0013 | TST         | DIRECT       |   6   |   2   | -aa0- |
  56.  | 0E    0014 | JMP         | DIRECT       |   3   |   2   | ----- |
  57.  | 0F    0015 | CLR         | DIRECT       |   6   |   2   | -0100 |
  58.  | 10    0016 | PAGE1+      | VARIANT      |   1   |   1   | +++++ |
  59.  | 11    0017 | PAGE2+      | VARIANT      |   1   |   1   | +++++ |
  60.  | 12    0018 | NOP         | INHERENT     |   2   |   1   | ----- |
  61.  | 13    0019 | SYNC        | INHERENT     |   2   |   1   | ----- |
  62.  | 14    0020 | ILLEGAL     | ILLEGAL      |   1   |   1   | uuuuu |
  63.  | 15    0021 | ILLEGAL     | ILLEGAL      |   1   |   1   | uuuuu |
  64.  | 16    0022 | LBRA        | RELATIVE     |   5   |   3   | ----- |
  65.  | 17    0023 | LBSR        | RELATIVE     |   9   |   3   | ----- |
  66.  | 18    0024 | ILLEGAL     | ILLEGAL      |   1   |   1   | uuuuu |
  67.  | 19    0025 | DAA         | INHERENT     |   2   |   1   | -aa0a |
  68.  | 1A    0026 | ORCC        | IMMEDIATE    |   3   |   2   | ddddd |
  69.  | 1B    0027 | ILLEGAL     | ILLEGAL      |   1   |   1   | uuuuu |
  70.  | 1C    0028 | ANDCC       | IMMEDIATE    |   3   |   2   | ddddd |
  71.  | 1D    0029 | SEX         | INHERENT     |   2   |   1   | -aa0- |
  72.  | 1E    0030 | EXG         | INHERENT     |   8   |   2   | ccccc |
  73.  | 1F    0031 | TFR         | INHERENT     |   7   |   2   | ccccc |
  74.  | 20    0032 | BRA         | RELATIVE     |   3   |   2   | ----- |
  75.  | 21    0033 | BRN         | RELATIVE     |   3   |   2   | ----- |
  76.  | 22    0034 | BHI         | RELATIVE     |   3   |   2   | ----- |
  77.  | 23    0035 | BLS         | RELATIVE     |   3   |   2   | ----- |
  78.  | 24    0036 | BHS/BCC     | RELATIVE     |   3   |   2   | ----- |
  79.  | 25    0037 | BLO/BCS     | RELATIVE     |   3   |   2   | ----- |
  80.  | 26    0038 | BNE         | RELATIVE     |   3   |   2   | ----- |
  81.  | 27    0039 | BEQ         | RELATIVE     |   3   |   2   | ----- |
  82.  | 28    0040 | BVC         | RELATIVE     |   3   |   2   | ----- |
  83.  | 29    0041 | BVS         | RELATIVE     |   3   |   2   | ----- |
  84.  | 2A    0042 | BPL         | RELATIVE     |   3   |   2   | ----- |
  85.  | 2B    0043 | BMI         | RELATIVE     |   3   |   2   | ----- |
  86.  | 2C    0044 | BGE         | RELATIVE     |   3   |   2   | ----- |
  87.  | 2D    0045 | BLT         | RELATIVE     |   3   |   2   | ----- |
  88.  | 2E    0046 | BGT         | RELATIVE     |   3   |   2   | ----- |
  89.  | 2F    0047 | BLE         | RELATIVE     |   3   |   2   | ----- |
  90.  | 30    0048 | LEAX        | INDEXED      |   4   |   2   | --a-- |
  91.  | 31    0049 | LEAY        | INDEXED      |   4   |   2   | --a-- |
  92.  | 32    0050 | LEAS        | INDEXED      |   4   |   2   | ----- |
  93.  | 33    0051 | LEAU        | INDEXED      |   4   |   2   | ----- |
  94.  | 34    0052 | PSHS        | INHERENT     |   5   |   2   | ----- |
  95.  | 35    0053 | PULS        | INHERENT     |   5   |   2   | ccccc |
  96.  | 36    0054 | PSHU        | INHERENT     |   5   |   2   | ----- |
  97.  | 37    0055 | PULU        | INHERENT     |   5   |   2   | ccccc |
  98.  | 38    0056 | ILLEGAL     | ILLEGAL      |   1   |   1   | uuuuu |
  99.  | 39    0057 | RTS         | INHERENT     |   5   |   1   | ----- |
  100.  | 3A    0058 | ABX         | INHERENT     |   3   |   1   | ----- |
  101.  | 3B    0059 | RTI         | INHERENT     | 6/15  |   1   | ----- |
  102.  | 3C    0060 | CWAI        | INHERENT     |  21   |   2   | ddddd |
  103.  | 3D    0061 | MUL         | INHERENT     |  11   |   1   | --a-a |
  104.  | 3E    0062 | RESET*      | INHERENT     |   *   |   1   | ***** |
  105.  | 3F    0063 | SWI         | INHERENT     |  19   |   1   | ----- |
  106.  | 40    0064 | NEGA        | INHERENT     |   2   |   1   | uaaaa |
  107.  | 41    0065 | ILLEGAL     | ILLEGAL      |   1   |   1   | uuuuu |
  108.  | 42    0066 | ILLEGAL     | ILLEGAL      |   1   |   1   | uuuuu |
  109.  | 43    0067 | COMA        | INHERENT     |   2   |   1   | -aa01 |
  110.  | 44    0068 | LSRA        | INHERENT     |   2   |   1   | -0a-s |
  111.  | 45    0069 | ILLEGAL     | ILLEGAL      |   1   |   1   | uuuuu |
  112.  | 46    0070 | RORA        | INHERENT     |   2   |   1   | -aa-s |
  113.  | 47    0071 | ASRA        | INHERENT     |   2   |   1   | uaa-s |
  114.  | 48    0072 | LSLA/ASLA   | INHERENT     |   2   |   1   | naaas |
  115.  | 49    0073 | ROLA        | INHERENT     |   2   |   1   | -aaas |
  116.  | 4A    0074 | DECA        | INHERENT     |   2   |   1   | -aaa- |
  117.  | 4B    0075 | ILLEGAL     | ILLEGAL      |   1   |   1   | uuuuu |
  118.  | 4C    0076 | INCA        | INHERENT     |   2   |   1   | -aaa- |
  119.  | 4D    0077 | TSTA        | INHERENT     |   2   |   1   | -aa0- |
  120.  | 4E    0078 | ILLEGAL     | ILLEGAL      |   1   |   1   | uuuuu |
  121.  | 4F    0079 | CLRA        | INHERENT     |   2   |   1   | -0100 |
  122.  | 50    0080 | NEGB        | INHERENT     |   2   |   1   | uaaaa |
  123.  | 51    0081 | ILLEGAL     | ILLEGAL      |   1   |   1   | uuuuu |
  124.  | 52    0082 | ILLEGAL     | ILLEGAL      |   1   |   1   | uuuuu |
  125.  | 53    0083 | COMB        | INHERENT     |   2   |   1   | -aa01 |
  126.  | 54    0084 | LSRB        | INHERENT     |   2   |   1   | -0a-s |
  127.  | 55    0085 | ILLEGAL     | ILLEGAL      |   1   |   1   | uuuuu |
  128.  | 56    0086 | RORB        | INHERENT     |   2   |   1   | -aa-s |
  129.  | 57    0087 | ASRB        | INHERENT     |   2   |   1   | uaa-s |
  130.  | 58    0088 | LSLB/ASLB   | INHERENT     |   2   |   1   | naaas |
  131.  | 59    0089 | ROLB        | INHERENT     |   2   |   1   | -aaas |
  132.  | 5A    0090 | DECB        | INHERENT     |   2   |   1   | -aaa- |
  133.  | 5B    0091 | ILLEGAL     | ILLEGAL      |   1   |   1   | uuuuu |
  134.  | 5C    0092 | INCB        | INHERENT     |   2   |   1   | -aaa- |
  135.  | 5D    0093 | TSTB        | INHERENT     |   2   |   1   | -aa0- |
  136.  | 5E    0094 | ILLEGAL     | ILLEGAL      |   1   |   1   | uuuuu |
  137.  | 5F    0095 | CLRB        | INHERENT     |   2   |   1   | -0100 |
  138.  | 60    0096 | NEG         | INDEXED      |   6   |   2   | uaaaa |
  139.  | 61    0097 | ILLEGAL     | ILLEGAL      |   1   |   1   | uuuuu |
  140.  | 62    0098 | ILLEGAL     | ILLEGAL      |   1   |   1   | uuuuu |
  141.  | 63    0099 | COM         | INDEXED      |   6   |   2   | -aa01 |
  142.  | 64    0100 | LSR         | INDEXED      |   6   |   2   | -0a-s |
  143.  | 65    0101 | ILLEGAL     | ILLEGAL      |   1   |   1   | uuuuu |
  144.  | 66    0102 | ROR         | INDEXED      |   6   |   2   | -aa-s |
  145.  | 67    0103 | ASR         | INDEXED      |   6   |   2   | uaa-s |
  146.  | 68    0104 | LSL/ASL     | INDEXED      |   6   |   2   | naaas |
  147.  | 69    0105 | ROL         | INDEXED      |   6   |   2   | -aaas |
  148.  | 6A    0106 | DEC         | INDEXED      |   6   |   2   | -aaa- |
  149.  | 6B    0107 | ILLEGAL     | ILLEGAL      |   1   |   1   | uuuuu |
  150.  | 6C    0108 | INC         | INDEXED      |   6   |   2   | -aaa- |
  151.  | 6D    0109 | TST         | INDEXED      |   6   |   2   | -aa0- |
  152.  | 6E    0110 | JMP         | INDEXED      |   3   |   2   | ----- |
  153.  | 6F    0111 | CLR         | INDEXED      |   6   |   2   | -0100 |
  154.  | 70    0112 | NEG         | EXTENDED     |   7   |   3   | uaaaa |
  155.  | 71    0113 | ILLEGAL     | ILLEGAL      |   1   |   1   | uuuuu |
  156.  | 72    0114 | ILLEGAL     | ILLEGAL      |   1   |   1   | uuuuu |
  157.  | 73    0115 | COM         | EXTENDED     |   7   |   3   | -aa01 |
  158.  | 74    0116 | LSR         | EXTENDED     |   7   |   3   | -0a-s |
  159.  | 75    0117 | ILLEGAL     | ILLEGAL      |   1   |   1   | uuuuu |
  160.  | 76    0118 | ROR         | EXTENDED     |   7   |   3   | -aa-s |
  161.  | 77    0119 | ASR         | EXTENDED     |   7   |   3   | uaa-s |
  162.  | 78    0120 | LSL/ASL     | EXTENDED     |   7   |   3   | naaas |
  163.  | 79    0121 | ROL         | EXTENDED     |   7   |   3   | -aaas |
  164.  | 7A    0122 | DEC         | EXTENDED     |   7   |   3   | -aaa- |
  165.  | 7B    0123 | ILLEGAL     | ILLEGAL      |   1   |   1   | uuuuu |
  166.  | 7C    0124 | INC         | EXTENDED     |   7   |   3   | -aaa- |
  167.  | 7D    0125 | TST         | EXTENDED     |   7   |   3   | -aa0- |
  168.  | 7E    0126 | JMP         | EXTENDED     |   3   |   3   | ----- |
  169.  | 7F    0127 | CLR         | EXTENDED     |   7   |   3   | -0100 |
  170.  | 80    0128 | SUBA        | IMMEDIATE    |   2   |   2   | uaaaa |
  171.  | 81    0129 | CMPA        | IMMEDIATE    |   2   |   2   | uaaaa |
  172.  | 82    0130 | SBCA        | IMMEDIATE    |   2   |   2   | uaaaa |
  173.  | 83    0131 | SUBD        | IMMEDIATE    |   4   |   3   | -aaaa |
  174.  | 84    0132 | ANDA        | IMMEDIATE    |   2   |   2   | -aa0- |
  175.  | 85    0133 | BITA        | IMMEDIATE    |   2   |   2   | -aa0- |
  176.  | 86    0134 | LDA         | IMMEDIATE    |   2   |   2   | -aa0- |
  177.  | 87    0135 | ILLEGAL     | ILLEGAL      |   1   |   1   | uuuuu |
  178.  | 88    0136 | EORA        | IMMEDIATE    |   2   |   2   | -aa0- |
  179.  | 89    0137 | ADCA        | IMMEDIATE    |   2   |   2   | aaaaa |
  180.  | 8A    0138 | ORA         | IMMEDIATE    |   2   |   2   | -aa0- |
  181.  | 8B    0139 | ADDA        | IMMEDIATE    |   2   |   2   | aaaaa |
  182.  | 8C    0140 | CMPX        | IMMEDIATE    |   4   |   3   | -aaaa |
  183.  | 8D    0141 | BSR         | RELATIVE     |   7   |   2   | ----- |
  184.  | 8E    0142 | LDX         | IMMEDIATE    |   3   |   3   | -aa0- |
  185.  | 8F    0143 | ILLEGAL     | ILLEGAL      |   1   |   1   | uuuuu |
  186.  | 90    0144 | SUBA        | DIRECT       |   4   |   2   | uaaaa |
  187.  | 91    0145 | CMPA        | DIRECT       |   4   |   2   | uaaaa |
  188.  | 92    0146 | SBCA        | DIRECT       |   4   |   2   | uaaaa |
  189.  | 93    0147 | SUBD        | DIRECT       |   6   |   2   | -aaaa |
  190.  | 94    0148 | ANDA        | DIRECT       |   4   |   2   | -aa0- |
  191.  | 95    0149 | BITA        | DIRECT       |   4   |   2   | -aa0- |
  192.  | 96    0150 | LDA         | DIRECT       |   4   |   2   | -aa0- |
  193.  | 97    0151 | STA         | DIRECT       |   4   |   2   | -aa0- |
  194.  | 98    0152 | EORA        | DIRECT       |   4   |   2   | -aa0- |
  195.  | 99    0153 | ADCA        | DIRECT       |   4   |   2   | aaaaa |
  196.  | 9A    0154 | ORA         | DIRECT       |   4   |   2   | -aa0- |
  197.  | 9B    0155 | ADDA        | DIRECT       |   4   |   2   | aaaaa |
  198.  | 9C    0156 | CMPX        | DIRECT       |   6   |   2   | -aaaa |
  199.  | 9D    0157 | JSR         | DIRECT       |   7   |   2   | ----- |
  200.  | 9E    0158 | LDX         | DIRECT       |   5   |   2   | -aa0- |
  201.  | 9F    0159 | STX         | DIRECT       |   5   |   2   | -aa0- |
  202.  | A0    0160 | SUBA        | INDEXED      |   4   |   2   | uaaaa |
  203.  | A1    0161 | CMPA        | INDEXED      |   4   |   2   | uaaaa |
  204.  | A2    0162 | SBCA        | INDEXED      |   4   |   2   | uaaaa |
  205.  | A3    0163 | SUBD        | INDEXED      |   6   |   2   | -aaaa |
  206.  | A4    0164 | ANDA        | INDEXED      |   4   |   2   | -aa0- |
  207.  | A5    0165 | BITA        | INDEXED      |   4   |   2   | -aa0- |
  208.  | A6    0166 | LDA         | INDEXED      |   4   |   2   | -aa0- |
  209.  | A7    0167 | STA         | INDEXED      |   4   |   2   | -aa0- |
  210.  | A8    0168 | EORA        | INDEXED      |   4   |   2   | -aa0- |
  211.  | A9    0169 | ADCA        | INDEXED      |   4   |   2   | aaaaa |
  212.  | AA    0170 | ORA         | INDEXED      |   4   |   2   | -aa0- |
  213.  | AB    0171 | ADDA        | INDEXED      |   4   |   2   | aaaaa |
  214.  | AC    0172 | CMPX        | INDEXED      |   6   |   2   | -aaaa |
  215.  | AD    0173 | JSR         | INDEXED      |   7   |   2   | ----- |
  216.  | AE    0174 | LDX         | INDEXED      |   5   |   2   | -aa0- |
  217.  | AF    0175 | STX         | INDEXED      |   5   |   2   | -aa0- |
  218.  | B0    0176 | SUBA        | EXTENDED     |   5   |   3   | uaaaa |
  219.  | B1    0177 | CMPA        | EXTENDED     |   5   |   3   | uaaaa |
  220.  | B2    0178 | SBCA        | EXTENDED     |   5   |   3   | uaaaa |
  221.  | B3    0179 | SUBD        | EXTENDED     |   7   |   3   | -aaaa |
  222.  | B4    0180 | ANDA        | EXTENDED     |   5   |   3   | -aa0- |
  223.  | B5    0181 | BITA        | EXTENDED     |   5   |   3   | -aa0- |
  224.  | B6    0182 | LDA         | EXTENDED     |   5   |   3   | -aa0- |
  225.  | B7    0183 | STA         | EXTENDED     |   5   |   3   | -aa0- |
  226.  | B8    0184 | EORA        | EXTENDED     |   5   |   3   | -aa0- |
  227.  | B9    0185 | ADCA        | EXTENDED     |   5   |   3   | aaaaa |
  228.  | BA    0186 | ORA         | EXTENDED     |   5   |   3   | -aa0- |
  229.  | BB    0187 | ADDA        | EXTENDED     |   5   |   3   | aaaaa |
  230.  | BC    0188 | CMPX        | EXTENDED     |   7   |   3   | -aaaa |
  231.  | BD    0189 | JSR         | EXTENDED     |   8   |   3   | ----- |
  232.  | BE    0190 | LDX         | EXTENDED     |   6   |   3   | -aa0- |
  233.  | BF    0191 | STX         | EXTENDED     |   6   |   3   | -aa0- |
  234.  | C0    0192 | SUBB        | IMMEDIATE    |   2   |   2   | uaaaa |
  235.  | C1    0193 | CMPB        | IMMEDIATE    |   2   |   2   | uaaaa |
  236.  | C2    0194 | SBCB        | IMMEDIATE    |   2   |   2   | uaaaa |
  237.  | C3    0195 | ADDD        | IMMEDIATE    |   4   |   3   | -aaaa |
  238.  | C4    0196 | ANDB        | IMMEDIATE    |   2   |   2   | -aa0- |
  239.  | C5    0197 | BITB        | IMMEDIATE    |   2   |   2   | -aa0- |
  240.  | C6    0198 | LDB         | IMMEDIATE    |   2   |   2   | -aa0- |
  241.  | C7    0199 | ILLEGAL     | ILLEGAL      |   1   |   1   | uuuuu |
  242.  | C8    0200 | EORB        | IMMEDIATE    |   2   |   2   | -aa0- |
  243.  | C9    0201 | ADCB        | IMMEDIATE    |   2   |   2   | aaaaa |
  244.  | CA    0202 | ORB         | IMMEDIATE    |   2   |   2   | -aa0- |
  245.  | CB    0203 | ADDB        | IMMEDIATE    |   2   |   2   | aaaaa |
  246.  | CC    0204 | LDD         | IMMEDIATE    |   3   |   3   | -aa0- |
  247.  | CD    0205 | ILLEGAL     | ILLEGAL      |   1   |   1   | uuuuu |
  248.  | CE    0206 | LDU         | IMMEDIATE    |   3   |   3   | -aa0- |
  249.  | CF    0207 | ILLEGAL     | ILLEGAL      |   1   |   1   | uuuuu |
  250.  | D0    0208 | SUBB        | DIRECT       |   4   |   2   | uaaaa |
  251.  | D1    0209 | CMPB        | DIRECT       |   4   |   2   | uaaaa |
  252.  | D2    0210 | SBCB        | DIRECT       |   4   |   2   | uaaaa |
  253.  | D3    0211 | ADDD        | DIRECT       |   6   |   2   | -aaaa |
  254.  | D4    0212 | ANDB        | DIRECT       |   4   |   2   | -aa0- |
  255.  | D5    0213 | BITB        | DIRECT       |   4   |   2   | -aa0- |
  256.  | D6    0214 | LDB         | DIRECT       |   4   |   2   | -aa0- |
  257.  | D7    0215 | STB         | DIRECT       |   4   |   2   | -aa0- |
  258.  | D8    0216 | EORB        | DIRECT       |   4   |   2   | -aa0- |
  259.  | D9    0217 | ADCB        | DIRECT       |   4   |   2   | aaaaa |
  260.  | DA    0218 | ORB         | DIRECT       |   4   |   2   | -aa0- |
  261.  | DB    0219 | ADDB        | DIRECT       |   4   |   2   | aaaaa |
  262.  | DC    0220 | LDD         | DIRECT       |   5   |   2   | -aa0- |
  263.  | DD    0221 | STD         | DIRECT       |   5   |   2   | -aa0- |
  264.  | DE    0222 | LDU         | DIRECT       |   5   |   2   | -aa0- |
  265.  | DF    0223 | STU         | DIRECT       |   5   |   2   | -aa0- |
  266.  | E0    0224 | SUBB        | INDEXED      |   4   |   2   | uaaaa |
  267.  | E1    0225 | CMPB        | INDEXED      |   4   |   2   | uaaaa |
  268.  | E2    0226 | SBCB        | INDEXED      |   4   |   2   | uaaaa |
  269.  | E3    0227 | ADDD        | INDEXED      |   6   |   2   | -aaaa |
  270.  | E4    0228 | ANDB        | INDEXED      |   4   |   2   | -aa0- |
  271.  | E5    0229 | BITB        | INDEXED      |   4   |   2   | -aa0- |
  272.  | E6    0230 | LDB         | INDEXED      |   4   |   2   | -aa0- |
  273.  | E7    0231 | STB         | INDEXED      |   4   |   2   | -aa0- |
  274.  | E8    0232 | EORB        | INDEXED      |   4   |   2   | -aa0- |
  275.  | E9    0233 | ADCB        | INDEXED      |   4   |   2   | aaaaa |
  276.  | EA    0234 | ORB         | INDEXED      |   4   |   2   | -aa0- |
  277.  | EB    0235 | ADDB        | INDEXED      |   4   |   2   | aaaaa |
  278.  | EC    0236 | LDD         | INDEXED      |   5   |   2   | -aa0- |
  279.  | ED    0237 | STD         | INDEXED      |   5   |   2   | -aa0- |
  280.  | EE    0238 | LDU         | INDEXED      |   5   |   2   | -aa0- |
  281.  | EF    0239 | STU         | INDEXED      |   5   |   2   | -aa0- |
  282.  | F0    0240 | SUBB        | EXTENDED     |   5   |   3   | uaaaa |
  283.  | F1    0241 | CMPB        | EXTENDED     |   5   |   3   | uaaaa |
  284.  | F2    0242 | SBCB        | EXTENDED     |   5   |   3   | uaaaa |
  285.  | F3    0243 | ADDD        | EXTENDED     |   7   |   3   | -aaaa |
  286.  | F4    0244 | ANDB        | EXTENDED     |   5   |   3   | -aa0- |
  287.  | F5    0245 | BITB        | EXTENDED     |   5   |   3   | -aa0- |
  288.  | F6    0246 | LDB         | EXTENDED     |   5   |   3   | -aa0- |
  289.  | F7    0247 | STB         | EXTENDED     |   5   |   3   | -aa0- |
  290.  | F8    0248 | EORB        | EXTENDED     |   5   |   3   | -aa0- |
  291.  | F9    0249 | ADCB        | EXTENDED     |   5   |   3   | aaaaa |
  292.  | FA    0250 | ORB         | EXTENDED     |   5   |   3   | -aa0- |
  293.  | FB    0251 | ADDB        | EXTENDED     |   5   |   3   | aaaaa |
  294.  | FC    0252 | LDD         | EXTENDED     |   6   |   3   | -aa0- |
  295.  | FD    0253 | STD         | EXTENDED     |   6   |   3   | -aa0- |
  296.  | FE    0254 | LDU         | EXTENDED     |   6   |   3   | -aa0- |
  297.  | FF    0255 | STU         | EXTENDED     |   6   |   3   | -aa0- |
  298.  +------------+-------------+--------------+-------+-------+-------+
  299.  
  300.  +-----------------------------------------------------------------+
  301.  |                       Page 1 Instructions^                      |
  302.  +------------+-------------+--------------+---------------+-------+
  303.  | Opcode     |             | Addressing   |               |       |
  304.  | Hex   Dec  | Instruction | Mode         | Cycles  Bytes | HNZVC |
  305.  +------------+-------------+--------------+-------+-------+-------+
  306.  | 1021  4129 | LBRN        | RELATIVE     | 5(6)  |   4   | ----- |
  307.  | 1022  4130 | LBHI        | RELATIVE     | 5(6)  |   4   | ----- |
  308.  | 1023  4131 | LBLS        | RELATIVE     | 5(6)  |   4   | ----- |
  309.  | 1024  4132 | LBHS/LBCC   | RELATIVE     | 5(6)  |   4   | ----- |
  310.  | 1025  4133 | LBLO/LBCS   | RELATIVE     | 5(6)  |   4   | ----- |
  311.  | 1026  4134 | LBNE        | RELATIVE     | 5(6)  |   4   | ----- |
  312.  | 1027  4135 | LBEQ        | RELATIVE     | 5(6)  |   4   | ----- |
  313.  | 1028  4136 | LBVC        | RELATIVE     | 5(6)  |   4   | ----- |
  314.  | 1029  4137 | LBVS        | RELATIVE     | 5(6)  |   4   | ----- |
  315.  | 102A  4138 | LBPL        | RELATIVE     | 5(6)  |   4   | ----- |
  316.  | 102B  4139 | LBMI        | RELATIVE     | 5(6)  |   4   | ----- |
  317.  | 102C  4140 | LBGE        | RELATIVE     | 5(6)  |   4   | ----- |
  318.  | 102D  4141 | LBLT        | RELATIVE     | 5(6)  |   4   | ----- |
  319.  | 102E  4142 | LBGT        | RELATIVE     | 5(6)  |   4   | ----- |
  320.  | 102F  4143 | LBLE        | RELATIVE     | 5(6)  |   4   | ----- |
  321.  | 103F  4159 | SWI2        | INHERENT     |  20   |   2   | ----- |
  322.  | 1083  4227 | CMPD        | IMMEDIATE    |   5   |   4   | -aaaa |
  323.  | 108C  4236 | CMPY        | IMMEDIATE    |   5   |   4   | -aaaa |
  324.  | 108E  4238 | LDY         | IMMEDIATE    |   4   |   4   | -aa0- |
  325.  | 1093  4243 | CMPD        | DIRECT       |   7   |   3   | -aaaa |
  326.  | 109C  4252 | CMPY        | DIRECT       |   7   |   3   | -aaaa |
  327.  | 109E  4254 | LDY         | DIRECT       |   6   |   3   | -aa0- |
  328.  | 109F  4255 | STY         | DIRECT       |   6   |   3   | -aa0- |
  329.  | 10A3  4259 | CMPD        | INDEXED      |   7   |   3   | -aaaa |
  330.  | 10AC  4268 | CMPY        | INDEXED      |   7   |   3   | -aaaa |
  331.  | 10AE  4270 | LDY         | INDEXED      |   6   |   3   | -aa0- |
  332.  | 10AF  4271 | STY         | INDEXED      |   6   |   3   | -aa0- |
  333.  | 10B3  4275 | CMPD        | EXTENDED     |   8   |   4   | -aaaa |
  334.  | 10BC  4284 | CMPY        | EXTENDED     |   8   |   4   | -aaaa |
  335.  | 10BE  4286 | LDY         | EXTENDED     |   7   |   4   | -aa0- |
  336.  | 10BF  4287 | STY         | EXTENDED     |   7   |   4   | -aa0- |
  337.  | 10CE  4302 | LDS         | IMMEDIATE    |   4   |   4   | -aa0- |
  338.  | 10DE  4318 | LDS         | DIRECT       |   6   |   3   | -aa0- |
  339.  | 10DF  4319 | STS         | DIRECT       |   6   |   3   | -aa0- |
  340.  | 10EE  4334 | LDS         | INDEXED      |   6   |   3   | -aa0- |
  341.  | 10EF  4335 | STS         | INDEXED      |   6   |   3   | -aa0- |
  342.  | 10FE  4350 | LDS         | EXTENDED     |   7   |   4   | -aa0- |
  343.  | 10FF  4351 | STS         | EXTENDED     |   7   |   4   | -aa0- |
  344.  +------------+-------------+--------------+-------+-------+-------+
  345.  
  346.  +-----------------------------------------------------------------+
  347.  |                       Page 2 Instructions^                      |
  348.  +------------+-------------+--------------+---------------+-------+
  349.  | Opcode     |             | Addressing   |               |       |
  350.  | Hex   Dec  | Instruction | Mode         | Cycles  Bytes | HNZVC |
  351.  +------------+-------------+--------------+-------+-------+-------+
  352.  | 113F  4415 | SWI3        | INHERENT     |  20   |   2   | ----- |
  353.  | 1183  4438 | CMPU        | IMMEDIATE    |   5   |   4   | -aaaa |
  354.  | 118C  4492 | CMPS        | IMMEDIATE    |   5   |   4   | -aaaa |
  355.  | 1193  4499 | CMPU        | DIRECT       |   7   |   3   | -aaaa |
  356.  | 119C  4508 | CMPS        | DIRECT       |   7   |   3   | -aaaa |
  357.  | 11A3  4515 | CMPU        | INDEXED      |   7   |   3   | -aaaa |
  358.  | 11AC  4524 | CMPS        | INDEXED      |   7   |   3   | -aaaa |
  359.  | 11B3  4531 | CMPU        | EXTENDED     |   8   |   4   | -aaaa |
  360.  | 11BC  4540 | CMPS        | EXTENDED     |   8   |   4   | -aaaa |
  361.  +------------+-------------+--------------+-------+-------+-------+
  362.  
  363.     Key
  364.     ===
  365.  
  366.     a Affected.
  367.     - Unaffected.
  368.     u Undefined.
  369.     d Changed directly.
  370.     s Contains the carry from a shift operation.
  371.     c Affected only if CC register selected.
  372.     n Unaffected by LSL, undefined by ASL (according to Motorola)!
  373.  
  374.     * Undocumented
  375.     + Not an instruction, but a prefix to page 1 or page 2 instructions.
  376.     ^ Illegal instructions not listed.
  377.  
  378. <A NAME = "part2"></A>------------------------------------------------------------------------------
  379.  
  380. Subject: [2]  Indexed Addressing Post Byte Register Bit Assignments
  381.  
  382.   +------------------------------------------------------------------------+
  383.   |          INDEX ADDRESSING POST BYTE REGISTER BIT ASSIGNMENTS           |
  384.   +-------------------------------+--------------------------------+-------+
  385.   |    POST BYTE REGISTER BIT     |                                |  Add  |
  386.   +---+---+---+---+---+---+---+---+          INDEXED MODE          +---+---+
  387.   | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |                                | ~ | # |
  388.   +---+---+---+---+---+---+---+---+--------------------------------+---+---+
  389.   | 0 | R | R | F | F | F | F | F |      (+/- 4 bit offset),R      | 1 | 0 |
  390.   +---+---+---+---+---+---+---+---+--------------------------------+---+---+
  391.   | 1 | R | R | 0 | 0 | 0 | 0 | 0 |               ,R+              | 2 | 0 |
  392.   +---+---+---+---+---+---+---+---+--------------------------------+---+---+
  393.   | 1 | R | R | I | 0 | 0 | 0 | 1 |               ,R++             | 3 | 0 |
  394.   +---+---+---+---+---+---+---+---+--------------------------------+---+---+
  395.   | 1 | R | R | 0 | 0 | 0 | 1 | 0 |               ,-R              | 2 | 0 |
  396.   +---+---+---+---+---+---+---+---+--------------------------------+---+---+
  397.   | 1 | R | R | I | 0 | 0 | 1 | 1 |               ,--R             | 3 | 0 |
  398.   +---+---+---+---+---+---+---+---+--------------------------------+---+---+
  399.   | 1 | R | R | I | 0 | 1 | 0 | 0 |               ,R               | 0 | 0 |
  400.   +---+---+---+---+---+---+---+---+--------------------------------+---+---+
  401.   | 1 | R | R | I | 0 | 1 | 0 | 1 |             (+/- B),R          | 1 | 0 |
  402.   +---+---+---+---+---+---+---+---+--------------------------------+---+---+
  403.   | 1 | R | R | I | 0 | 1 | 1 | 0 |             (+/- A),R          | 1 | 0 |
  404.   +---+---+---+---+---+---+---+---+--------------------------------+---+---+
  405.   | 1 | X | X | X | 0 | 1 | 1 | 1 |              Illegal           | u | u |
  406.   +---+---+---+---+---+---+---+---+--------------------------------+---+---+
  407.   | 1 | R | R | I | 1 | 0 | 0 | 0 |      (+/- 7 bit offset),R      | 1 | 1 |
  408.   +---+---+---+---+---+---+---+---+--------------------------------+---+---+
  409.   | 1 | R | R | I | 1 | 0 | 0 | 1 |      (+/- 15 bit offset),R     | 4 | 2 |
  410.   +---+---+---+---+---+---+---+---+--------------------------------+---+---+
  411.   | 1 | X | X | X | 1 | 0 | 1 | 0 |              Illegal           | u | u |
  412.   +---+---+---+---+---+---+---+---+--------------------------------+---+---+
  413.   | 1 | R | R | I | 1 | 0 | 1 | 1 |             (+/- D),R          | 4 | 0 |
  414.   +---+---+---+---+---+---+---+---+--------------------------------+---+---+
  415.   | 1 | X | X | I | 1 | 1 | 0 | 0 |      (+/- 7 bit offset),PC     | 1 | 1 |
  416.   +---+---+---+---+---+---+---+---+--------------------------------+---+---+
  417.   | 1 | X | X | I | 1 | 1 | 0 | 1 |      (+/- 15 bit offset),PC    | 5 | 2 |
  418.   +---+---+---+---+---+---+---+---+--------------------------------+---+---+
  419.   | 1 | X | X | X | 1 | 1 | 1 | 0 |              Illegal           | u | u |
  420.   +---+---+---+---+---+---+---+---+--------------------------------+---+---+
  421.   | 1 | 0 | 0 | 1 | 1 | 1 | 1 | 1 |             [address]          | 5 | 2 |
  422.   +---+---+---+---+---+---+---+---+--------------------------------+---+---+
  423.  
  424.     Key
  425.     ===
  426.  
  427.     ~ Additional clock cycles.
  428.     # Additional post bytes.
  429.     u Undefined.
  430.     X Don't Care.
  431.     F Offset.
  432.     I Indirect field.
  433.         0 = Non indirect
  434.         1 = Indirect (add 3 cycles)
  435.     R Register field.
  436.        00 = X
  437.        01 = Y
  438.        10 = U
  439.        11 = S
  440.  
  441. <A NAME = "part3"></A>------------------------------------------------------------------------------
  442.  
  443. Subject: [3]  Push/Pull Post Byte
  444.  
  445.      +------+------+------+------+------+------+------+------+
  446.      |  b7  |  b6  |  b5  |  b4  |  b3  |  b2  |  b1  |  b0  |
  447.      +--+---+--+---+--+---+--+---+--+---+--+---+--+---+--+---+
  448.         |      |      |      |      |      |      |      |
  449.         |      |      |      |      |      |      |      +------- CC
  450.         |      |      |      |      |      |      |
  451.         |      |      |      |      |      |      +-------------- A
  452.         |      |      |      |      |      |
  453.         |      |      |      |      |      +--------------------- B
  454.         |      |      |      |      |
  455.         |      |      |      |      +---------------------------- DP
  456.         |      |      |      |
  457.         |      |      |      +----------------------------------- X
  458.         |      |      |
  459.         |      |      +------------------------------------------ Y
  460.         |      |
  461.         |      +------------------------------------------------- S/U
  462.         |
  463.         +-------------------------------------------------------- PC
  464.  
  465. <A NAME = "part4"></A>------------------------------------------------------------------------------
  466.  
  467. Subject: [4]  Stacking Order
  468.  
  469.                   PULL ORDER
  470.  
  471.                       |
  472.                       v
  473.  
  474.                       CC
  475.                       A
  476.                       B
  477.                       DP
  478.                      X Hi                      INCREASING MEMORY
  479.                      X Lo
  480.                      Y Hi                              |
  481.                      Y Lo                              v
  482.                     S/U Hi
  483.                     S/U Lo
  484.                     PCR Hi
  485.                     PCR Lo
  486.  
  487.                       ^
  488.                       |
  489.  
  490.                   PUSH ORDER
  491.  
  492. <A NAME = "part5"></A>------------------------------------------------------------------------------
  493.  
  494. Subject: [5]  Transfer/Exchange Post Byte
  495.  
  496.         +------+------+------+------+------+------+------+------+
  497.         |  b7       SOURCE          |        DESTINATION    b0  |
  498.         +------+------+------+------+------+------+------+------+
  499.  
  500.                           +---------------------+
  501.                           |   Register Field    |
  502.                           +------+--------------+
  503.                           | Bits |   Register   |
  504.                           +------+--------------+
  505.                           | 0000 |      D       |
  506.                           | 0001 |      X       |
  507.                           | 0010 |      Y       |
  508.                           | 0011 |      U       |
  509.                           | 0100 |      S       |
  510.                           | 0101 |      PC      |
  511.                           | 1000 |      A       |
  512.                           | 1001 |      B       |
  513.                           | 1010 |      CC      |
  514.                           | 1011 |      DP      |
  515.                           +------+--------------+
  516.  
  517.  Other operand values result in the constant $FF being transferred; this
  518.  value is also used when there is an operation mixing 8 and 16 bit registers
  519.  (these effects are undocumented).
  520.  
  521. <A NAME = "part6"></A>------------------------------------------------------------------------------
  522.  
  523. Subject: [6]  Interrupt Vectors
  524.  
  525.                           +---------------------+
  526.                           |   6809 Interrupts   |
  527.                           +------+--------------+
  528.                           | Addr |    Event     |
  529.                           +------+--------------+
  530.                           | FFFE |   Restart    |
  531.                           | FFFC |   NMI        |
  532.                           | FFFA |   SWI        |
  533.                           | FFF8 |   IRQ        |
  534.                           | FFF6 |   FIRQ       |
  535.                           | FFF4 |   SWI2       |
  536.                           | FFF2 |   SWI3       |
  537.                           | FFF0 |   Reserved   |
  538.                           +------+--------------+
  539.  
  540. <A NAME = "part7"></A>------------------------------------------------------------------------------
  541.  
  542. Subject: [7]  Interrupt Functionality
  543.  
  544.  a) Interrupts have the following functions.
  545.  
  546.      SWI)  E = 1
  547.            PSHS X,Y,D,U,DP,PC,CC
  548.            F = 1
  549.            I = 1
  550.            PC = [$FFFA]
  551.            {19 cycles}
  552.  
  553.      SWI2) E = 1
  554.            PSHS X,Y,D,U,DP,PC,CC
  555.            PC = [$FFF4]
  556.            {20 cycles}
  557.  
  558.      SWI3) E = 1
  559.            PSHS X,Y,D,U,DP,PC,CC
  560.            PC = [$FFF2]
  561.            {20 cycles}
  562.  
  563.      IRQ)  E = 1
  564.            PSHS X,Y,D,U,DP,PC,CC
  565.            F = 1
  566.            I = 1
  567.            PC = [$FFF8]
  568.            {19 cycles}
  569.  
  570.      FIRQ) E = 0
  571.            PSHS PC,CC
  572.            F = 1
  573.            I = 1
  574.            PC = [$FFF6]
  575.            {10 cycles}
  576.  
  577.      NMI*) E = 1
  578.            PSHS X,Y,D,U,DP,PC,CC
  579.            F = 1
  580.            I = 1
  581.            PC = [$FFFC]
  582.            {19 cycles}
  583.  
  584.  b) An RTI instruction has the following function.
  585.  
  586.            PULS CC
  587.            if (E = 0)
  588.            then
  589.               PULS PC
  590.               {6 cycles}
  591.            else
  592.               PULS X,Y,D,U,DP,PC
  593.               {15 cycles}
  594.  
  595.     *Not available until after S has been initialised.
  596.  
  597. <A NAME = "part8"></A>------------------------------------------------------------------------------
  598.  
  599. Subject: [8]  Branch Instructions
  600.  
  601.   +-----------------------------------------------------------------------+
  602.   |                        6809 BRANCH INSTRUCTIONS                       |
  603.   +-------------+-----------------------------+---------------------------+
  604.   | Instruction |         Description         |     Condition Formula     |
  605.   +-------------+-----------------------------+---------------------------+
  606.   |   BCC/BHS   | Higher Or Same              |             ªC            |
  607.   |   BCS/BLO   | Lower                       |              C            |
  608.   |     BHI     | Higher                      |            ªC*ªZ          |
  609.   |     BLS     | Lower Or Same               |            C + Z          |
  610.   |     BNE     | Not Equal                   |             ªZ            |
  611.   |     BEQ     | Equal                       |              Z            |
  612.   |     BGE     | Greater Or Equal (Signed)   |          N*V + ªN*ªV      |
  613.   |     BLT     | Less Than (Signed)          |         N*ªV + ªN*V       |
  614.   |     BGT     | Greater Than (Signed)       |       N*V*ªZ + ªN*ªV*ªZ   |
  615.   |     BLE     | Less Than Or Equal (Signed) |       Z + N*ªV + ªN*V     |
  616.   |     BPL     | Plus (Positive)             |             ªN          |
  617.   |     BMI     | Minus (Negative)            |              N          |
  618.   |     BVC     | Overflow Clear              |             ªV          |
  619.   |     BVS     | Overflow Set                |              V          |
  620.   |     BRA     | Always                      |              1          |
  621.   |     BRN     | Never                       |              0          |
  622.   +-------------+-----------------------------+---------------------------+
  623.  
  624. <A NAME = "part9"></A>------------------------------------------------------------------------------
  625.  
  626. Subject: [9]  References
  627.  
  628. 'Inside The Dragon' by Duncan Smeed & Ian Sommerville
  629. 'Programming The 6809' by Rodnay Zaks & William Labiak
  630. 'Language Of The Dragon' (author unknown).
  631.  
  632. <A NAME = "part10"></A>------------------------------------------------------------------------------
  633.  
  634. Subject: [10] Acknowledgements
  635.  
  636. Thanks to Keiran Anscomb for details of some of the undocumented features.
  637.  
  638.  
  639. -----------------------------------------------------------------------------
  640.  Click ›7mhere ›0m to return to information menu. 
  641. -----------------------------------------------------------------------------
  642.  Page last modified 18 May 1996 16:33:34.     ›0m
  643.