home *** CD-ROM | disk | FTP | other *** search
/ rtsi.com / 2014.01.www.rtsi.com.tar / www.rtsi.com / OS9 / DOCS / 6309.techref next >
Text File  |  2009-11-06  |  114KB  |  2,120 lines

  1. <warning: this document has been extensively changed since it's original
  2.           release, and has not been reformatted since.>
  3.  
  4.      
  5.      
  6.      
  7.      
  8.      
  9.      
  10.      
  11.      
  12.      
  13.      
  14.      
  15.      
  16.      
  17.      
  18.      
  19.      
  20.      
  21.      
  22.      
  23.      
  24.      
  25.      
  26.      
  27.      
  28.      
  29.      
  30.      
  31.      
  32.      
  33.      
  34.      
  35.      
  36.      
  37.      
  38.      
  39.      
  40.      
  41.                         HD63B09EP Technical Reference Guide
  42.                                   By Chet Simpson
  43.                      Modifications and Corrections by Alan DeKok
  44.  
  45.                  Copyright (C) 1994 Chet Simpson and Alan DeKok
  46.                                All Rights Reserved.
  47.  
  48.  
  49.       License: This document may be freely distributed in electronic
  50.                form as long as it is unchanged, and the copyright notice
  51.                is intact.  Permission is NOT given to reproduce it in
  52.                any other form without the written consent of the authors.
  53.  
  54.  
  55.  
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.  
  64.  
  65.  
  66.  
  67.  
  68.  
  69.      
  70.      
  71.      
  72.      
  73.      
  74.      
  75.      
  76.      
  77.      
  78.                                        INDEX
  79.      
  80.      
  81.      
  82.      
  83.            Introduction.................................................1
  84.            Summary of Features..........................................1
  85.            Description of Additional Registers..........................2
  86.            Modes of Operation...........................................3
  87.            Native Mode and Timing Loops.................................3
  88.            Modes of the Fast Interrupt Request (FIRQ)...................4
  89.            Inter-Register Instructions..................................4
  90.            Bit Manipulation of Memory Locations.........................4
  91.            Bit Transfers Between Memory Locations and Registers.........5
  92.            Block Transfers..............................................6
  93.            New math instructions (MULD, DIVD, DIVQ).....................7
  94.            Error Trapping...............................................7
  95.            Additional instructions......................................7
  96.      
  97.            OP-Code Table...............................................10
  98.      
  99.            Mnemonic Table..............................................19
  100.             Branch Instructions........................................24
  101.             Bit Manipulation and Transfers.............................24
  102.             Logical Memory Instructions................................25
  103.             Inter-Register Instructions................................25
  104.             Index Adressing Modes and Post- Byte Information...........26
  105.             Register Description.......................................27
  106.             Push/Pull Order............................................27
  107.             Push/Pull Post-Byte........................................27
  108.             Condition Code Register....................................27
  109.      
  110.  
  111.  
  112.  
  113.  
  114.  
  115.  
  116.      
  117.  
  118.  
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.  
  130.  
  131.  
  132.  
  133.  
  134.  
  135.    HD63B09EP Technical Reference Guide                                  Page  1
  136.      
  137.      
  138.      
  139.                                     Introduction
  140.      
  141.      
  142.           The  HD63B09EP  microprocessor  by  Hitachi, is a MC68B09E compatible
  143.      chip containing additional registers and an  additional  instruction  set.
  144.      The  6309  was  thought  to  be  a  flakey  chip  though, because it would
  145.      sometimes crash or change the values of registers when it  encountered  an
  146.      addressing  mode or opcode invalid to the 6809. This was later found to be
  147.      an extended instruction set and a feature that would trap some programming
  148.      errors and jump to a specified location in memory.
  149.      
  150.           Hitachi  licensed  the  rights  of  the  6809  instruction  set from
  151.      Motorola to make a 6809 compatible chip. When they  finished  the  design,
  152.      they  found there was a lot of unused space in the chip. With this in mind
  153.      they added extra registers and expanded on the instruction set, but due to
  154.      the  licensing  agreement  with  Motorola, they were unable to release the
  155.      information about the extra features.
  156.      
  157.           Not only did the chip have an expanded instruction set, but  it  also
  158.      had  a  native mode that would run many of the instructions in fewer clock
  159.      cycles and a mode select for the FIRQ (Fast Interrupt ReQuest) that  would
  160.      enable it to opperate the same as the IRQ.
  161.  
  162.           In fact, all new instructions will execute in emulation mode, which
  163.      was originally seend when 'illegal' 6809 instructions produced odd effects
  164.      when run on a computer with a 6309 installed.
  165.      
  166.           The  additional  instruction set was first written about in the April
  167.      1988 issue of "Oh!FM", a Japanese magazine, and was  later  translated  by
  168.      Hirotsugu  Kakagawa.  This  opened a whole new door to those who wished to
  169.      use the 6309 in place of the 6809.
  170.      
  171.           In the beginning of 1992, Tandy Color Computer users in the US  found
  172.      out  about  these  features. Although there has been limited and sometimes
  173.      incorrect information about the new functions  of  the  chip,  I  hope  to
  174.      bridge that gap with the information provided here.
  175.      
  176.           Remember  that  this  information is of technical nature and makes no
  177.      attempt to teach assembly language programming. It  is  ONLY  a  technical
  178.      reference  guide for those who already know assembly and wish to use these
  179.      features in their programs. Although all of the opcodes for the  6309/6809
  180.      chip  are listed in the appendix, only the additional features supplied by
  181.      the 6309 will be discussed.
  182.      
  183.      
  184.      
  185.                                 Summary of Features
  186.      
  187.      
  188.             More registers:
  189.               one 8/16 bit 'zero' register
  190.               Two 8bit accumulators.
  191.               One 16bit concatenated register
  192.               One 16bit value register.
  193.               One 8bit mode/error register.
  194.               One 32bit concatenated register
  195.      
  196.             Two modes: MC68B09E emulation mode and HD63B09EP native mode.
  197.      
  198.             Reduced execution cycles when running in native mode.
  199.      
  200.             Many additional instructions.
  201.      
  202.             Error trapping of illegal instructions and zero divisions.
  203.  
  204.  
  205.  
  206.    HD63B09EP Technical Reference Guide                                  Page  2
  207.      
  208.      
  209.      
  210.      
  211.                         Description of Additional Registers
  212.      
  213.      
  214.           The  6309  has  7  additional  registers.  Only 4 of these are actual
  215.      registers.  2 are combinations of registers, and the last is a
  216.      constant-value register. These registers are:
  217.      
  218.               ACCE  - 8 bit accumulator.
  219.               ACCF  - 8 bit accumulator.
  220.               W     - 16 bit concatenated register (ACCE and ACCF combined).
  221.               V     - 16 bit register (which can only be accessed with the
  222.                                        inter-register instructions).
  223.               0     - zero register
  224.               MD    - 8 bit mode/error register.
  225.               Q     - 32 bit concatenated register (ACCA, ACCB ,ACCE and ACCF
  226.                                                     combined).
  227.      
  228.      
  229.           ACCE  and  ACCF  both  work  the  same  as  the  ACCA  and  ACCB
  230.      accumulators.  This  makes for easier programming in math and data oriented
  231.      routines.
  232.      
  233.           The W register  is  like  the  D  register  in  the  6809.  It  is  a
  234.      concatenated register containing the values of ACCE and ACCF as one 16 bit
  235.      value. ACCE is contained in the high 8 bits and ACCF is contained  in  the
  236.      low 8 bits.
  237.      
  238.           The  V  register  is a 16 bit register that can only be accessed with
  239.      inter-register instructions such a TFR  and  EXG.  The  contents  of  this
  240.      register will not change if the CPU is reset, allowing this register to be
  241.      used as a constant value for the program.
  242.  
  243.           The 0 register is always zero, independant of reads/writes to it.
  244.      It enables a zero value to be used in inter-register operations without
  245.      accessing memory, or changing the value of another register.  If
  246.      a 0 byte is stored at address $0000, it may also be used to clear large
  247.      amounts of memory quickly via 'TFM 0,r+'
  248.      
  249.           The MD register is a mode and error register and works  much  in  the
  250.      same way as the CC register. The bit definitions are as follows:
  251.      
  252.            Write bits
  253.              Bit 0   -  Execution mode of the 6309.
  254.                          If clear ( 0 ), the cpu is in 6809 emulation mode.
  255.                          If set ( 1 ), the cpu is in 6309 native mode.
  256.              Bit 1   -  FIRQ mode
  257.                          If clear ( 0 ), the FIRQ will occur normally.
  258.                          If set ( 1 ) , the FIRQ will operate the same as the
  259.                                         IRQ
  260.      
  261.              Bits 2 to 5 are unused
  262.      
  263.            Read bits - One of these bits is set when the 6309 traps an error
  264.              Bit 6   -  This bit is set ( 1 ) if an illegal instruction is
  265.                          encountered
  266.              Bit 7   -  This bit is set ( 1 ) if a zero division occurs.
  267.      
  268.      
  269.           The  Q  register  is a 32 bit concatenated register. This register is
  270.      the same as the D and W register except for one respect. It  contains  the
  271.      values  of  ACCA,  ACCB, ACCE and ACCF respectively. This register is used
  272.      mostly with the additional math instructions supplied with the 6309  which
  273.      will be discussed later.
  274.  
  275.  
  276.  
  277.  
  278.  
  279.  
  280.    HD63B09EP Technical Reference Guide                                  Page  3
  281.      
  282.      
  283.      
  284.                                  Modes of Operation
  285.      
  286.      
  287.           The 6309 has  two modes of operation; 6809 Emulation  mode  in  which
  288.      the  chip  acts  and  executes instructions the same as the 6809, and 6309
  289.      Native mode which stores an extra two bytes on the stack when an interrupt
  290.      (IRQ) occurs, and executes instructions in fewer clock cycles.
  291.      
  292.           When  in  native  mode, the W register (2 additional bytes) is stored
  293.      (PSHS) on the system stack when an interrupt occurs,  it is stored  on  the
  294.      stack  right  after  the  D  (general data)  register. Since  ALL register
  295.      values are stored on the system stack when an IRQ (NOT  FIRQ  -  See  FIRQ
  296.      modes  for  more  information)   occurs,  great  care should be taken when
  297.      writing or patching those routines to run in native mode.
  298.      
  299.      Pull <- CC,A,B,E*,F*,DP,Xhi,Xlo,Yhi,Ylo,Uhi,Ulo,PChi,PClo <- Push
  300.      
  301.        * indicates the additional registers stored on the system stack
  302.      
  303.      
  304.           When in native mode those interrupt routines which modify the  return
  305.      address  by modifying  the  10th and 11th byte offsets from the stack (STX
  306.      10,S or STY 10,S etc.) will have to be changed to modify the 12th and 13th
  307.      byte offsets from the stack (STX 12,S or STY 12,S etc.). If those routines
  308.      are not patched to run in native mode they will  either  get  stuck  in  a
  309.      continuous loop or will crash the system due to the fact that they are not
  310.      returning to the correct address. This poses  a  MAJOR  problem  for  OS-9
  311.      Level  II  since  its main interrupt handling routine relies highly on the
  312.      changing of the return (PC) address on  the  stack.  Disk  read/write  and
  313.      formatting  routines  also  rely  heavily  on  changing  the return address
  314.      during an NMI (Non-Maskable Interrupt).
  315.      
  316.           To patch those routines which  do  modify  the  return  address,  the
  317.      program  or  routine  must  be disassembled or modified with a disk sector
  318.      editing program. Look for instructions such as STX 10,S or STY  10,S  that
  319.      has  an  RTI (Return from Interrupt) instruction within the next few lines
  320.      of the routine. The line containing STX 10,S or STY 10,S should be changed
  321.      to STX 12,S or STY 12,S respectively.
  322.      
  323.           Remember, after those routines are patched, those programs using them
  324.      will NOT work in emulation mode and will require native mode to be enabled
  325.      upon startup.
  326.      
  327.      
  328.      
  329.                             Native Mode and Timing Loops
  330.      
  331.      
  332.           There  is at least one more problem that needs to be addressed. Those
  333.      are routines which are dependant on timing loops for accuarate  operation.
  334.      Since  the  6309  executes  instructions faster when in native mode, those
  335.      routines that use timing loops would be effected. Since this  can  pose  a
  336.      problem  and can create erratic operation, the delay value or routine will
  337.      need to be changed for the routine to operate correctly.
  338.      
  339.           Those  routines  are  usually   serial-printer   routines,   cassette
  340.      read/write  timimg  routines,  software  clocks  and  some disk read/write
  341.      routines.
  342.  
  343.  
  344.  
  345.  
  346.    HD63B09EP Technical Reference Guide                                  Page  4
  347.      
  348.      
  349.      
  350.                      Modes of the Fast Interrupt Request (FIRQ)
  351.      
  352.      
  353.           The   designers   of  the  6309  decided  that  with  the  additional
  354.      instructions and native mode of operation, the FIRQ may be used more  than
  355.      it  usually  is.  With  this in mind they decided to allow you to make the
  356.      FIRQ run the same as the IRQ and store (PSHS) all the  current  values  of
  357.      the  registers  on the system stack. Normally, the FIRQ only stores the CC
  358.      (condition code) and the PC (Program Counter/return address) on the stack,
  359.      so  to  keep compatability with the 6809, they included it as a selectable
  360.      feature in the MD (Mode/status) register.
  361.      
  362.      
  363.      
  364.                             Inter-Register Instructions
  365.      
  366.      
  367.           The new Inter-Register instructions (ADCR,  ADDR,  CMPR,  EORR,  ORR,
  368.      SBCR,  and  SUBR)  all work the same as their register/memory (ADCA, ADDA,
  369.      etc.) counterparts except that they operate between registers. All of  the
  370.      new  instructions  use  the  same  post-byte information as the normal TFR
  371.      instruction and use the  format  of  R0,R1  (register  0  and  Register  1
  372.      respectively)  with  the  result  going  into  R1. See Block Transfers for
  373.      information on the TFR block move instructions.
  374.  
  375.           Mixed-size inter-register operations default to using
  376.      identical sized register.  So TFR A,X actually executes as TFR D,X.
  377.      You could also do 'lea(d) d,pc' type things by doing 'addr pc,d'.  As
  378.      the new inter-register instructions can now perform math using the PC
  379.      register, REALLY odd possibilities exist.  Try looking at code like
  380.      'eorr d,pc', and figuring out where it ends up.
  381.  
  382.           Inter-register instructions with 16-bit r1 and CC or DP (8-bit r2)
  383.      are legal, but the results are unknown.
  384.  
  385.      
  386.                         Bit Manipulation of Memory Locations
  387.      
  388.      
  389.           The  AIM,  EIM,  OIM  and  TIM  instructions  all  do   logical   bit
  390.      manipulations  to  locations  in  memory,  with the result stored into the
  391.      location, and the respective bits for  each  instruction  set  in  the  CC
  392.      register.  They  can be  used in the DIRECT, INDEXED or EXTENDED adressing
  393.      modes.
  394.      
  395.        Instruction descriptions:
  396.      
  397.         AIM - AND IN MEMORY
  398.         EIM - EOR IN MEMORY
  399.         OIM - OR IN MEMORY
  400.         TIM - TEST bits IN MEMORY
  401.      
  402.        Instruction format: X, post byte, operand
  403.      
  404.           Where X is the instruction op-code, post-byte contains  the  bits  to
  405.      AND,  OR,  EOR or TEST against the memory location, and the operand is the
  406.      memory location or indexing post-byte depending on the mode of operation.
  407.      
  408.      
  409.        Mnemonic format:
  410.      
  411.         Instruction logical operation value, memory location or index operation
  412.      
  413.        Mnemonic example:
  414.      
  415.         AIM #$0F,$E00 
  416.        
  417.       The example takes the contents of memory location $E00,  does  a  LOGICAL
  418.      and with the Value #$0F and then stores the result back into $E00.
  419.  
  420.  
  421.  
  422.    HD63B09EP Technical Reference Guide                                  Page  5
  423.      
  424.       
  425.      
  426.                 Bit Transfers Between Memory Locations and Registers
  427.      
  428.      
  429.           The  BAND, BIAND, BOR, BIOR,  BEOR,  BIEOR,  LDBT,  and  STBT  all do
  430.      logical  operations  to bits for the n-th bit in a memory location and the
  431.      m-th bit of a register. The  LDBT  and  STBT  instructions  allow  you  to
  432.      transfer   certain  bits  between  registers  and  memory  locations.  All
  433.      instructions allow you  to  specify  which  register  to  use,  which  bit
  434.      location  to  use in the register, which bit location to use in the memory
  435.      location, and the memory location to use. This allows you  to  transfer/or
  436.      do a logical operation with the 7th bit of a register and the 3rd bit of a
  437.      memory location. All bits are accessible on either the register or  memory
  438.      locations. The only limitations are that the instructions can only be used
  439.      with the A and B accumulators and the CC (condition  Code)  registers.  It
  440.      should  also  be  noted  that  these  instructions can only be used in the
  441.      DIRECT addressing mode.
  442.      
  443.        Instruction description:
  444.      
  445.        BAND  - AND a bit in a register with bit from memory location
  446.        BIAND - AND a bit in a register with the complement of the bit in memory
  447.        BOR   - OR a bit in a register with a bit from a memory location
  448.        BIOR  - OR a bit in a register with the complement of the bit in memory
  449.        BEOR  - EOR a bit in a register with a bit from a memory location
  450.        BIEOR - EOR a bit in a register with the complement of the bit in memory
  451.        LDBT  - Load a bit from a memory location into a bit in a register
  452.        STBT  - Store a bit from a register into a memory location.
  453.      
  454.      
  455.        Instruction format:
  456.      
  457.         x, post-byte, memory location
  458.      
  459.           Where X is  the  instruction  op-code,  the  post-byte  contains  the
  460.      register,  source  and destination bit information and the memory location
  461.      is the 8 bit value of the memory location to be used (Remember only DIRECT
  462.      mode is allowed with these instructions).
  463.      
  464.      
  465.        Mnemonic format:
  466.      
  467.         instruction, register, source bit, destination bit, memory location
  468.      
  469.      
  470.        Mnemonic example:
  471.      
  472.         BOR A,1,7,$00
  473.      
  474.           The  example would take the first (1) bit of register A (A) and OR it
  475.      into the 7th (7) bit of memory location $00 ($00) of the direct  page  (DP
  476.      register value)
  477.      
  478.           The post-byte of these instructions are not the same as the post-byte
  479.      used in any other operation (indexed or  inter-register)  as  all  of  the
  480.      information  (register,  source  and  destination bit) is contained in one
  481.      post-byte value.
  482.  
  483.  
  484.  
  485.  
  486.  
  487.  
  488.    HD63B09EP Technical Reference Guide                                  Page  6
  489.      
  490.      
  491.      
  492.                                   Block Transfers
  493.      
  494.      
  495.           Block  transfers  are used to move a certain number of bytes from one
  496.      place in memory to another with the use of one  instruction.  Two  16  bit
  497.      registers  (X,  Y,  U or S) are used to specify the source and destination
  498.      addresses, and the size of the block to be transferred is  specified  with
  499.      the  W register. It should be noted that even though the IRQ and FIRQ only
  500.      occur after  the current  instruction  is  finished,  block  moves  can be
  501.      interrupted.  After the interrupt returns, the last byte read is read once
  502.      more.  i.e. It is read _twice_ by the CPU  This can  cause  problems  with
  503.      memory  mapped  I/O devices, so caution  is advised  when using  the block
  504.      transfers. There isn't much control over these 4 instructions so the  only
  505.      thing applicable for them would be large block moves such as scrolling the
  506.      screen or clearing an area in memory with a certain value.
  507.      
  508.           TFM r0+,r1 and TFM r0,r1+ can be considered a poor mans DMA  channel.
  509.      Since all the data is either copied into or read from one memory location.
  510.      
  511.        Four types of block transfers have been provided.
  512.      
  513.        Mnemonic examples:
  514.      
  515.         (R0 - source address register, R1 - destination address register.)
  516.      
  517.        TFM r0+,r1+
  518.         - Transfer from R0 to R1 in incrementing order.
  519.      
  520.      
  521.        TFM r0-,r1-
  522.         - Transfer from R0 to R1 in decrementing order.
  523.      
  524.      
  525.        TFM r0+,r1
  526.         - Pour from R0 into R1, only incrementing R0 (R1 stays the same).
  527.      
  528.      
  529.        TFM r0,r1+
  530.         - Read from R0 into R1, only incrementing R0 (R1 stays the same).
  531.      
  532.      
  533.        Mnemonic example:
  534.      
  535.         LDW #$100
  536.         LDX #$600
  537.         LDY #$700
  538.         TFM X+,Y+
  539.      
  540.      
  541.           The example would move 256 (LDW $100) bytes from #$600 (LDX #$&00) in
  542.      memory to #$700 (LDY #$700) in memory,  incrementing  the  value  of  each
  543.      register (X and Y), and decrementing the value of the W register each time
  544.      a byte if moved.
  545.      
  546.           When moves like this are done, the pointer registers (X and Y in  the
  547.      example)  will  not  be  the  same value they were before the transfer was
  548.      initiated, but will but will be their original values PLUS  the  value  of
  549.      the  W register (#$100 in the example). So in the example once the move is
  550.      complete, the value of X will be returned as #$700 and the value of Y will
  551.      be returned as #$800. The value of W register will be 0.
  552.  
  553.           The 0 register may be used as a source or destination address register,
  554.      and the data will be read from, or written to, address $0000.
  555.  
  556.           It is illegal to use any of the CC, DP, W, V, or PC registers as either
  557.      a source or destination register.
  558.  
  559.  
  560.    HD63B09EP Technical Reference Guide                                  Page  7
  561.      
  562.      
  563.      
  564.                                  New math commands
  565.      
  566.      
  567.           The 6309 has 3 additional math instructions.  A  16  bit  by  16  bit
  568.      signed  multiply  (MULD),  a 16 bit by 8 bit signed divide (DIVD) and a 32
  569.      bit by 16 bit signed divide (DIVQ). These instructions can all be used  in
  570.      Immediate, direct, indexed and extended addressing modes.
  571.      
  572.           The MULD (16 bit by 16 bit) instruction does a signed multiply of the
  573.      contents of the D register and a value from memory (or  in  direct  mode).
  574.      The signed result is stored in the Q register.
  575.      
  576.           The  DIVD  (16  bit by 8 bit) instruction does a signed divide of the
  577.      contents of the D register with a value from memory (or in  direct  mode).
  578.      The  signed  result  is  stored  with  the  quotient  in  W and the modulo
  579.      (remainder) in D.
  580.      
  581.           The DIVQ (32 bit by 16 bit) instruction does a signed divide  of  the
  582.      contents  of  the Q register with a value from memory (or in direct mode).
  583.      The signed result is  stored  with  the  quotient  in  W  and  the  modulo
  584.      (remainder) in D.
  585.      
  586.      
  587.      
  588.                                    Error Trapping
  589.      
  590.      
  591.           The  6309  has an internal error trapping handler that will jump to a
  592.      specific location in memory when either an error  is  encountered  in  the
  593.      DIVision  instructions  (only divide by zero) or an illegal instruction is
  594.      encountered.  When an  error is  encountered, the  6309  will  jump to the
  595.      memory  location  contained  in  $FFF0 (and $FFF1)  which  was  originally
  596.      reserved by the 6809.
  597.      
  598.           The trap may cause  problems with machines that  have $FF00 hardcoded
  599.      with  the  values $0000.  A new EPROM should  be burned to correct for the
  600.      new behaviour of the 6309.
  601.  
  602.           As many people  know, an illegal instruction trap  is extremely useful
  603.      for debugging  programs,  as it prevents  the entire machine  from crashing
  604.      when a bug is encountered.
  605.  
  606.           Note that many pseudo-legal instructions on the 6809 are now illegal
  607.      on the 6309, e.g. $1020xxxx executes as an LBRA on a 6809, but results in
  608.      a trap on a 6309.     
  609.  
  610.  
  611.                               Additional Instructions
  612.      
  613.      
  614.           The  6309  has  MANY  new  instructions.  Most  are variations of old
  615.      instructions of  the  6809  for  use  with  the  new  registers.  The  new
  616.      instruction  set  can be used in both native and emulation mode. Here is a
  617.      list of the new instructions of the 6309:
  618.      
  619.      
  620.        ADCD
  621.         - Adds immediate or memory operand to the D register plus the current
  622.           status of the carry with the result going to D.
  623.      
  624.        ADCR
  625.         - Adds two registers together plus the current status of the carry.
  626.  
  627.  
  628.  
  629.  
  630.    HD63B09EP Technical Reference Guide                                  Page  8
  631.      
  632.      
  633.        ADDE , ADDF, ADDW 
  634.         - Add of immediate or memory operand to E, F or W with results going
  635.           to E, F or W
  636.      
  637.        ADDR
  638.         - Adds two registers together
  639.      
  640.        ANDD
  641.         - Logical AND of immediate or memory operand to D register with
  642.           result going to D.
  643.      
  644.        ANDR
  645.         - Logical AND of a register with the contents of another register
  646.      
  647.        ASLD  (Same as LSLD)
  648.         - Arithmetic shift left. Shifts D one bit left, clearing LSB.
  649.      
  650.        ASRD
  651.         - Arithmetic shift right of the D register with sign extending.
  652.      
  653.        BITD
  654.         - Test any bit or bits of the D register.
  655.      
  656.        BITMD
  657.         - Test any bit or bits of the MD (mode) register.
  658.      
  659.        CLRD, CLRE, CLRF, CLRW
  660.         - Clear register D, E, F or W to zero.
  661.      
  662.        CMPE, CMPF, CMPW
  663.         - Compares the contents of E, F or W with the immediate or memory
  664.           operand. Sets all CC except H on result.
  665.      
  666.        CMPR
  667.         - Compares one register to another and sets all CC bits except H on
  668.           result.
  669.      
  670.        COMD, COME, COMF, COMW
  671.         - One's complement D ,E, F, or W. Changes all zero's to one's and
  672.           all one's to zero's.
  673.      
  674.        DECD, DECE, DECF, DECW
  675.         - Decrement D, E, F, or W by 1.
  676.      
  677.        DIVD, DIVQ
  678.         - Does a 16 bit by 8 bit (DIVD) or a 32 bit by 16 bit (DIVQ) signed
  679.           divide with immediate or memory operand with quotient in W and modulo
  680.           (remainder) in D.
  681.      
  682.        EORD
  683.         - Logical exclusive OR of D and immediate or memory operand.
  684.      
  685.        EORR
  686.         - Logical exclusive OR of one register with the value of another
  687.           register.
  688.      
  689.        INCD, INCE, INCF, INCW
  690.         - Increment D, E, F or W by 1.
  691.      
  692.        LDE, LDF, LDQ, LDW, LDMD
  693.         - Standard loading of E, F, Q, W or MD with immediate data value or
  694.           operand from memory. (LDMD only valid with IMMEDIATE mode)
  695.  
  696.    HD63B09EP Technical Reference Guide                                  Page  9
  697.      
  698.      
  699.        LSLD  (Same as ASLD)
  700.         - Logical shift left. Shifts D one bit left, clearing LSB.
  701.      
  702.        LSRD, LSRW
  703.         - Logical shift right. Shifts D or W one bit right, clearing MSB.
  704.      
  705.        MULD
  706.         - Performs as 16bit by 16bit signed multiply with immediate or operand
  707.           from memory. Result stored in Q.
  708.      
  709.        NEGD
  710.         - Two's complement D register.
  711.      
  712.        ORD
  713.         - Logical OR of register D and immediate or memory operand.
  714.      
  715.        ORR
  716.         - Logical OR of one register with another.
  717.      
  718.        PSHSW, PSHUW
  719.         - Stores contents of the W register on the (system or user) stack.
  720.      
  721.        PULSW, PULUW
  722.         - Pull value from (system or user) stack into register W.
  723.      
  724.        ROLD, ROLW
  725.         - Rotate D or W one bit left through the Carry Condition code.
  726.      
  727.        RORD, RORW
  728.         - Rotate D or W one bit right through the Carry Condition code.
  729.      
  730.        SBCD
  731.         - Subtract an immediate or memory operand plus any borrow in Carry from
  732.           contents of D. Result stored in D.
  733.      
  734.        SBCR
  735.         - Subtract the value of one register from another plus any borrow in
  736.           the CC carry.
  737.      
  738.        SEXW
  739.         - sign exdend the W register into the D register.
  740.      
  741.        STE, STF, STQ, STW
  742.         - Store register E, F, Q or W to memory location (E,F), two memory
  743.           locations(W), or four memory locations (Q).
  744.      
  745.        SUBE, SUBF, SUBW
  746.         - Subtract immediate or memory operand from E, F or W. Result stored
  747.           back in same register.
  748.      
  749.        SUBR
  750.         - Subtract the value of one register from another.
  751.      
  752.        TFM (Block transfer)
  753.         - Transfer W number of bytes from one location to another. Returns
  754.           pointer registers offset of the starting value in the W register and
  755.           returns the W register as 0. Indexed operation only
  756.       
  757.        TSTD, TSTE, TSTF, TSTW
  758.         - Test contents of D, E, F or W by setting N and X condition codes
  759.           based on data in register.
  760.  
  761.  
  762.    Opcode and Mnemonics Reference Table                                 Page 10
  763.      
  764.      
  765.      
  766.           The Opcode and Mnemonics opcode reference tables  are  both  complete
  767.      listings  that  contain both the Opcode instruction and the HEX equivalant
  768.      in  all  available  addressing  modes.  The  first   table   is   arranged
  769.      sequentially  by  the  binary  opcodes, while the second table is arranged
  770.      alphabetically by the Mnemonic instructions.
  771.      
  772.           At the end of the second  table  there are   data  tables  containing
  773.      information    on    Bit   transfer/manipulation,   branch   instructions,
  774.      inter-register instructions, and general register and  stack  information.
  775.      These  are  all  helpful  to the serious assembly language programmer, who
  776.      should always have one.
  777.      
  778.      
  779.      
  780.                                    Opcode table 
  781.      
  782.      
  783.           ________________________________________________________________
  784.          |                                                                |
  785.          |  Opcode      Mnemonic       Mode          Cycles       Length  |
  786.          | (* 6309)                                6809 (6309)            |
  787.          |----------------------------------------------------------------|
  788.          |    00          NEG        Direct          6  (5)         2     |
  789.          |  * 01          OIM        Direct          6              3     |
  790.          |  * 02          AIM        Direct          6              3     |
  791.          |    03          COM        Direct          6  (5)         2     |
  792.          |    04          LSR        Direct          6  (5)         2     |
  793.          |  * 05          EIM        Direct          6              3     |
  794.          |    06          ROR        Direct          6  (5)         2     |
  795.          |    07          ASR        Direct          6  (5)         2     |
  796.          |    08          ASL/LSL    Direct          6  (5)         2     |
  797.          |    09          ROL        Direct          6  (5)         2     |
  798.          |    0A          DEC        Direct          6  (5)         2     |
  799.          |  * 0B          TIM        Direct          6                    |
  800.          |    0C          INC        Direct          6  (5)         2     |
  801.          |    0D          TST        Direct          6  (4)         2     |
  802.          |    0E          JMP        Direct          3  (2)         2     |
  803.          |    0F          CLR        Direct          6  (5)         2     |
  804.          |    10          (PREBYTE)                                       |
  805.          |    11          (PREBYTE)                                       |
  806.          |    12          NOP        Inherent        2  (1)         1     |
  807.          |    13          SYNC       Inherent        2  (1)         1     |
  808.          |  * 14          SEXW       Inherent        4              1     |
  809.          |    16          LBRA       Relative        5  (4)         3     |
  810.          |    17          LBSR       Relative        9  (7)         3     |
  811.          |    19          DAA        Inherent        2  (1)         1     |
  812.          |    1A          ORCC       Immediate       3  (2)         2     |
  813.          |    1C          ANDCC      Immediate       3              2     |
  814.          |    1D          SEX        Inherent        2  (1)         1     |
  815.          |    1E          EXG        Immediate       8  (5)         2     |
  816.          |    1F          TFR        Immediate       6  (4)         2     |
  817.          |    20          BRA        Relative        3              2     |
  818.          |    21          BRN        Relative        3              2     |
  819.          |    22          BHI        Relative        3              2     |
  820.          |    23          BLS        Relative        3              2     |
  821.          |    24          BHS/BCC    Relative        3              2     |
  822.          |    25          BLO/BCS    Relative        3              2     |
  823.          |    26          BNE        Relative        3              2     |
  824.          |    27          BEQ        Relative        3              2     |
  825.           ----------------------------------------------------------------
  826.  
  827.  
  828.    Opcode and Mnemonics opcode reference table                          Page 11
  829.    
  830.    
  831.    
  832.    
  833.           ________________________________________________________________
  834.          |                                                                |
  835.          |  Opcode      Mnemonic        Mode         Cycles       Length  |
  836.          | (* 6309)                                                       |
  837.          |----------------------------------------------------------------|
  838.          |    28          BVC        Relative        3              2     |
  839.          |    29          BVS        Relative        3              2     |
  840.          |    2A          BPL        Relative        3              2     |
  841.          |    2B          BMI        Relative        3              2     |
  842.          |    2C          BGE        Relative        3              2     |
  843.          |    2D          BLT        Relative        3              2     |
  844.          |    2E          BGT        Relative        3              2     |
  845.          |    2F          BLE        Relative        3              2     |
  846.          |    30          LEAX       Indexed         4+             2     |
  847.          |    31          LEAY       Indexed         4+             2     |
  848.          |    32          LEAS       Indexed         4+             2     |
  849.          |    33          LEAU       Indexed         4+             2     |
  850.          |    34          PSHS       Immediate       5+ (4+)        2     |
  851.          |    35          PULS       Immediate       5+ (4+)        2     |
  852.          |    36          PSHU       Immediate       5+ (4+)        2     |
  853.          |    37          PULU       Immediate       5+ (4+)        2     |
  854.          |    39          RTS        Inherent        5  (1)         1     |
  855.          |    3A          ABX        Inherent        3  (1)         1     |
  856.          |    3B          RTI        Inherent      6/15 (17)        1     |
  857.          |    3C          CWAI       Immediate      22  (20)        2     |
  858.          |    3D          MUL        Inherent       11  (10)        1     |
  859.          |    3F          SWI        Inherent       19  (21)        1     |
  860.          |    40          NEGA       Inherent        2  (1)         1     |
  861.          |    43          COMA       Inherent        2  (1)         1     |
  862.          |    44          LSRA       Inherent        2  (1)         1     |
  863.          |    46          RORA       Inherent        2  (1)         1     |
  864.          |    47          ASRA       Inherent        2  (1)         1     |
  865.          |    48          ASLA/LSLA  Inherent        2  (1)         1     |
  866.          |    49          ROLA       Inherent        2  (1)         1     |
  867.          |    4A          DECA       Inherent        2  (1)         1     |
  868.          |    4C          INCA       Inherent        2  (1)         1     |
  869.          |    4D          TSTA       Inherent        2  (1)         1     |
  870.          |    4F          CLRA       Inherent        2  (1)         1     |
  871.          |    50          NEGB       Inherent        2  (1)         1     |
  872.          |    53          COMB       Inherent        2  (1)         1     |
  873.          |    54          LSRB       Inherent        2  (1)         1     |
  874.          |    56          RORB       Inherent        2  (1)         1     |
  875.          |    57          ASRB       Inherent        2  (1)         1     |
  876.          |    58          ASLB/LSLB  Inherent        2  (1)         1     |
  877.          |    59          ROLB       Inherent        2  (1)         1     |
  878.          |    5A          DECB       Inherent        2  (1)         1     |
  879.          |    5C          INCB       Inherent        2  (1)         1     |
  880.          |    5D          TSTB       Inherent        2  (1)         1     |
  881.          |    5F          CLRB       Inherent        2  (1)         1     |
  882.          |    60          NEG        Indexed         6+             2+    |
  883.          |  * 61          OIM        Indexed         6+             3+    |
  884.          |  * 62          AIM        Indexed         7              3+    |
  885.          |    63          COM        Indexed         6+             2+    |
  886.          |    64          LSR        Indexed         6+             2+    |
  887.          |  * 65          EIM        Indexed         7+             3+    |
  888.          |    66          ROR        Indexed         6+             2+    |
  889.          |    67          ASR        Indexed         6+             2+    |
  890.          |    68          ASL/LSL    Indexed         6+             2+    |
  891.          |    69          ROL        Indexed         6+             2+    |
  892.           ----------------------------------------------------------------
  893.  
  894.    Opcode and Mnemonics opcode reference table                          Page 12
  895.    
  896.    
  897.    
  898.    
  899.           ________________________________________________________________
  900.          |                                                                |
  901.          |  Opcode      Mnemonic        Mode         Cycles       Length  |
  902.          | (* 6309)                                                       |
  903.          |----------------------------------------------------------------|
  904.          |    6A          DEC        Indexed         6+             2+    |
  905.          |  * 6B          TIM        Indexed         7+             3+    |
  906.          |    6C          INC        Indexed         6+             2+    |
  907.          |    6D          TST        Indexed         6+ (5+)        2+    |
  908.          |    6E          JMP        Indexed         3+             2+    |
  909.          |    6F          CLR        Indexed         6+             2+    |
  910.          |    70          NEG        Extended        7  (6)         3     |
  911.          |  * 71          OIM        Extended        7              4     |
  912.          |  * 72          AIM        Extended        7              4     |
  913.          |    73          COM        Extended        7  (6)         3     |
  914.          |    74          LSR        Extended        7  (6)         3     |
  915.          |    76          ROR        Extended        7  (6)         3     |
  916.          |  * 75          EIM        Extended        7              4     |
  917.          |    77          ASR        Extended        7  (6)         3     |
  918.          |    78          ASL/LSL    Extended        7  (6)         3     |
  919.          |    79          ROL        Extended        7  (6)         3     |
  920.          |    7A          DEC        Extended        7  (6)         3     |
  921.          |  * 7B          TIM        Extended        7              4     |
  922.          |    7C          INC        Extended        7  (6)         3     |
  923.          |    7D          TST        Extended        7  (5)         3     |
  924.          |    7E          JMP        Extended        4  (3)         3     |
  925.          |    7F          CLR        Extended        7  (6)         3     |
  926.          |    80          SUBA       Immediate       2              2     |
  927.          |    81          CMPA       Immediate       2              2     |
  928.          |    82          SBCA       Immediate       2              2     |
  929.          |    83          SUBD       Immediate       4  (3)         3     |
  930.          |    84          ANDA       Immediate       2              2     |
  931.          |    85          BITA       Immediate       2              2     |
  932.          |    86          LDA        Immediate       2              2     |
  933.          |    88          EORA       Immediate       2              2     |
  934.          |    89          ADCA       Immediate       2              2     |
  935.          |    8A          ORA        Immediate       2              2     |
  936.          |    8B          ADDA       Immediate       2              2     |
  937.          |    8C          CMPX       Immediate       4  (3)         3     |
  938.          |    8D          BSR        Relative        7  (6)         2     |
  939.          |    8E          LDX        Immediate       3              3     |
  940.          |    90          SUBA       Direct          4  (3)         2     |
  941.          |    91          CMPA       Direct          4  (3)         2     |
  942.          |    92          SBCA       Direct          4  (3)         2     |
  943.          |    93          SUBD       Direct          6  (4)         2     |
  944.          |    94          ANDA       Direct          4  (3)         2     |
  945.          |    95          BITA       Direct          4  (3)         2     |
  946.          |    96          LDA        Direct          4  (3)         2     |
  947.          |    97          STA        Direct          4  (3)         2     |
  948.          |    98          EORA       Direct          4  (3)         2     |
  949.          |    99          ADCA       Direct          4  (3)         2     |
  950.          |    9A          ORA        Direct          4  (3)         2     |
  951.          |    9B          ADDA       Direct          4  (3)         2     |
  952.          |    9C          CMPX       Direct          6  (4)         2     |
  953.          |    9D          JSR        Direct          7  (6)         2     |
  954.          |    9E          LDX        Direct          5  (4)         2     |
  955.          |    9F          STX        Direct          5  (4)         2     |
  956.          |    A0          SUBA       Indexed         4+             2+    |
  957.          |    A1          CMPA       Indexed         4+             2+    |
  958.           ----------------------------------------------------------------
  959.  
  960.    Opcode and Mnemonics opcode reference table                          Page 13
  961.    
  962.    
  963.    
  964.    
  965.           ________________________________________________________________
  966.          |                                                                |
  967.          |  Opcode      Mnemonic        Mode         Cycles       Length  |
  968.          | (* 6309)                                                       |
  969.          |----------------------------------------------------------------|
  970.          |    A2          SBCA       Indexed         4+             2+    |
  971.          |    A3          SUBD       Indexed         6+ (5+)        2+    |
  972.          |    A4          ANDA       Indexed         4+             2+    |
  973.          |    A5          BITA       Indexed         4+             2+    |
  974.          |    A6          LDA        Indexed         4+             2+    |
  975.          |    A7          STA        Indexed         4+             2+    |
  976.          |    A8          EORA       Indexed         4+             2+    |
  977.          |    A9          ADCA       Indexed         4+             2+    |
  978.          |    AA          ORA        Indexed         4+             2+    |
  979.          |    AB          ADDA       Indexed         4+             2+    |
  980.          |    AC          CMPX       Indexed         6+ (5+)        2+    |
  981.          |    AD          JSR        Indexed         7+ (6+)        2+    |
  982.          |    AE          LDX        Indexed         5+             2+    |
  983.          |    AF          STX        Indexed         5+             2+    |
  984.          |    B0          SUBA       Extended        5  (4)         3     |
  985.          |    B1          CMPA       Extended        5  (4)         3     |
  986.          |    B2          SBCA       Extended        5  (4)         3     |
  987.          |    B3          SUBD       Extended        7  (5)         3     |
  988.          |    B4          ANDA       Extended        5  (4)         3     |
  989.          |    B5          BITA       Extended        5  (4)         3     |
  990.          |    B6          LDA        Extended        5  (4)         3     |
  991.          |    B7          STA        Extended        5  (4)         3     |
  992.          |    B8          EORA       Extended        5  (4)         3     |
  993.          |    B9          ADCA       Extended        5  (4)         3     |
  994.          |    BA          ORA        Extended        5  (4)         3     |
  995.          |    BB          ADDA       Extended        5  (4)         3     |
  996.          |    BC          CMPX       Extended        7  (5)         3     |
  997.          |    BD          JSR        Extended        8  (7)         3     |
  998.          |    BE          LDX        Extended        6  (5)         3     |
  999.          |    BF          STX        Extended        6  (5)         3     |
  1000.          |    C0          SUBB       Immediate       2              2     |
  1001.          |    C1          CMPB       Immediate       2              2     |
  1002.          |    C2          SBCB       Immediate       2              2     |
  1003.          |    C3          ADDD       Immediate       4  (3)         3     |
  1004.          |    C4          ANDB       Immediate       2              2     |
  1005.          |    C5          BITB       Immediate       2              2     |
  1006.          |    C6          LDB        Immediate       2              2     |
  1007.          |    C8          EORB       Immediate       2              2     |
  1008.          |    C9          ADCB       Immediate       2              2     |
  1009.          |    CA          ORB        Immediate       2              2     |
  1010.          |    CB          ADDB       Immediate       2              2     |
  1011.          |    CC          LDD        Immediate       3              3     |
  1012.          |  * CD          LDQ        Immediate       5              5     |
  1013.          |    CE          LDU        Immediate       3              3     |
  1014.          |    D0          SUBB       Direct          4  (3)         2     |
  1015.          |    D1          CMPB       Direct          4  (3)         2     |
  1016.          |    D2          SBCB       Direct          4  (3)         2     |
  1017.          |    D3          ADDD       Direct          6  (4)         2     |
  1018.          |    D4          ANDB       Direct          4  (3)         2     |
  1019.          |    D5          BITB       Direct          4  (3)         2     |
  1020.          |    D6          LDB        Direct          4  (3)         2     |
  1021.          |    D7          STB        Direct          4  (3)         2     |
  1022.          |    D8          EORB       Direct          4  (3)         2     |
  1023.          |    D9          ADCB       Direct          4  (3)         2     |
  1024.           ----------------------------------------------------------------
  1025.  
  1026.    Opcode and Mnemonics opcode reference table                          Page 14
  1027.    
  1028.    
  1029.    
  1030.           ________________________________________________________________
  1031.          |                                                                |
  1032.          |  Opcode      Mnemonic        Mode         Cycles       Length  |
  1033.          | (* 6309)                                                       |
  1034.          |----------------------------------------------------------------|
  1035.          |    DA          ORB        Direct          4  (3)         2     |
  1036.          |    DB          ADDB       Direct          4  (3)         2     |
  1037.          |    DC          LDD        Direct          5  (4)         2     |
  1038.          |    DD          STD        Direct          5  (4)         2     |
  1039.          |    DE          LDU        Direct          5  (4)         2     |
  1040.          |    DF          STU        Direct          5  (4)         2     |
  1041.          |    E0          SUBB       Indexed         4+             2+    |
  1042.          |    E1          CMPB       Indexed         4+             2+    |
  1043.          |    E2          SBCB       Indexed         4+             2+    |
  1044.          |    E3          ADDD       Indexed         6+ (5+)        2+    |
  1045.          |    E4          ANDB       Indexed         4+             2+    |
  1046.          |    E5          BITB       Indexed         4+             2+    |
  1047.          |    E6          LDB        Indexed         4+             2+    |
  1048.          |    E7          STB        Indexed         4+             2+    |
  1049.          |    E8          EORB       Indexed         4+             2+    |
  1050.          |    E9          ADCB       Indexed         4+             2+    |
  1051.          |    EA          ORB        Indexed         4+             2+    |
  1052.          |    EB          ADDB       Indexed         4+             2+    |
  1053.          |    EC          LDD        Indexed         5+             2+    |
  1054.          |    ED          STD        Indexed         5+             2+    |
  1055.          |    EE          LDU        Indexed         5+             2+    |
  1056.          |    EF          STU        Indexed         5+             2+    |
  1057.          |    F0          SUBB       Extended        5  (4)         3     |
  1058.          |    F1          CMPB       Extended        5  (4)         3     |
  1059.          |    F2          SBCB       Extended        5  (4)         3     |
  1060.          |    F3          ADDD       Extended        7  (5)         3     |
  1061.          |    F4          ANDB       Extended        5  (4)         3     |
  1062.          |    F5          BITB       Extended        5  (4)         3     |
  1063.          |    F6          LDB        Extended        5  (4)         3     |
  1064.          |    F7          STB        Extended        5  (4)         3     |
  1065.          |    F8          EORB       Extended        5  (4)         3     |
  1066.          |    F9          ADCB       Extended        5  (4)         3     |
  1067.          |    FA          ORB        Extended        5  (4)         3     |
  1068.          |    FB          ADDB       Extended        5  (4)         3     |
  1069.          |    FC          LDD        Extended        6  (5)         3     |
  1070.          |    FD          STD        Extended        6  (5)         3     |
  1071.          |    FE          LDU        Extended        6  (5)         3     |
  1072.          |    FF          STU        Extended        6  (5)         3     |
  1073.          |    1021        LBRN       Reletive       5/6 ( )         4     |
  1074.          |    1022        LBHI       Reletive       5/6 ( )         4     |
  1075.          |    1023        LBLS       Reletive       5/6 ( )         4     |
  1076.          |    1024        LBHS/LBCC  Reletive       5/6 ( )         4     |
  1077.          |    1025        LBCS/LBLO  Reletive       5/6 ( )         4     |
  1078.          |    1026        LBNE       Reletive       5/6 ( )         4     |
  1079.          |    1027        LBEQ       Reletive       5/6 ( )         4     |
  1080.          |    1028        LBVC       Reletive       5/6 ( )         4     |
  1081.          |    1029        LBVS       Reletive       5/6 ( )         4     |
  1082.          |    102A        LBPL       Reletive       5/6 ( )         4     |
  1083.          |    102B        LBMI       Reletive       5/6 ( )         4     |
  1084.          |    102C        LBGE       Reletive       5/6 ( )         4     |
  1085.          |    102D        LBLT       Reletive       5/6 ( )         4     |
  1086.          |    102E        LBGT       Reletive       5/6 ( )         4     |
  1087.          |    102F        LBLE       Reletive       5/6 ( )         4     |
  1088.          |  * 1030        ADDR       Register        4              3     |
  1089.           ----------------------------------------------------------------
  1090.  
  1091.  
  1092.    Opcode and Mnemonics opcode reference table                          Page 15
  1093.    
  1094.    
  1095.    
  1096.    
  1097.           ________________________________________________________________
  1098.          |                                                                |
  1099.          |  Opcode      Mnemonic        Mode         Cycles       Length  |
  1100.          | (* 6309)                                                       |
  1101.          |----------------------------------------------------------------|
  1102.          |  * 1031        ADCR       Register        4              3     |
  1103.          |  * 1032        SUBR       Register        4              3     |
  1104.          |  * 1033        SBCR       Register        4              3     |
  1105.          |  * 1034        ANDR       Register        4              3     |
  1106.          |  * 1035        ORR        Register        4              3     |
  1107.          |  * 1036        EORR       Register        4              3     |
  1108.          |  * 1037        CMPR       Register        4              3     |
  1109.          |  * 1038        PSHSW      Register        6              2     |
  1110.          |  * 1039        PULSW      Register        6              2     |
  1111.          |  * 103A        PSHUW      Register        6              2     |
  1112.          |  * 103B        PULUW      Register        6              2     |
  1113.          |    103F        SWI2       Inherent        20 (22)        2     |
  1114.          |  * 1040        NEGD       Inherent        3  (2)         2     |
  1115.          |  * 1043        COMD       Inherent        3  (2)         2     |
  1116.          |  * 1044        LSRD       Inherent        3  (2)         2     |
  1117.          |  * 1046        RORD       Inherent        3  (2)         2     |
  1118.          |  * 1047        ASRD       Inherent        3  (2)         2     |
  1119.          |  * 1048        ASLD/LSLD  Inherent        3  (2)         2     |
  1120.          |  * 1049        ROLD       Inherent        3  (2)         2     |
  1121.          |  * 104A        DECD       Inherent        3  (2)         2     |
  1122.          |  * 104C        INCD       Inherent        3  (2)         2     |
  1123.          |  * 104D        TSTD       Inherent        3  (2)         2     |
  1124.          |  * 104F        CLRD       Inherent        3  (2)         2     |
  1125.          |  * 1053        COMW       Inherent        3  (2)         2     |
  1126.          |  * 1054        LSRW       Inherent        3  (2)         2     |
  1127.        ? |  * 1056        RORW       Inherent        3  (2)         2     |
  1128.          |  * 1059        ROLW       Inherent        3  (2)         2     |
  1129.          |  * 105A        DECW       Inherent        3  (2)         2     |
  1130.          |  * 105C        INCW       Inherent        3  (2)         2     |
  1131.          |  * 105D        TSTW       Inherent        3  (2)         2     |
  1132.          |  * 105F        CLRW       Inherent        3  (2)         2     |
  1133.          |  * 1080        SUBW       Immediate       5  (4)         4     |
  1134.          |  * 1081        CMPW       Immediate       5  (4)         4     |
  1135.          |  * 1082        SBCD       Immediate       5  (4)         4     |
  1136.          |    1083        CMPD       Immediate       5  (4)         4     |
  1137.          |  * 1084        ANDD       Immediate       5  (4)         4     |
  1138.          |  * 1085        BITD       Immediate       5  (4)         4     |
  1139.          |  * 1086        LDW        Immediate       5  (4)         4     |
  1140.          |  * 1088        EORD       Immediate       5  (4)         4     |
  1141.          |  * 1089        ADCD       Immediate       5  (4)         4     |
  1142.          |  * 108A        ORD        Immediate       5  (4)         4     |
  1143.          |  * 108B        ADDW       Immediate       5  (4)         4     |
  1144.          |    108C        CMPY       Immediate       5  (4)         4     |
  1145.          |    108E        LDY        Immediate       5  (4)         4     |
  1146.          |  * 1090        SUBW       Direct          7  (5)         3     |
  1147.          |  * 1091        CMPW       Direct          7  (5)         3     |
  1148.          |  * 1092        SBCD       Direct          7  (5)         3     |
  1149.          |    1093        CMPD       Direct          7  (5)         3     |
  1150.          |  * 1094        ANDD       Direct          7  (5)         3     |
  1151.          |  * 1095        BITD       Direct          7  (5)         3     |
  1152.          |  * 1096        LDW        Direct          6  (5)         3     |
  1153.          |  * 1097        STW        Direct          6  (5)         3     |
  1154.          |  * 1098        EORD       Direct          7  (5)         3     |
  1155.          |  * 1099        ADCD       Direct          7  (5)         3     |
  1156.           ----------------------------------------------------------------
  1157.  
  1158.    Opcode and Mnemonics opcode reference table                          Page 16
  1159.    
  1160.    
  1161.    
  1162.    
  1163.           ________________________________________________________________
  1164.          |                                                                |
  1165.          |  Opcode      Mnemonic        Mode         Cycles       Length  |
  1166.          | (* 6309)                                                       |
  1167.          |----------------------------------------------------------------|
  1168.          |  * 109A        ORD        Direct          7  (5)         3     |
  1169.          |  * 109B        ADDW       Direct          7  (5)         3     |
  1170.          |    109C        CMPY       Direct          7  (5)         3     |
  1171.          |    109E        LDY        Direct          6  (5)         3     |
  1172.          |    109F        STY        Direct          6  (5)         3     |
  1173.          |  * 10A0        SUBW       Indexed         7+ (6+)        3+    |
  1174.          |  * 10A1        CMPW       Indexed         7+ (6+)        3+    |
  1175.          |  * 10A2        SBCD       Indexed         7+ (6+)        3+    |
  1176.          |    10A3        CMPD       Indexed         7+ (6+)        3+    |
  1177.          |  * 10A4        ANDD       Indexed         7+ (6+)        3+    |
  1178.          |  * 10A5        BITD       Indexed         7+ (6+)        3+    |
  1179.          |  * 10A6        LDW        Indexed         6+             3+    |
  1180.          |  * 10A7        STW        Indexed         6+             3+    |
  1181.          |  * 10A8        EORD       Indexed         7+ (6+)        3+    |
  1182.          |  * 10A9        ADCD       Indexed         7+ (6+)        3+    |
  1183.          |  * 10AA        ORD        Indexed         7+ (6+)        3+    |
  1184.          |  * 10AB        ADDW       Indexed         7+ (6+)        3+    |
  1185.          |    10AC        CMPY       Indexed         7+ (6+)        3+    |
  1186.          |    10AE        LDY        Indexed         6              3+    |
  1187.          |    10AF        STY        Indexed         6              3+    |
  1188.          |  * 10B0        SUBW       Extended        8  (6)         4     |
  1189.          |  * 10B1        CMPW       Extended        8  (6)         4     |
  1190.          |  * 10B2        SBCD       Extended        8  (6)         4     |
  1191.          |    10B3        CMPD       Extended        8  (6)         4     |
  1192.          |  * 10B4        ANDD       Extended        8  (6)         4     |
  1193.          |  * 10B5        BITD       Extended        8  (6)         4     |
  1194.          |  * 10B6        LDW        Extended        7  (6)         4     |
  1195.          |  * 10B7        STW        Extended        7  (6)         4     |
  1196.          |  * 10B8        EORD       Extended        8  (6)         4     |
  1197.          |  * 10B9        ADCD       Extended        8  (6)         4     |
  1198.          |  * 10BA        ORD        Extended        8  (6)         4     |
  1199.          |  * 10BB        ADDW       Extended        8  (6)         4     |
  1200.          |    10BC        CMPY       Extended        8  (6)         4     |
  1201.          |    10BE        LDY        Extended        7  (6)         4     |
  1202.          |    10BF        STY        Extended        7  (6)         4     |
  1203.          |    10CE        LDS        Immediate       4              4     |
  1204.          |  * 10DC        LDQ        Direct          8  (7)         3     |
  1205.          |  * 10DD        STQ        Direct          8  (7)         3     |
  1206.          |    10DE        LDS        Direct          6  (5)         3     |
  1207.          |    10DF        STS        Direct          6  (5)         3     |
  1208.          |  * 10DC        LDQ        Indexed         8+             3+    |
  1209.          |  * 10DD        STQ        Indexed         8+             3+    |
  1210.          |    10EE        LDS        Indexed         6+             3+    |
  1211.          |    10EF        STS        Indexed         6+             3+    |
  1212.          |  * 10DC        LDQ        Extended        9  (8)         4     |
  1213.          |  * 10DD        STQ        Extended        9  (8)         4     |
  1214.          |    10FE        LDS        Extended        7  (6)         4     |
  1215.          |    10FF        STS        Extended        7  (6)         4     |
  1216.          |  * 1130        BAND       Memory          7  (6)         4     |
  1217.          |  * 1131        BIAND      Memory          7  (6)         4     |
  1218.          |  * 1132        BOR        Memory          7  (6)         4     |
  1219.          |  * 1133        BIOR       Memory          7  (6)         4     |
  1220.          |  * 1134        BEOR       Memory          7  (6)         4     |
  1221.          |  * 1135        BIEOR      Memory          7  (6)         4     |
  1222.           ----------------------------------------------------------------
  1223.  
  1224.    Opcode and Mnemonics opcode reference table                          Page 17
  1225.    
  1226.    
  1227.    
  1228.    
  1229.           ________________________________________________________________
  1230.          |                                                                |
  1231.          |  Opcode      Mnemonic        Mode         Cycles       Length  |
  1232.          | (* 6309)                                                       |
  1233.          |----------------------------------------------------------------|
  1234.          |  * 1136        LDBT       Memory          7  (6)         4     |
  1235.          |  * 1137        STBT       Memory          8  (7)         4     |
  1236.          |  * 1138        TFM R+,R+  Register        6+3n           3     |
  1237.          |  * 1139        TFM R-,R-  Register        6+3n           3     |
  1238.          |  * 113A        TFM R+,R   Register        6+3n           3     |
  1239.          |  * 113B        TFM R,R+   Register        6+3n           3     |
  1240.          |  * 113C        BITMD      Immediate       4              3     |
  1241.          |  * 113D        LDMD       Immediate       5              5     |
  1242.          |    113F        SWI2       Inherent        20 ( )         2     |
  1243.          |  * 1143        COME       Inherent        3  (2)         2     |
  1244.          |  * 114A        DECE       Inherent        3  (2)         2     |
  1245.          |  * 114C        INCE       Inherent        3  (2)         2     |
  1246.          |  * 114D        TSTE       Inherent        3  (2)         2     |
  1247.          |  * 114F        CLRE       Inherent        3  (2)         2     |
  1248.          |  * 1153        COMF       Inherent        3  (2)         2     |
  1249.          |  * 115A        DECF       Inherent        3  (2)         2     |
  1250.          |  * 115C        INCF       Inherent        3  (2)         2     |
  1251.          |  * 115D        TSTF       Inherent        3  (2)         2     |
  1252.          |  * 115F        CLRF       Inherent        3  (2)         2     |
  1253.          |    11AC        CMPS       Indexed         7  ( )         3     |
  1254.          |  * 1180        SUBE       Immediate       3              3     |
  1255.          |  * 1181        CMPE       Immediate       3              3     |
  1256.          |    1183        CMPU       Immediate       5  (4)         4     |
  1257.          |  * 1186        LDE        Immediate       3              3     |
  1258.          |  * 118B        ADDE       Immediate       3              3     |
  1259.          |    118C        CMPS       Immediate       5  (4)         4     |
  1260.          |  * 118D        DIVD       Immediate       25             4     |
  1261.          |  * 118E        DIVQ       Immediate       36             4     |
  1262.          |  * 118F        MULD       Immediate       28             4     |
  1263.          |  * 1190        SUBE       Direct          5  (4)         3     |
  1264.          |  * 1191        CMPE       Direct          5  (4)         3     |
  1265.          |    1193        CMPU       Direct          7  (5)         3     |
  1266.          |  * 1196        LDE        Direct          5  (4)         3     |
  1267.          |  * 1197        STE        Direct          5  (4)         3     |
  1268.          |  * 119B        ADDE       Direct          5  (4)         3     |
  1269.          |    119C        CMPS       Direct          7  (5)         3     |
  1270.          |  * 119D        DIVD       Direct          27 (26)        3     |
  1271.          |  * 119E        DIVQ       Direct          36 (35)        3     |
  1272.          |  * 119F        MULD       Direct          30 (29)        3     |
  1273.          |  * 11A0        SUBE       Indexed         5+             3+    |
  1274.          |  * 11A1        CMPE       Indexed         5+             3+    |
  1275.          |    11A3        CMPU       Indexed         7+ (6+)        3+    |
  1276.          |  * 11A6        LDE        Indexed         5+             3+    |
  1277.          |  * 11A7        STE        Indexed         5+             3+    |
  1278.          |  * 11AB        ADDE       Indexed         5+             3+    |
  1279.          |    11AC        CMPS       Indexed         7+ (6+)        3+    |
  1280.          |  * 11AD        DIVD       Indexed         27+            3+    |
  1281.          |  * 11AE        DIVQ       Indexed         36+            3+    |
  1282.          |  * 11AF        MULD       Indexed         30+            3+    |
  1283.          |  * 11B0        SUBE       Extended        6  (5)         4     |
  1284.           ----------------------------------------------------------------
  1285.  
  1286.    Opcode and Mnemonics opcode reference table                          Page 18
  1287.    
  1288.    
  1289.    
  1290.    
  1291.           ________________________________________________________________
  1292.          |                                                                |
  1293.          |  Opcode      Mnemonic        Mode         Cycles       Length  |
  1294.          | (* 6309)                                                       |
  1295.          |----------------------------------------------------------------|
  1296.          |  * 11B1        CMPE       Extended        6  (5)         4     |
  1297.          |    11B3        CMPU       Extended        8  (6)         4     |
  1298.          |  * 11B6        LDE        Extended        6  (5)         4     |
  1299.          |  * 11B7        STE        Extended        6  (5)         4     |
  1300.          |  * 11BB        ADDE       Extended        6  (5)         4     |
  1301.          |    11BC        CMPS       Extended        8  (6)         4     |
  1302.          |  * 11BD        DIVD       Extended        28 (27)        4     |
  1303.          |  * 11BE        DIVQ       Extended        37 (36)        4     |
  1304.          |  * 11BF        MULD       Extended        31 (30)        4     |
  1305.          |  * 11C0        SUBF       Immediate       3              3     |
  1306.          |  * 11C1        CMPF       Immediate       3              3     |
  1307.          |  * 11C6        LDF        Immediate       3              3     |
  1308.          |  * 11CB        ADDF       Immediate       3              3     |
  1309.          |  * 11D0        SUBF       Direct          5  (4)         3     |
  1310.          |  * 11D1        CMPF       Direct          5  (4)         3     |
  1311.          |  * 11D6        LDF        Direct          5  (4)         3     |
  1312.          |  * 11D7        STF        Direct          5  (4)         3     |
  1313.          |  * 11DB        ADDF       Direct          5  (4)         3     |
  1314.          |  * 11E0        SUBF       Indexed         5+             3+    |
  1315.          |  * 11E1        CMPF       Indexed         5+             3+    |
  1316.          |  * 11E6        LDF        Indexed         5+             3+    |
  1317.          |  * 11E7        STF        Indexed         5+             3+    |
  1318.          |  * 11EB        ADDF       Indexed         5+             3+    |
  1319.          |  * 11F0        SUBF       Extended        6 (5)          4     |
  1320.          |  * 11F1        CMPF       Extended        6 (5)          4     |
  1321.          |  * 11F6        LDF        Extended        6 (5)          4     |
  1322.          |  * 11F7        STF        Extended        6 (5)          4     |
  1323.          |  * 11FB        ADDF       Extended        6 (5)          4     |
  1324.           ----------------------------------------------------------------
  1325.  
  1326.  
  1327.  
  1328.  
  1329.  
  1330.  
  1331.  
  1332.  
  1333.  
  1334.  
  1335.  
  1336.  
  1337.  
  1338.  
  1339.  
  1340.  
  1341.  
  1342.  
  1343.  
  1344.  
  1345.  
  1346.  
  1347.  
  1348.  
  1349.  
  1350.  
  1351.  
  1352.  
  1353.    Mnemonics Reference Table                                            Page 19
  1354.    
  1355.    
  1356.    
  1357.                                  Mnemonics Table
  1358.    
  1359.    
  1360.      _________________________________________________________________________
  1361.     |  Mnem  |   Immed.   |   Direct   |   Indexed  |  Extended  |  Inherent  |
  1362.     |        |            |            |            |            |            |
  1363.     |        | OP  ~/~  # | OP  ~/~  + | OP  ~/~  # | OP  ~/~  # | OP  ~/~  # |
  1364.     |--------+------------+------------+------------+------------+------------|
  1365.     | ABX    |            |            |            |            | 3A  3/1  1 |
  1366.     | ADCA   | 89   2   2 | 99  4/3  2 | A9  4+   2+| B9  5/4  3 |            |
  1367.     | ADCB   | C9   2   2 | D9  4/3  2 | E9  4+   2+| F9  5/3  3 |            |
  1368.     |*ADCD   | 10  5/4  4 | 10  7/5  3 | 10 7+/6+ 3+| 10  8/6  4 |            |
  1369.     |        | 89         | 99         | A9         | B9         |            |
  1370.     |--------+------------+------------+------------+------------+------------|
  1371.     | ADDA   | 8B   2   2 | 9B  4/3  2 | AB  4+   2+| BB  5/4  3 |            |
  1372.     | ADDB   | CB   2   2 | DB  4/3  2 | EB  4+   2+| FB  5/4  3 |            |
  1373.     | ADDD   | C3  4/3  3 | D3  6/4  2 | E3 6+/5+ 2+| F3  7/5  3 |            |
  1374.     |*ADDE   | 11   3   3 | 11  5/4  3 | 11  5+   3+| 11  6/5  4 |            |
  1375.     |        | 8B         | 9B         | AB         | BB         |            |
  1376.     |*ADDF   | 11   3   3 | 11  5/4  3 | 11  5+   3+| 11  6/5  4 |            |
  1377.     |        | CB         | DB         | EB         | FB         |            |
  1378.     |*ADDW   | 10  5/4  4 | 10  7/5  3 | 10 7+/6+ 3+| 10  8/6  4 |            |
  1379.     |        | 8B         | 9B         | AB         | BB         |            |
  1380.     |--------+------------+------------+------------+------------+------------|
  1381.     |*AIM    |            | 02   6   3 | 62   7+  3+| 72   7   4 |            |
  1382.     |--------+------------+------------+------------+------------+------------|
  1383.     | ANDA   | 84   2   2 | 94  4/3  2 | A4   4+  2 | B4  5/4  3 |            |
  1384.     | ANDB   | C4   2   2 | D4  4/3  2 | E4   4+  2 | F4  5/4  3 |            |
  1385.     | ANDCC  | 1C   3   2 |            |            |            |            |
  1386.     |*ANDD   | 10  5/4  4 | 10  7/5  3 | 10 7+/6+ 3+| 10  8/6  4 |            |
  1387.     |        | 84         | 94         | A4         | B4         |            |
  1388.     |--------+------------+------------+------------+------------+------------|
  1389.     | ASLA   |            |            |            |            | 48  2/1  1 |
  1390.     | ASLB   |            |            |            |            | 58  2/1  1 |
  1391.     |*ASLD   |            |            |            |            | 10  3/2  2 |
  1392.     |        |            |            |            |            | 48         |
  1393.     | ASL    |            | 08  6/5  2 | 68  6+   2+| 78  7/6  3 |            |
  1394.     |--------+------------+------------+------------+------------+------------|
  1395.     | ASRA   |            |            |            |            | 47  2/1  1 |
  1396.     | ASRB   |            |            |            |            | 57  2/1  1 |
  1397.     |*ASRD   |            |            |            |            | 10  3/2  1 |
  1398.     |        |            |            |            |            | 47         |
  1399.     | ASR    |            | 07  6/6  2 | 67  6+   2+| 77  7/6  3 |            |
  1400.     |--------+------------+------------+------------+------------+------------|
  1401.     | BITA   | 85   2   2 | 95  4/3  2 | A5   4+  2+| B5  5/4  3 |            |
  1402.     | BITB   | C5   2   2 | D5  4/3  2 | E5   4+  2+| F5  5/4  3 |            |
  1403.     | BITD   | 10  5/4  4 | 10  7/5  3 | 10 7+/6+ 3+| 10  8/6  4 |            |
  1404.     |        | 85         | 95         | A5         | B5         |            |
  1405.     | BITMD  | 11   4   3 |            |            |            |            |
  1406.     |        | 3C         |            |            |            |            |
  1407.     |--------+------------+------------+------------+------------+------------|
  1408.     | CLRA   |            |            |            |            | 4F  2/1  1 |
  1409.     | CLRB   |            |            |            |            | 5F  2/1  1 |
  1410.     |*CLRD   |            |            |            |            | 10  3/2  2 |
  1411.     |        |            |            |            |            | 4F         |
  1412.     |*CLRE   |            |            |            |            | 11  3/2  2 |
  1413.     |        |            |            |            |            | 4F         |
  1414.     |*CLRF   |            |            |            |            | 11  3/2  2 |
  1415.     |        |            |            |            |            | 5F         |
  1416.     |*CLRW   |            |            |            |            | 10  3/2  2 |
  1417.     |        |            |            |            |            | 5F         |
  1418.     | CLR    |            | 0F  6/5  2 | 6F   6+  2+| 7F  7/6  3 |            |
  1419.      -------------------------------------------------------------------------
  1420.  
  1421.    Mnemonics Reference Table                                            Page 20
  1422.    
  1423.    
  1424.      _________________________________________________________________________
  1425.     |  Mnem  |   Immed.   |   Direct   |   Indexed  |  Extended  |  Inherent  |
  1426.     |        |            |            |            |            |            |
  1427.     |        | OP  ~/~  # | OP  ~/~  + | OP  ~/~  # | OP  ~/~  # | OP  ~/~  # |
  1428.     |--------+------------+------------+------------+------------+------------|
  1429.     | CMPA   | 81   2   2 | 91  4/3  2 | A1   4+  2+| B1  5/4  3 |            |
  1430.     | CMPB   | C1   2   2 | D1  4/3  2 | E1   4+  2+| F1  5/4  3 |            |
  1431.     | CMPD   | 10  5/4  4 | 10  7/5  3 | 10 7+/6+ 3+| 10  8/6  4 |            |
  1432.     |        | 83         | 93         | A3         | B3         |            |
  1433.     |*CMPE   | 11   3   3 | 11  5/4  3 | 11   5+  3+| 11  6/5  4 |            |
  1434.     |        | 81         | 91         | A1         | B1         |            |
  1435.     |*CMPF   | 11   3   3 | 11  5/4  3 | 11   5+  3+| 11  6/5  4 |            |
  1436.     |        | C1         | D1         | E1         | F1         |            |
  1437.     | CMPS   | 11  5/4  4 | 11  7/5  3 | 11 7+/6+ 3+| 11  8/6  4 |            |
  1438.     |        | 8C         | 9C         | AC         | BC         |            |
  1439.     | CMPU   | 11  5/4  4 | 11  7/5  3 | 11 7+/6+ 3+| 11  8/6  4 |            |
  1440.     |        | 83         | 93         | A3         | B3         |            |
  1441.     |*CMPW   | 10  5/4  4 | 10  7/5  3 | 10 7+/6+ 3+| 10  8/6  4 |            |
  1442.     |        | 81         | 91         | A1         | B1         |            |
  1443.     | CMPX   | 8C  4/3  3 | 9C  6/4  2 | AC 6+/5+ 2+| BC  7/5  3 |            |
  1444.     | CMPY   | 10  5/4  4 | 10  7/5  3 | 10 7+/6+ 3+| 10  8/6  4 |            |
  1445.     |        | 8C         | 9C         | AC         | BC         |            |
  1446.     |--------+------------+------------+------------+------------+------------|
  1447.     | COMA   |            |            |            |            | 43  2/1  1 |
  1448.     | COMB   |            |            |            |            | 53  2/1  1 |
  1449.     |*COMD   |            |            |            |            | 10  3/2  2 |
  1450.     |        |            |            |            |            | 43         |
  1451.     |*COME   |            |            |            |            | 11  3/2  2 |
  1452.     |        |            |            |            |            | 43         |
  1453.     |*COMF   |            |            |            |            | 11  3/2  2 |
  1454.     |        |            |            |            |            | 53         |
  1455.     |*COMW   |            |            |            |            | 10  3/2  2 |
  1456.     |        |            |            |            |            | 53         |
  1457.     | COM    |            | 03  6/5  2 | 63   6+  2+| 73  7/6  3 |            |
  1458.     |--------+------------+------------+------------+------------+------------|
  1459.     | CWAI   | 3C 22/20 2 |            |            |            |            |
  1460.     |--------+------------+------------+------------+------------+------------|
  1461.     | DAA    |            |            |            |            | 19  2/1  1 |
  1462.     |--------+------------+------------+------------+------------+------------|
  1463.     | DECA   |            |            |            |            | 4A  2/1  1 |
  1464.     | DECB   |            |            |            |            | 5A  2/1  1 |
  1465.     |*DECD   |            |            |            |            | 10  3/2  2 |
  1466.     |        |            |            |            |            | 4A         |
  1467.     |*DECE   |            |            |            |            | 11  3/2  2 |
  1468.     |        |            |            |            |            | 4A         |
  1469.     |*DECF   |            |            |            |            | 11  3/2  2 |
  1470.     |        |            |            |            |            | 5A         |
  1471.     |*DECW   |            |            |            |            | 10  3/2  2 |
  1472.     |        |            |            |            |            | 5A         |
  1473.     | DEC    |            | 0A  6/5  2 | 6A   6+  2+| 7A  7/6  3 |            |
  1474.     |--------+------------+------------+------------+------------+------------|
  1475.     |*DIVD   | 11   25  3 | 11 27/26 3 | 11  27+  3+| 11 28/27 4 |            |
  1476.     |        | 8D         | 9D         | AD         | BD         |            |
  1477.     |*DIVQ   | 11   34  4 | 11 36/35 3 | 11  36+  3+| 11 37/36 4 |            |
  1478.     |        | 8E         | 9E         | AE         | BE         |            |
  1479.     |--------+------------+------------+------------+------------+------------|
  1480.     |*EIM    |            | 05   6   3 | 65   7+  3+| 75   7   4 |            |
  1481.     |--------+------------+------------+------------+------------+------------|
  1482.     | EORA   | 88   2   2 | 98  4/3  2 | A8   4+  2+| B8  5/4  3 |            |
  1483.     | EORB   | C8   2   # | D8  4/3  2 | E8   4+  2+| F8  5/4  3 |            |
  1484.     |*EORD   | 10  5/4  4 | 10  7/5  3 | 10 7+/6+ 3+| 10  8/6  4 |            |
  1485.     |        | 88         | 98         | A8         | B8         |            |
  1486.      -------------------------------------------------------------------------
  1487.  
  1488.  
  1489.    Mnemonics Reference Table                                            Page 21
  1490.    
  1491.    
  1492.      _________________________________________________________________________
  1493.     |  Mnem  |   Immed.   |   Direct   |   Indexed  |  Extended  |  Inherent  |
  1494.     |        |            |            |            |            |            |
  1495.     |        | OP  ~/~  # | OP  ~/~  + | OP  ~/~  # | OP  ~/~  # | OP  ~/~  # |
  1496.     |--------+------------+------------+------------+------------+------------|
  1497.     | EXG    | 1E  8/5  2 |            |            |            |            |
  1498.     |--------+------------+------------+------------+------------+------------|
  1499.     | INCA   |            |            |            |            | 4C  2/1  1 |
  1500.     | INCB   |            |            |            |            | 5C  2/1  1 |
  1501.     |*INCD   |            |            |            |            | 10  3/2  2 |
  1502.     |        |            |            |            |            | 4C         |
  1503.     |*INCE   |            |            |            |            | 11  3/2  2 |
  1504.     |        |            |            |            |            | 4C         |
  1505.     |*INCF   |            |            |            |            | 11  3/2  2 |
  1506.     |        |            |            |            |            | 5C         |
  1507.     |*INCW   |            |            |            |            | 10  3/2  2 |
  1508.     |        |            |            |            |            | 5C         |
  1509.     | INC    |            | 0C  6/5  2 | 6C   6+  2+| 7C  7/6  3 |            |
  1510.     |--------+------------+------------+------------+------------+------------|
  1511.     | JMP    |            | 0E  3/2  2 | 6E   3+  2+| 7E  4/3  3 |            |
  1512.     |--------+------------+------------+------------+------------+------------|
  1513.     | JSR    |            | 9D  7/6  2 | AD 7+/6+ 2+| BD  8/7  3 |            |
  1514.     |--------+------------+------------+------------+------------+------------|
  1515.     | LDA    | 86   2   2 | 96  4/3  2 | A6   4+  2+| B6  5/4  3 |            |
  1516.     | LDB    | C6   2   2 | D6  4/3  2 | E6   4+  2+| F6  5/4  3 |            |
  1517.     | LDD    | CC   3   3 | DC  5/4  2 | EC   5+  2+| FC  6/5  3 |            |
  1518.     |*LDE    | 11   3   3 | 11  5/4  3 | 11   5+  3+| 11  6/5  4 |            |
  1519.     |        | 86         | 96         | A6         | B6         |            |
  1520.     |*LDF    | 11   3   3 | 11  5/4  3 | 11   5+  3+| 11  6/5  4 |            |
  1521.     |        | C6         | D6         | E6         | F6         |            |
  1522.     |*LDQ    | CD   5   5 | 10  8/7  3 | 10   8+  3+| 10  9/8  4 |            |
  1523.     |        |            | DC         | EC         | FC         |            |
  1524.     | LDS    | 10   4   4 | 10  6/5  3 | 10   6+  3+| 10  7/6  4 |            |
  1525.     |        | CE         | DE         | EE         | FE         |            |
  1526.     | LDU    | CE   3   3 | DE  5/4  2 | EE   5+  2+| FE  6/5  3 |            |
  1527.     |*LDW    | 10   4   4 | 10  6/5  3 | 10   6+  3+| 10  7/6  4 |            |
  1528.     |        | 86         | 96         | A6         | B6         |            |
  1529.     | LDX    | 8E   3   3 | 9E  5/4  2 | AE   5+  2+| BE  6/5  3 |            |
  1530.     | LDY    | 10   4   4 | 10  6/5  3 | 10   6+  3+| 10  7/6  4 |            |
  1531.     |        | 8E         | 9E         | AE         | BE         |            |
  1532.     |*LDMD   | 11   5   3 |            |            |            |            |
  1533.     |        | 3D         |            |            |            |            |
  1534.     |--------+------------+------------+------------+------------+------------|
  1535.     | LEAS   |            |            | 32   4+  2+|            |            |
  1536.     | LEAU   |            |            | 33   4+  2+|            |            |
  1537.     | LEAX   |            |            | 30   4+  2+|            |            |
  1538.     | LEAY   |            |            | 31   4+  2+|            |            |
  1539.     |--------+------------+------------+------------+------------+------------|
  1540.     | LSLA/LSLB/LSLD/LSL - Same as ASL                                        |
  1541.     |--------+------------+------------+------------+------------+------------|
  1542.     | LSRA   |            |            |            |            | 44  2/1  1 |
  1543.     | LSRB   |            |            |            |            | 54  2/1  1 |
  1544.     |*LSRD   |            |            |            |            | 10  3/2  2 |
  1545.     |        |            |            |            |            | 44         |
  1546.     |*LSRW   |            |            |            |            | 10  3/2  2 |
  1547.     |        |            |            |            |            | 54         |
  1548.     | LSR    |            | 04  6/5  2 | 64   6+  2+| 74  7/6  3 |            |
  1549.     |--------+------------+------------+------------+------------+------------|
  1550.     | MUL    |            |            |            |            | 3D 11/10 1 |
  1551.     |*MULD   | 11   28  4 | 11 30/29 3 | 11  30+  3+| 11 31/30 4 |            |
  1552.     |        | 8F         | 9F         | AF         | BF         |            |
  1553.      -------------------------------------------------------------------------
  1554.  
  1555.    Mnemonics Reference Table                                            Page 22
  1556.    
  1557.    
  1558.      _________________________________________________________________________
  1559.     |  Mnem  |   Immed.   |   Direct   |   Indexed  |  Extended  |  Inherent  |
  1560.     |        |            |            |            |            |            |
  1561.     |        | OP  ~/~  # | OP  ~/~  + | OP  ~/~  # | OP  ~/~  # | OP  ~/~  # |
  1562.     |--------+------------+------------+------------+------------+------------|
  1563.     | NEGA   |            |            |            |            | 40  2/1  1 |
  1564.     | NEGB   |            |            |            |            | 50  2/1  1 |
  1565.     |*NEGD   |            |            |            |            | 10  3/2  2 |
  1566.     |        |            |            |            |            | 40         |
  1567.     | NEG    |            | 00  6/5  2 | 60   6+  2+| 70  7/6  3 |            |
  1568.     |--------+------------+------------+------------+------------+------------|
  1569.     | NOP    |            |            |            |            | 12  2/1  1 |
  1570.     |--------+------------+------------+------------+------------+------------|
  1571.     |*OIM    |            | 01   6   3 | 61   7+  3+| 71   7   4 |            |
  1572.     |--------+------------+------------+------------+------------+------------|
  1573.     | ORA    | 8A   2   2 | 9A  4/3  2 | AA   4+  2 | BA  5/4  3 |            |
  1574.     | ORB    | CA   2   2 | DA  4/3  2 | EA   4+  2 | FA  5/4  3 |            |
  1575.     | ORCC   | 1A  3/2  2 |            |            |            |            |
  1576.     |*ORD    | 10  5/4  4 | 10  7/5  3 | 10 7+/6+ 3+| 10  8/6  4 |            |
  1577.     |        | 8A         | 9A         | AA         | BA         |            |
  1578.     |--------+------------+------------+------------+------------+------------|
  1579.     | PSHS   | 34 5+/4+ 2 |            |            |            |            |
  1580.     | PSHU   | 36 5+/4+ 2 |            |            |            |            |
  1581.     |*PSHSW  | 10   6   2 |            |            |            |            |
  1582.     |        | 38   6   2 |            |            |            |            |
  1583.     |*PSHUW  | 10   6   2 |            |            |            |            |
  1584.     |        | 3A   6   2 |            |            |            |            |
  1585.     |--------+------------+------------+------------+------------+------------|
  1586.     | PULS   | 35 5+/4+ 2 |            |            |            |            |
  1587.     | PULU   | 37 5+/4+ 2 |            |            |            |            |
  1588.     |*PULSW  | 10   6   2 |            |            |            |            |
  1589.     |        | 39         |            |            |            |            |
  1590.     |*PULUW  | 10   6   2 |            |            |            |            |
  1591.     |        | 3B         |            |            |            |            |
  1592.     |--------+------------+------------+------------+------------+------------|
  1593.     | ROLA   |            |            |            |            | 49  2/1  1 |
  1594.     | ROLB   |            |            |            |            | 59  2/1  1 |
  1595.     |*ROLD   |            |            |            |            | 10  3/2  2 |
  1596.     |        |            |            |            |            | 49         |
  1597.     |*ROLW   |            |            |            |            | 10  3/2  2 |
  1598.     |        |            |            |            |            | 59         |
  1599.     | ROL    |            | 09  6/5  2 | 69   6+  2+| 79  7/6  3 |            |
  1600.     |--------+------------+------------+------------+------------+------------|
  1601.     | RORA   |            |            |            |            | 46  2/1  1 |
  1602.     | RORB   |            |            |            |            | 56  2/1  1 |
  1603.     |*RORD   |            |            |            |            | 10  3/2  2 |
  1604.     |        |            |            |            |            | 46         |
  1605.     |*RORW   |            |            |            |            | 10  3/2  2 |
  1606.     |        |            |            |            |            | 56         |
  1607.     | ROR    |            | 06  6/5  2 | 66   6+  2+| 76  7/6  3 |            |
  1608.     |--------+------------+------------+------------+------------+------------|
  1609.     | RTI    |            |            |            |            | 3B  6/17 1 |
  1610.     |        |            |            |            |            |    15/17   |
  1611.     |--------+------------+------------+------------+------------+------------|
  1612.     | RTS    |            |            |            |            | 39  5/4  1 |
  1613.     |--------+------------+------------+------------+------------+------------|
  1614.     | SBCA   | 82   2   2 | 92  4/3  2 | A2   4+  2+| B2  5/4  3 |            |
  1615.     | SBCB   | C2   2   2 | D2  4/3  2 | E2   4+  2+| F2  5/2  3 |            |
  1616.     |*SBCD   | 10  5/4  4 | 10  7/5  3 | 10 7+/6+ 3+| 10  8/6  4 |            |
  1617.     |        | 82         | 92         | A2         | B2         |            |
  1618.     |--------+------------+------------+------------+------------+------------|
  1619.     | SEX    |            |            |            |            | 1D  2/1  1 |
  1620.     |*SEXW   |            |            |            |            | 14   4   1 |
  1621.      -------------------------------------------------------------------------
  1622.  
  1623.  
  1624.    Mnemonics Reference Table                                            Page 23
  1625.    
  1626.    
  1627.      _________________________________________________________________________
  1628.     |  Mnem  |   Immed.   |   Direct   |   Indexed  |  Extended  |  Inherent  |
  1629.     |        |            |            |            |            |            |
  1630.     |        | OP  ~/~  # | OP  ~/~  + | OP  ~/~  # | OP  ~/~  # | OP  ~/~  # |
  1631.     |--------+------------+------------+------------+------------+------------|
  1632.     | STA    |            | 97  4/3  2 | A7   4+  2+| B7  5/4  3 |            |
  1633.     | STB    |            | D7  4/3  2 | E7   4+  2+| F7  5/4  3 |            |
  1634.     | STD    |            | DC  5/4  2 | EC   5+  2+| FC  6/5  3 |            |
  1635.     |*STE    |            | 11  5/4  3 | 11   5+  3+| 11  6/5  4 |            |
  1636.     |        |            | 97         | A7         | B7         |            |
  1637.     |*STF    |            | 11  5/4  3 | 11   5+  3+| 11  6/5  4 |            |
  1638.     |        |            | D7         | E7         | F7         |            |
  1639.     |*STQ    |            | 10  8/7  3 | 10   8+  3+| 10  9/8  4 |            |
  1640.     |        |            | DD         | ED         | FD         |            |
  1641.     |*STS    |            | 10  6/5  3 | 10   6+  3+| 10  7/6  4 |            |
  1642.     |        |            | DF         | EF         | FF         |            |
  1643.     | STU    |            | DF  5/4  2 | EF   5+  2+| FF  6/5  3 |            |
  1644.     |*STW    |            | 10  6/5  3 | 10   6+  3+| 10  7/6  4 |            |
  1645.     |        |            | 97         | A7         | B7         |            |
  1646.     | STX    |            | 9F  5/4  2 | AF   5+  2+| BF  6/5  3 |            |
  1647.     | STY    |            | 10  6/5  3 | 10   6+  3+| 10  7/6  4 |            |
  1648.     |        |            | 9F         | AF         | BF         |            |
  1649.     |--------+------------+------------+------------+------------+------------|
  1650.     | SUBA   | 80   2   2 | 90  4/3  2 | A0   4+  2+| B0  5/4  3 |            |
  1651.     | SUBB   | C0   2   2 | D0  4/3  2 | E0   4+  2+| F0  5/4  3 |            |
  1652.     | SUBD   | 83  4/3  3 | 93  6/4  3 | A3 6+/5+ 2+| B3  7/5  3 |            |
  1653.     |*SUBE   | 11   3   3 | 11  5/4  3 | 11   5+  3+| 11  6/5  4 |            |
  1654.     |        | 80         | 90         | A0         | B0         |            |
  1655.     |*SUBF   | 11   3   3 | 11  5/4  3 | 11   5+  3+| 11  6/5  4 |            |
  1656.     |        | C0         | D0         | E0         | F0         |            |
  1657.     |*SUBW   | 10  5/4  4 | 10  7/5  3 | 10 7+/6+ 3+| 10  8/6  4 |            |
  1658.     |        | 80         | 90         | A0         | B0         |            |
  1659.     |--------+------------+------------+------------+------------+------------|
  1660.     | SWI    |            |            |            |            | 3F 19/21 1 |
  1661.     | SWI2   |            |            |            |            | 10 20/22 2 |
  1662.     |        |            |            |            |            | 3F         |
  1663.     | SWI3   |            |            |            |            | 11 20/22 2 |
  1664.     |        |            |            |            |            | 3F         |
  1665.     |--------+------------+------------+------------+------------+------------|
  1666.     | SYNC   |            |            |            |            | 13 2+/1+ 1 |
  1667.     |--------+------------+------------+------------+------------+------------|
  1668.     | TFR   1| 1F  6/4  2 |            |            |            |            |
  1669.     |--------+------------+------------+------------+------------+------------|
  1670.     |*TIM    |            | 0B   6   3 | 6B   7+  3+| 7B   5   4 |            |
  1671.     |--------+------------+------------+------------+------------+------------|
  1672.     | TSTA   |            |            |            |            | 4D  2/1  1 |
  1673.     | TSTB   |            |            |            |            | 5D  2/1  1 |
  1674.     |*TSTD   |            |            |            |            | 10  3/2  2 |
  1675.     |        |            |            |            |            | 4D         |
  1676.     |*TSTE   |            |            |            |            | 11  3/2  2 |
  1677.     |        |            |            |            |            | 4D         |
  1678.     |*TSTF   |            |            |            |            | 11  3/2  2 |
  1679.     |        |            |            |            |            | 5D         |
  1680.     |*TSTW   |            |            |            |            | 10  3/2  2 |
  1681.     |        |            |            |            |            | 5D         |
  1682.     | TST    |            | 0D  6/4  2 | 6D 6+/5+ 2+| 7D  7/5  3 |            |
  1683.      _________________________________________________________________________
  1684.  
  1685.  
  1686.  
  1687.  
  1688.  
  1689.  
  1690.  
  1691.  
  1692.    Mnemonics Reference Table                                            Page 24
  1693.    
  1694.    
  1695.    
  1696.                                Branch Instructions
  1697.      _____________________     _____________________     _____________________
  1698.     |  Mnem  |   Immed.   |   |  Mnem  |   Immed.   |   |  Mnem  |   Immed.   |
  1699.     |        |            |   |        |            |   |        |            |
  1700.     |        | OP  ~/~  # |   |        | OP  ~/~  # |   |        | OP  ~/~  # |
  1701.     |--------+------------+   |--------+------------+   |--------+------------+
  1702.     | BCC    | 24   3   2 |   | BLE    | 2F   3   2 |   | BPL    | 2A   3   2 |
  1703.     | LBCC   | 10  5/6  4 |   | LBLE   | 10  5/6  4 |   | LBPL   | 10  5/6  4 |
  1704.     |        | 24         |   |        | 2F         |   |        | 2A         |
  1705.     | BCS    | 25   3   2 |   | BLO    | 25   3   2 |   | BRA    | 20   3   2 |
  1706.     | LBCS   | 10  5/6  4 |   | LBLO   | 10  5/6  4 |   | LBRA   | 16  5/4  3 |
  1707.     |        | 25         |   |        | 25         |   |        |            |
  1708.     | BEQ    | 27   3   2 |   | BLS    | 23   3   2 |   | BRN    | 21   3   2 |
  1709.     | LBEQ   | 10  5/6  4 |   | LBLS   | 10  5/6  4 |   | LBRN   | 10  5/6  4 |
  1710.     |        | 27         |   |        | 23         |   |        | 21         |
  1711.     | BGE    | 2C   3   2 |   | BLT    | 2D   3   2 |   | BSR    | 8D  7/6  2 |
  1712.     | LBGE   | 10  5/6  4 |   | LBLT   | 10  5/6  4 |   | LBSR   | 17  9/7  3 |
  1713.     |        | 2C         |   |        | 2D         |   |        |            |
  1714.     | BGT    | 2E   3   2 |   | BMI    | 28   3   2 |   | BVC    | 28   3   2 |
  1715.     | LBGT   | 10  5/6  4 |   | LBMI   | 10  5/6  4 |   | LBVC   | 10  5/6  4 |
  1716.     |        | 2E         |   |        | 28         |   |        | 28         |
  1717.     | BHI    | 22   3   2 |   | BNE    | 26   3   2 |   | BVS    | 29   3   2 |
  1718.     | LBHI   | 10  5/6  4 |   | LBNE   | 10  5/6  4 |   | LBVS   | 10  5/6  4 |
  1719.     |        | 22         |   |        | 26         |   |        | 29         |
  1720.     | BHS    | 2F   3   2 |    ---------------------     --------------------- 
  1721.     | LBHS   | 10  5/6  4 |
  1722.     |        | 2F         |
  1723.      ---------------------
  1724.    
  1725.    
  1726.                             Bit Transfer/Manipulation
  1727.    
  1728.      _____________________
  1729.     |  Mnem  |   Direct   |                  Post-Byte
  1730.     |        |            |
  1731.     |        | OP  ~/~  # |          --------------------------
  1732.     |--------+------------|         | 7  6 | 5  4  3 | 2  1  0 |
  1733.     |*BAND   | 11  7/6  4 |          --------------------------
  1734.     |        | 30         |
  1735.     |*BIAND  | 11  7/6  4 |          Bits 7 and 6: Register 
  1736.     |        | 31         |
  1737.     |*BOR    | 11  7/6  4 |            00 - CC   10 - B
  1738.     |        | 32         |            01 - A    11 - Unused
  1739.     |*BIOR   | 11  7/6  4 |
  1740.     |        | 33         |          Bits 5, 4 and 3: Source Bit
  1741.     |*BEOR   | 11  7/6  4 |
  1742.     |        | 34         |          Bits 2, 1 and 0: Destination bit
  1743.     |*BIEOR  | 11  7/6  4 |
  1744.     |        | 35         |
  1745.     |*LDBT   | 11  7/6  4 |      Source/Destination Bit in binary form:
  1746.     |        | 36         |
  1747.     |*STBT   | 11  8/7  4 |      0 - 000   2 - 010   5 - 100    6 - 110
  1748.     |        | 37         |      1 - 001   3 - 011   5 - 101    7 - 111
  1749.      ---------------------
  1750.    
  1751.         Both  the  source  and  destination  bit  portions of the post-byte are
  1752.    looked at by the 6309 as the actual bit NUMBER to  transfer/store.  Use  the
  1753.    binary  equivilant  of the numbers (0 thru 7) and position them into the bit
  1754.    area of the post byte. 
  1755.  
  1756.  
  1757.  
  1758.    Mnemonics Reference Table                                            Page 25
  1759.    
  1760.    
  1761.    
  1762.                             Logical Memory Operations
  1763.    
  1764.      _________________________________________________________________________
  1765.     |  Mnem  |   Immed.   |   Direct   |   Indexed  |  Extended  |  Inherent  |
  1766.     |        |            |            |            |            |            |
  1767.     |        | OP  ~/~  # | OP  ~/~  # | OP  ~/~  # | OP  ~/~  # | OP  ~/~  # |
  1768.     |--------+------------+------------+------------+------------+------------|
  1769.     |*AIM    |            | 02   6   3 | 62   7+  3+| 72   7   4 |            |
  1770.     |*EIM    |            | 05   6   3 | 65   7+  3+| 75   7   4 |            |
  1771.     |*OIM    |            | 01   6   3 | 61   7+  3+| 71   7   4 |            |
  1772.     |*TIM    |            | 0B   6   3 | 6B   7+  3+| 7B   5   4 |            |
  1773.      -------------------------------------------------------------------------
  1774.    
  1775.    
  1776.    
  1777.         Inter-Register Instructions               Transfer/Exchange and
  1778.      __________________________________          Inter-Register Post Byte
  1779.     |  Mnem  |   Forms    |  Register  |
  1780.     |        |            |            |     _______________|_______________
  1781.     |        |            | OP  ~/~  + |    |   |   |   |   |   |   |   |   |
  1782.     |--------+------------+------------|    |     SOURCE    |  DESTINATION  | 
  1783.     |*ADCR   | R0,R1      | 10   4   3 |    |___|___|___|___|___|___|___|___| 
  1784.     |        |            | 31         |        HI NIBBLE   |  LOW NIBBLE
  1785.     |*ADDR   | R0,R1      | 10   4   3 |
  1786.     |        |            | 30         |
  1787.     |*ANDR   | R0,R1      | 10   4   3 |             Register Field
  1788.     |        |            | 34         |          (source or destination) 
  1789.     |*CMPR   | R0,R1      | 10   4   3 |
  1790.     |        |            | 37         |      0000 - D (A:B)    1000 - A
  1791.     |*EORR   | R0,R1      | 10   4   3 |      0001 - X          1001 - B 
  1792.     |        |            | 36         |      0010 - Y          1010 - CCR
  1793.     | EXG    | R0,R1      | 1E  8/5  2 |      0011 - U          1011 - DPR 
  1794.     |*ORR    | R0,R1      | 10   4   3 |      0100 - S          1100 - 0
  1795.     |        |            | 35         |      0101 - PC         1101 - 0 
  1796.     |*SBCR   | R0,R1      | 10   4   3 |      0110 - W          1110 - E 
  1797.     |        |            | 33         |      0111 - V          1111 - F 
  1798.     |*SUBR   | R0,R1      | 10   4   3 |
  1799.     |        |            | 32         |
  1800.     | TFR    | R0,R1      | 1F  6/4  2 |  The  results  of all  Inter-Register
  1801.     |*TFM    | R0+,R1+    | 11  6+3n 3 |  operations are  passsed into R1 with
  1802.     |        |            | 38         |  the exception of EXG which exchanges
  1803.     |*TFM    | R0-,R1-    | 11  6+3n 3 |  the values of  registers and the TFR
  1804.     |        |            | 39         |  block transfers.
  1805.     |*TFM    | R0+,R1     | 11  6+3n 3 |
  1806.     |        |            | 3A         |  The register field codes %1100 and
  1807.     |*TFM    | R0,R1+     | 11  6+3n 3 |  %1101 are both zero registers.  They
  1808.     |        |            | 3B         |  can be used as source or destination.
  1809.      ----------------------------------
  1810.  
  1811.  
  1812.  
  1813.  
  1814.  
  1815.  
  1816.  
  1817.  
  1818.  
  1819.  
  1820.  
  1821.  
  1822.  
  1823.  
  1824.    Mnemonics Reference Table                                            Page 26
  1825.    
  1826.    
  1827.    
  1828.                  Indexed Address Modes and Post byte Information 
  1829.    
  1830.    
  1831.     __________________________________________________________________________
  1832.    |                           Non-Indirect Modes                             |
  1833.    |--------------------------------------------------------------------------|
  1834.    |         Type            |     Forms     | Assembler | PostByte | +/+ | + |
  1835.    |                         |               |   form    | OP code  | ~/~ | # |
  1836.    |-------------------------+---------------+-----------+----------+-----+---|
  1837.    | Constant offset from R  | No offset     |    ,R     | 1rr00100 |  0  | 0 |
  1838.    |                         | 5 bit offset  |   n,R     | 0rrnnnnn |  1  | 0 |
  1839.    |                         | 8 bit offset  |   n,R     | 1rr01000 |  1  | 1 |
  1840.    |                         | 16 bit offset |   n,R     | 1rr01001 | 4/3 | 2 |
  1841.    |-------------------------+---------------+-----------+----------+-----+---|
  1842.    | Accumulator offset      | A - Register  |   A,R     | 1rr00110 |  1  | 0 |
  1843.    | from R (Twos complement | B - Register  |   B,R     | 1rr00101 |  1  | 0 |
  1844.    |*offset)                 | E - Register  |   E,R     | 1rr00111 |  1  | 0 |
  1845.    |*                        | F - Register  |   F,R     | 1rr01010 |  1  | 0 |
  1846.    |                         | D - Register  |   D,R     | 1rr01011 | 4/2 | 0 |
  1847.    |*                        | W - Register  |   W,R     | 1rr01110 | 4/1 | 0 |
  1848.    |-------------------------+---------------+-----------+----------+-----+---|
  1849.    | Auto increment and      | Increment 1   |    ,R+    | 1rr00000 | 2/1 | 0 |
  1850.    | decrement of R          | Increment 2   |    ,R++   | 1rr00001 | 3/2 | 0 |
  1851.    |                         | Decrement 1   |    ,-R    | 1rr00010 | 2/1 | 0 |
  1852.    |                         | Decrement 2   |    ,--R   | 1rr00011 | 3/2 | 0 |
  1853.    |-------------------------+---------------+-----------+----------+-----+---|
  1854.    | Constant offset from PC | 8 bit offset  |   n,PC    | 1xx01100 |  1  | 1 |
  1855.    | (Twos complement offset)| 16 bit offset |   n,PC    | 1xx01101 | 5/3 | 2 |
  1856.    |-------------------------+---------------+-----------+----------+-----+---|
  1857.    |*Relative to W           | No Offset     |   ,W      | 10001111 |  0  | 0 |
  1858.    |*(Twos complement offset)| 16 bit offset |   n,W     | 10101111 | 5/2 | 2 |
  1859.    |* AutoIncrement W        | Increment 2   |   ,W++    | 11001111 | 3/1 | 0 |
  1860.    |* AutoDecrement W        | Decrement 2   |   ,--W    | 11101111 | 3/1 | 0 |
  1861.     -------------------------------------------------------------------------- 
  1862.    
  1863.    
  1864.    
  1865.     __________________________________________________________________________
  1866.    |                             Indirect Modes                               |
  1867.    |--------------------------------------------------------------------------|
  1868.    |         Type            |     Forms     | Assembler | Post--byte | + | + |
  1869.    |                         |               |   form    |  OP code   | ~ | # |
  1870.    |-------------------------+---------------+-----------+------------+---+---|
  1871.    | Constant offset from R  | No offset     |  [ ,R]    |  1rr10100  | 3 | 0 |
  1872.    |                         | 5 bit offset  |  [n,R]    |  Defaults to 8 bit |
  1873.    |                         | 8 bit offset  |  [n,R]    |  1rr11000  | 4 | 1 |
  1874.    |                         | 16 bit offset |  [n,R]    |  1rr11001  | 7 | 2 |
  1875.    |-------------------------+---------------+-----------+------------+---+---|
  1876.    | Accumulator offset      | A - Register  |  [A,R]    |  1rr10110  | 4 | 0 |
  1877.    | from R (Twos complement | B - Register  |  [B,R]    |  1rr10101  | 4 | 0 |
  1878.    |*offset)                 | E - Register  |  [E,R]    |  1rr10111  | 1 | 0 |
  1879.    |*                        | F - Register  |  [F,R]    |  1rr11010  | 1 | 0 |
  1880.    |                         | D - Register  |  [D,R]    |  1rr11011  | 4 | 0 |
  1881.    |*                        | W - Register  |  [W,R]    |  1rr11110  | 4 | 0 |
  1882.    |-------------------------+---------------+-----------+------------+---+---|
  1883.    | Auto Increment and      | Increment 2   |  [,R++]   |  1rr10001  | 6 | 0 |
  1884.    | decrement of R          | Decrement 2   |  [,--R]   |  1rr10011  | 6 | 0 |
  1885.    |-------------------------+---------------+-----------+------------+---+---|
  1886.    | Constant offset from PC | 8 bit offset  |  [n,PC]   |  1xx11100  | 4 | 1 |
  1887.    | (Twos complement offset)| 16 bit offset |  [n,PC]   |  1xx11101  | 8 | 2 |
  1888.    |-------------------------+---------------+-----------+------------+---+---|
  1889.    | Extended indirect       | 16 bit address|   [n]     |  10011111  | 5 | 2 |
  1890.    |-------------------------+---------------+-----------+------------+---+---|
  1891.    |*Relative to W           | No Offset     |   [,W]    |  10010000  | 0 | 0 |
  1892.    |*(Twos complement offset)| 16 bit offset |   [n,W]   |  10110000  | 5 | 2 |
  1893.    |* AutoIncrement W        | Increment 2   |   [,W++]  |  11010000  | 3 | 0 |
  1894.    |* AutoDecrement W        | Decrement 2   |   [,--W]  |  11110000  | 3 | 0 |
  1895.     -------------------------------------------------------------------------- 
  1896.    
  1897.         rr = X, Y, U or S      X = 00  Y = 01
  1898.         xx = Doesn't care      U = 10  S = 11
  1899.    
  1900.    
  1901.     + and +   indicates the additional number of cycles and bytes for the
  1902.     ~     #   particular variation
  1903.  
  1904.  
  1905.  
  1906.  
  1907.  
  1908.    Mnemonics Reference Table                                            Page 27
  1909.    
  1910.    
  1911.    
  1912.                               Register Descriptions
  1913.    
  1914.      _________________________________________________________________________
  1915.     | X  - 16 bit index register                                              |
  1916.     | Y  - 16 bit index register                                              |
  1917.     | U  - 16 bit user-stack pointer                                          |
  1918.     | S  - 16 bit system-stack pointer                                        |
  1919.     | PC - 16 bit program counter register                                    |
  1920.     |*V  - 16 bit variable register (inter-register instructions only)        |
  1921.     |*0  - 8/16 bit zero register   (inter-register instructions only)        |
  1922.     |-------------------------------------------------------------------------|
  1923.     | A  - 8 bit accumulator             |                                    |
  1924.     | B  - 8 bit accumulator             |    Accumulator structure map:      |
  1925.     |*E  - 8 bit accumulator             |      ----- ----- ----- -----       |
  1926.     |*F  - 8 bit accumulator             |     |  A  |  B  |  E  |  F  |      |
  1927.     | D  - 16 bit concatenated reg.(A B) |      -----------+-----------       |
  1928.     |*W  - 16 bit concatenated reg.(E F) |     |     D     |     W     |      |
  1929.     |*Q  - 32 bit concatenated reg.(D W) |      -----------------------       |
  1930.     |------------------------------------|     |           Q           |      |
  1931.     |*MD - 8 bit mode/error register     |      -----------------------       |
  1932.     | CC - 8 bit condition code register | bit  31   24    15    8     0      |
  1933.     | DP - 8 bit direct page register    |                                    |
  1934.      -------------------------------------------------------------------------
  1935.       * Indicates new registers in 6309 CPU.
  1936.    
  1937.    
  1938.    
  1939.                              Push/Pull Order of Stack
  1940.    
  1941.    
  1942.              Pull order                  Push/Pull Post byte
  1943.                  |                 ------------------------------- 
  1944.                 \|/               | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
  1945.                  '                 -------------------------------
  1946.                  CC                 |   |   |   |   |   |   |   |____CCr
  1947.                  A\                 |   |   |   |   |   |   |________A
  1948.                  B/ D\ Q            |   |   |   |   |   |____________B
  1949.                  E\ W/              |   |   |   |   |________________DPr
  1950.                  F/                 |   |   |   |____________________X
  1951.                  DP                 |   |   |________________________Y
  1952.                 X-hi                |   |____________________________S/U
  1953.                 X-low               |________________________________PC
  1954.                 Y-hi       
  1955.                 Y-low    
  1956.                 U/S-hi                                                
  1957.                 U/S-low
  1958.                 PC-hi
  1959.                 PC-low
  1960.                   .
  1961.                  /|\
  1962.                   |
  1963.               Push order
  1964.    
  1965.                                        Condition Code Register
  1966.                                   ------------------------------- 
  1967.                                  | E | F | H | I | N | Z | V | C |
  1968.                                   -------------------------------
  1969.                     Entire flag____|   |   |   |   |   |   |   |____Carry flag
  1970.                       FIRQ mask________|   |   |   |   |   |________Overflow
  1971.                      Half carry____________|   |   |   |____________Zero
  1972.                        IRQ mask________________|   |________________Negative
  1973.  
  1974.  
  1975.        The PSH(s,u) and PUL(s,u) instructions require one additional
  1976.        cycle for each byte pushed or pulled.
  1977.  
  1978.  
  1979.  
  1980.  
  1981.   Alan DeKok's addition to the above...
  1982.  
  1983.  
  1984.   The new features of the 6309 are closely related to the changes in
  1985. design from the 6809.  The 6309 is micro-coded, which allowed the
  1986. designers to easily add new instrctions and registers.  It also has a
  1987. one byte pre-fetch 'cache', and an internal pipeline.  The 'cache'
  1988. enables the 6309 to execute
  1989. instructions like 'lsld' (2-bytes) in one clock cycle.  The design of
  1990. the 6809 series allows them to read one byte per clock cycle MAXIMUM, but there
  1991. is a catch.  Most instructions take more clock cycles to execute than
  1992. bytes they contain.  While the 6309 is performing internal
  1993. calculations, the 'cache' hardware goes and reads the next instruction
  1994. byte, leaving only one additional byte to be read to execute the 'lsld'.
  1995. Reading this byte requires one clock cycle, and then the instruction
  1996. is executed while the CPU fetches the next instruction.
  1997.  
  1998.  
  1999.   The 6309 has a true 16-bit internal design.
  2000. e.g. the EXG instruction operates as
  2001. 6809: read op-code
  2002.       read inter-register byte (r0,r1)
  2003.         r0_high -> temp_high
  2004.         r0_low  -> temp_low
  2005.         r1_high -> r0_high
  2006.         r1_low  -> r0_low
  2007.         r0_high -> r1_high
  2008.         r0_low  -> r1_low
  2009.  
  2010.   8 actions, 8 clock cycles.
  2011.  
  2012. 6809: read op-code
  2013.       read inter-register byte (r0,r1)
  2014.         r0 -> temp
  2015.         r1 -> r0
  2016.         r0 -> r1
  2017.  
  2018.   5 actions, 5 clock cycles.
  2019.  
  2020.  
  2021.   The 6309 native mode instruction execution clock lengths can be mostly accounted
  2022. for by accounting for the pre-fetch cache and the internal 16-bit ALU.
  2023.  
  2024.   TFM has some caveats. TFM r1-,r2- should NOT be used to setup the
  2025. stack, as it's a POST-decrement instruction, not PRE-decrement.
  2026.  
  2027.   Watch out for TFM r1,r2+ if you're reading from a peripherial.
  2028. Why?  The TFM uses the 1-byte 'cache' as an internal buffer for the
  2029. byte that it's currently moving.  The TFM instruction is interruptible
  2030. (the only instruction that is), and code execution during the
  2031. interrupt will destroy the byte in the cache.
  2032.  
  2033.    On returning from the interrupt, the TFM will read the FROM
  2034. address again to get the lost byte, which may be the wrong one.  The
  2035. visible effect of this is that block moves sometimes have a byte
  2036. missing from the middle, and everything after that byte shifted down
  2037. one address.
  2038.  
  2039.   The W,E, and F registers do not have the full immediate addressing
  2040. mode capabilities that D,A, and B do.  SBC, AND, BIT, EOR, ADC, OR
  2041. with E,F,W are available only in register-register mode.  LSR, ROR,
  2042. ROL are available for W but not for E,F.  ASR, ASL, LSL, NEG do not
  2043. exist at all for W,E,F.
  2044.  
  2045.   ASL can sort of be implemented by doing a ADDR R1,R1.  (see later)
  2046.  
  2047.   You can also do things like 'leax u,x' by doing a ADDR u,x.
  2048.  
  2049.   Sadly, many of the new 6309 instructions are useless in everyday
  2050. life.  The bit manipulation instructions are interesting, but slow and
  2051. mostly of limited value.  Same with much of the DIV/MUL higher math.  The
  2052. AIM, etc. are very useful, though.
  2053.  
  2054.  
  2055.   Programmer recommendations
  2056.  
  2057.  
  2058.   Try to stay away from using the W register.  It's got another pre-byte
  2059. (like instructions using 'Y' or 'S'), and is correspondingly larger
  2060. and slower.  E and F are best used mainly instead of pushing loop counters onto
  2061. the stack when you're running out of registers.
  2062.  
  2063.   The V register is mostly pointless.  If you're doing context
  2064. switches, it isn't saved across interrupts unless you do so manually.
  2065. Shuffling data back and forth between other registers and V is a lot
  2066. of trouble.  Any math, etc. involving V is generally done much faster
  2067. using a real register.  After going through 1meg+ of 6309 assembly code
  2068. which is everything from an OS kernel to serial drivers to graphics
  2069. drivers, I've never seen a use for the V register.
  2070.  
  2071.   Of course, you could put '$FFFF' into V, and have registers for
  2072. reg-reg addressing modes with bits all zero (0), and another with bits all
  2073. 1 (V).
  2074.  
  2075.   Pseudo-nops: tfr 0,0; exg 0,0
  2076.  
  2077.   Extremely small software timing loops with large delays may be generated
  2078. by performing a 'LDW',and then 'TFM 0+,0+'.
  2079.  
  2080.   Many programs can be executed in 6309 native mode by patching only
  2081. the IRQ code, if it accesses the stack.  A 'LDMD #$01' may be
  2082. performed as soon as your program starts executing, and will see an
  2083. immediate 10-15% speed increase.  Software timing loops must be
  2084. checked!
  2085.  
  2086.  Opcodes Hitachi left out of the 6309: and some round-about equivalents
  2087.  
  2088. E/F/W
  2089. -----
  2090. ADCr:  ADCR 0,r
  2091. ANDr:  ; ANDR V,r
  2092. ASLr/LSLr:  ADDR r,r
  2093. ASRr
  2094. BITr
  2095. EORr
  2096. NEGr:  COMr INCr
  2097. ORr
  2098. SBCr:  SBCR Z,r
  2099.  
  2100.  
  2101. E/F
  2102. ---
  2103. LSRr
  2104. ROLr: ADCR r,r
  2105. RORr
  2106.  
  2107. Q (Long word =W1:W0)
  2108. --------------------
  2109. ADDQ: ADDW W0; ADCD W1
  2110. SUBQ: SUBW W0; SBCD W1
  2111. ASLQ: ASLW   ; ROLD
  2112. ROLQ: ROLW   ; ROLD
  2113. LSRQ: LSRD   ; RORW
  2114. RORQ: RORD   ; RORW
  2115. ASRQ: ASRD   ; RORW
  2116. COMQ: COMD   ; COMW
  2117. NEGQ: COMD   ; COMW ; SBCR 0,D
  2118.  
  2119.  
  2120.