home *** CD-ROM | disk | FTP | other *** search
/ Fish 'n' More 2 / fishmore-publicdomainlibraryvol.ii1991xetec.iso / fish / code_examples / a68kex / disasm1.asm < prev    next >
Assembly Source File  |  1991-01-17  |  50KB  |  2,003 lines

  1. ***************************************
  2. * Disassemble one line module         *
  3. * Version 1.3 31.8.89                 *
  4. *                                     *
  5. * written by E. Lenz                  *
  6. *            Johann-Fichte-Strasse 11 *
  7. *            8 Munich 40              *
  8. *            Germany                  *
  9. *                                     *
  10. ***************************************
  11.  
  12.      XDEF Disasm1
  13.  
  14. ;Communication structure
  15.  
  16. SBegin   equ 0
  17. SRelAddr equ 4
  18. SMicro   equ 8
  19. SOpCode  equ $a
  20. SType1   equ $c
  21. SLen1    equ $e
  22. SAddr1   equ $10
  23. SType2   equ $14
  24. SLen2    equ $16
  25. SAddr2   equ $18
  26. STotal   equ $1c
  27. SBuffer  equ $1e
  28.  
  29. *** INPUT ***
  30. ; a0 pointer to communication structure
  31.  
  32.  
  33. *** ON STACK *****
  34. ;
  35. ; word 0
  36. ; 1st address                  (long) [d7]
  37. ; length of 1st address        (word) [d6]
  38. ; type of 1st address          (word) [d5]
  39. ; 2nd address                  (long) [d4]
  40. ; length of 2nd address        (word) [d3]
  41. ; type for 2nd address         (word) [d2]
  42. ; 0=no address
  43. ; qualifier                    (word) [d0]
  44. ; 0=.b 1=no qualifier  2=.w  4=.l 6=.s
  45. ; pointer to opcode text       (long) [a2]
  46. ; number of words to write - 1 (word) [d1]
  47.  
  48. ; a3 displacement
  49. ; a5 second displacement for move <ea>,<ea>
  50.  
  51. **** ADDRESS TYPE ****
  52. ;
  53. ; 0 = no address
  54. ; 1 = Dn
  55. ; 2 = An
  56. ; 3 = (An)
  57. ; 4 = (An)+
  58. ; 5 = -(An)
  59. ; 6 = d(An)
  60. ; 7 = d(An,Rn)
  61. ; 8 = $xxxx
  62. ; 9 = $xxxx xxxx
  63. ; 10 = d(PC)
  64. ; 11 = d(PC,Rn)
  65. ; 12 = #$xxxx
  66. ; 13 = ccr
  67. ; 14 = sr
  68. ; 15 = sfc
  69. ; 16 = dfc
  70. ; 17 = usp
  71. ; 18 = vbr
  72. ; 19 movem stuff
  73.  
  74. Disasm1  movem.l d0-d7/a3-a6,-(a7)
  75.          bclr    #0,SRelAddr+3(a0)  make sure everything's even
  76.          bclr    #0,SBegin+3(a0)
  77.          moveq   #-1,d0
  78.          movea.l d0,a5          set second displacement to nothing
  79.          addq.l  #1,d0
  80.          movea.l SBegin(a0),a1  begin address
  81.          move.l  (a1),d7        first long word
  82.          move.w  (a1)+,d3       first word
  83.  
  84.          move.w  d3,d0
  85.          lsr.w   #8,d0          Get first byte
  86.          lsr.w   #2,d0          First half byte
  87.          andi.w  #$3c,d0
  88.          lea     Group(pc),a2
  89.          move.l  0(a2,d0.w),a2
  90.          jmp     (a2)           jump to it's group
  91.  
  92. cmpchk1  moveq   #0,d0
  93. cmpchk   cmpi.w  #2,SMicro(a0)
  94.          blt.s   what
  95.          movem.l d0/d7,-(a7)
  96.          bsr     DecAddr1
  97.          movem.l (a7)+,d0/d4
  98.          cmpi.w  #3,d5         no Dn,An
  99.          blt.s   what
  100.          beq.s   wok
  101.          cmpi.w  #6,d5         no (An)+,-(An)
  102.          blt.s   what
  103.          cmpi.w  #12,d5        no #...
  104.          beq.s   what
  105. wok      moveq   #1,d1         two words
  106.          moveq   #1,d2         assume Dn
  107.          btst    #15,d4
  108.          beq.s   issDn
  109.          moveq   #2,d2         twas An
  110. issDn    lea     TCmp2(pc),a2  assume cmp2
  111.          btst    #11,d4
  112.          beq.s   iscmp2
  113.          lea     TChk2(pc),a2  twas chk2
  114. iscmp2   move.w  d4,d3
  115.          andi.w  #$7ff,d3
  116.          bne.s   what
  117.          ror.w   #8,d4
  118.          ror.w   #4,d4
  119.          andi.w  #7,d4
  120.          bra     Rewrite
  121. cmpchk2  moveq   #2,d0
  122.          bra.s   cmpchk
  123. cmpchk3  moveq   #4,d0
  124.          bra.s   cmpchk
  125. what     bra     Undef
  126.  
  127. Group0   btst    #8,d3
  128.          bne     GBtst
  129.  
  130.          lea     TOri(pc),a2        'ori' opcode
  131.          cmpi.w  #$3c,d3
  132.          beq     Goccr
  133.  
  134.          cmpi.w  #$7c,d3
  135.          beq     Gosr
  136.  
  137.          cmpi.w  #$bf,d3
  138.          bls.s   Ggimm
  139.  
  140.          cmpi.w  #$ff,d3
  141.          bls     cmpchk1
  142.  
  143.          lea     TAndi(pc),a2       'andi' opcode
  144.          cmpi.w  #$23c,d3
  145.          beq     Goccr
  146.  
  147.          cmpi.w  #$27c,d3
  148.          beq     Gosr
  149.  
  150.          cmpi.w  #$2bf,d3
  151.          bls.s   Ggimm
  152.  
  153.          cmpi.w  #$2ff,d3
  154.          bls.s   cmpchk2
  155.  
  156.          lea     TSubi(pc),a2       'subi' opcode
  157.          cmpi.w  #$4bf,d3
  158.          bls.s   Ggimm
  159.  
  160.          cmpi.w  #$4ff,d3
  161.          bls.s   cmpchk3
  162.  
  163.          lea     TAddi(pc),a2       'addi' opcode
  164.          cmpi.w  #$6bf,d3
  165. Ggimm    bls     Gimm
  166.  
  167.          cmpi.w  #$6ff,d3
  168.          bgt.s   noMod
  169.          cmpi.w  #2,SMicro(a0)
  170.          blt.s   gnoi
  171.          lea     TRtm(pc),a2        'rtm' opcode
  172.          moveq   #1,d0          no qualifier
  173.          cmpi.w  #$6cf,d3
  174.          bgt.s   noRtm
  175.          moveq   #0,d1          one word
  176.          moveq   #0,d2          no 2nd address
  177.          moveq   #1,d5          assume Dn
  178.          move.w  d3,d7
  179.          btst    #3,d7
  180.          beq.s   wasDn
  181.          moveq   #2,d5
  182. wasDn    and.w   #7,d7
  183.          bra     Rewr1
  184. noRtm    lea     TCallm(pc),a2  'callm' opcode
  185.          bsr     DecAddr2
  186.          cmpi.w  #4,d3          no (An)+
  187.          beq.s   gnoi
  188.          cmpi.w  #5,d3          no -(An)
  189.          beq.s   gnoi
  190.          cmpi.w  #12,d3         no #...
  191.          beq.s   gnoi
  192.          moveq   #1,d1          two words
  193.          moveq   #12,d5         type immediate
  194.          moveq   #1,d6          byte
  195.          bra.s   Ggrew
  196. gnoi     bra     noi
  197.  
  198. noMod    cmpi.w  #$8ff,d3       bit operands with
  199.          blt     GBtst          bit number immediate
  200.  
  201.          lea     TEori(pc),a2       'eori' opcode
  202.          cmpi.w  #$a3c,d3
  203.          bne.s   Eorsr
  204. Goccr    move.w  d7,d3
  205.          andi.w  #$ff00,d3
  206.          bne.s   gnoi
  207.          moveq   #1,d6          1st length byte
  208.          moveq   #13,d2         2nd address ',ccr'
  209.          bra.s   Gsr
  210.  
  211. Eorsr    cmpi.w  #$a7c,d3
  212.          bne.s   GEori
  213. Gosr     moveq   #2,d6          Word
  214.          moveq   #14,d2         ',sr'
  215. Gsr      moveq   #1,d0          no qualifier
  216.          moveq   #1,d1          write two words
  217.          moveq   #12,d5         type immediate
  218.          bra.s   Ggrew
  219.  
  220. GEori    lea     TEori(pc),a2       'eori' opcode
  221.          cmpi.w  #$aff,d3
  222.          bls.s   Gimm
  223.  
  224.          cmpi.w  #$cff,d3
  225.          bgt.s   GMoves
  226.          lea     TCmpi(pc),a2       'cmpi' opcode
  227. Gimm     bsr     Imdt
  228.          cmpi.w  #2,d2
  229.          beq.s   Gof
  230.          cmpi.w  #9,d2
  231.          bgt.s   Gof
  232. Ggrew    bra     Rewrite
  233.  
  234. GMoves   tst.w   SMicro(a0)
  235.          beq.s   Gof
  236.          lea     TMoves(pc),a2      moves opcode
  237.          move.w  d7,d0
  238.          andi.w  #$7ff,d0
  239.          bne.s   Gof
  240.          move.w  d7,d6
  241.          moveq   #1,d5       assume Dn
  242.          btst    #15,d6
  243.          beq.s   wasd
  244.          moveq   #2,d5
  245. wasd     lsr.w   #8,d7
  246.          lsr.w   #4,d7
  247.          andi.w  #7,d7
  248.          moveq   #1,d1      two words
  249.          bsr     Size
  250.          bsr     DecAddr2
  251.          cmpi.w  #3,d2
  252.          bcs.s   Gof         no Dn or An as <ea>
  253.          cmpi.w  #10,d2
  254.          bcc.s   Gof         nothing higher than $...
  255.          bchg    #11,d6
  256.          btst    #11,d6
  257.          bra.s   trys
  258. Gof      bra.s   noi
  259.  
  260. GBtst    move.w  d3,d0
  261.          andi.w  #$38,d0
  262.          cmpi.w  #8,d0
  263.          beq.s   GMovep
  264.          move.w  d3,d0
  265.          andi.w  #$c0,d0
  266.          bne.s   GBchg
  267.          lea     TBtst(pc),a2
  268.          bra.s   GBit
  269. GBchg    cmpi.w  #$40,d0
  270.          bne.s   GBclr
  271.          lea     TBchg(pc),a2
  272.          bra.s   GBit
  273. GBclr    cmpi.w  #$80,d0
  274.          bne.s   GBset
  275.          lea     TBclr(pc),a2
  276.          bra.s   GBit
  277. GBset    lea     TBset(pc),a2
  278. GBit     bsr     Bit
  279. GRew     bra     Rewrite
  280. noi      bra     Undef
  281.  
  282. GMovep   lea     TMovep(pc),a2       movep
  283.          moveq   #1,d1     two words
  284.          moveq   #2,d0     assume .w
  285.          btst    #6,d3
  286.          beq.s   solong
  287.          moveq   #4,d0
  288. solong   moveq   #6,d5      d(An)
  289.          move.w  d7,a3
  290.          move.w  d3,d7
  291.          andi.w  #7,d7
  292.          moveq   #1,d2      data reg
  293.          move.w  d3,d4
  294.          lsr.w   #8,d4
  295.          lsr.w   #1,d4
  296.          andi.w  #7,d4
  297.          btst    #7,d3
  298. trys     beq.s   GRew
  299.          bsr     Swapreg
  300.          bra.s   GRew
  301.  
  302. Group1   moveq   #0,d0      byte
  303.          bra.s   gotqual
  304. Group2   moveq   #4,d0      long
  305.          bra.s   gotqual
  306. Group3   moveq   #2,d0      word
  307. gotqual  move.w  d3,d1
  308.          andi.w  #$1c0,d1   now get destination mode
  309.          cmpi.w  #$40,d1
  310.          beq.s   GMovea     movea command
  311.          lea     TMove(pc),a2
  312.          moveq   #-1,d1
  313.          movea.l d1,a3
  314.          addq.l  #1,d1
  315.          move.w  d3,-(a7)
  316.          bsr     DecAddr2
  317.          bsr     Swapreg
  318.          move.w  (a7)+,d3
  319.          cmpa.l  #-1,a3
  320.          beq.s   na3
  321.          movea.l a3,a5
  322.          suba.l  a3,a3
  323. na3      lsr.w   #3,d3
  324.          andi.w  #$1f8,d3
  325.          move.w  d3,d4
  326.          lsr.w   #6,d4
  327.          andi.w  #7,d4
  328.          or.w    d4,d3
  329.          bsr     DecAddr2
  330.          exg     a3,a5
  331.          cmpi.w  #10,d2   check destination address
  332.          bge.s   rub2
  333.          tst.l   d0
  334.          bne.s   gGrew
  335.          cmpi.w  #2,d5    no move.b An,...
  336.          bne.s   gGrew
  337. rub2     bra     Undef
  338.  
  339. GMovea   lea     TMovea(pc),a2
  340.          tst.w   d0       no byte qualifier
  341.          beq.s   rub1
  342.          bsr     Dnea
  343.          moveq   #2,d2
  344. gGrew    bra     Rewrite
  345.  
  346. Group4   btst    #8,d3
  347.          bne     GLea
  348.  
  349.          cmpi.w  #$40ff,d3
  350.          bgt.s   GMoveccr
  351.          cmpi.w  #$40c0,d3
  352.          blt.s   GNegx       move from status register
  353.          moveq   #14,d5      sr,
  354.          bra.s   Wmove
  355.  
  356. GNegx    lea     TNegx(pc),a2    'negx' opcode
  357. GNeg     move.w  d3,d0
  358.          andi.w  #$c0,d0     get size bits 7,6
  359.          lsr.w   #5,d0
  360.          move.w  d0,-(a7)
  361. Gbcd     moveq   #0,d1
  362.          bsr     DecAddr1
  363.          move.w  (a7)+,d0
  364.          cmpi.w  #2,d5
  365.          beq.s   rub1
  366.          cmpi.w  #10,d5
  367.          bcc.s   rub1
  368.          bra     Rewr1
  369.  
  370. GMoveccr cmpi.w  #$4200,d3
  371.          blt.s   rub1
  372.          cmpi.w  #$42ff,d3
  373.          bgt.s   GMovtccr
  374.          lea     TClr(pc),a2
  375.          cmpi.w  #$42c0,d3
  376.          blt.s   GNeg
  377.          tst.w   SMicro(a0)  move from ccr
  378.          beq.s   rub1
  379.          moveq   #13,d5      ccr,
  380. Wmove    moveq   #1,d0       no qualifier
  381.          moveq   #0,d1       one word
  382.          lea     TMove(pc),a2    'move' opcode
  383.          bsr     DecAddr2
  384.          bra.s   Rew1
  385. rub1     bra     Undef
  386.  
  387. GMovtccr cmpi.w  #$4400,d3
  388.          blt.s   rub1
  389.          cmpi.w  #$44ff,d3
  390.          bgt.s   GMovtsr
  391.          lea     TNeg(pc),a2
  392.          cmpi.w  #$44c0,d3
  393. gGNeg    blt.s   GNeg
  394.          moveq   #0,d1       move to ccr
  395.          bsr     DecAddr1
  396.          moveq   #13,d2
  397.          bra.s   Movreg
  398.  
  399. GMovtsr  cmpi.w  #$4600,d3
  400.          blt.s   rub1
  401.          cmpi.w  #$46ff,d3
  402.          bgt.s   GNbcd
  403.          lea     TNot(pc),a2
  404.          cmpi.w  #$46c0,d3
  405.          blt.s   gGNeg
  406.          moveq   #0,d1       one word
  407.          bsr     DecAddr1
  408.          moveq   #14,d2
  409. Movreg   moveq   #1,d0            no qualifier
  410.          lea     TMove(pc),a2     move to ccr
  411. Rew1     bra     Rewrite
  412.  
  413. GNbcd    cmpi.w  #$4800,d3
  414. grub1    blt.s   rub1
  415.          cmpi.w  #$483f,d3
  416.          bgt.s   GSwap
  417.          lea     TNbcd(pc),a2
  418. Gtobcd   moveq   #1,d0
  419.          move.w  d0,-(a7)
  420.          bra     Gbcd
  421.  
  422. GSwap    cmpi.w  #$4847,d3
  423.          bgt.s   GBkpt
  424.          lea     TSwap(pc),a2
  425.          bra.s   Gtobcd
  426.  
  427. GBkpt    cmpi.w  #$484f,d3
  428.          bgt.s   GPea
  429.          cmpi.w  #2,SMicro(a0)      68020+
  430.          blt.s   grub1
  431.          lea     TBkpt(pc),a2       bkpt #n
  432.          bra     VecWrt
  433.  
  434. GPea     cmpi.w  #$487f,d3
  435.          bgt.s   GExt
  436.          lea     TPea(pc),a2        'pea' opcode
  437.          moveq   #1,d0          no qualifier
  438.          bra.s   Godec
  439.  
  440. GExt     cmpi.w  #$49c7,d3
  441.          bgt.s   GMovm
  442.          move.w  d3,d0
  443.          andi.w  #$38,d0    Bits 5 4 3 must be 000
  444.          bne.s   GMovm
  445.          move.w  d3,d0
  446.          andi.w  #$1c0,d0   get qualifier
  447.          lsr.w   #6,d0
  448.          cmpi.w  #2,d0       .w
  449.          beq.s   Qok
  450.          cmpi.w  #3,d0       .l
  451.          bne.s   Pot
  452.          moveq   #4,d0
  453. Qok      lea     TExtn(pc),a2
  454. Godec    bra     dec1
  455. Pot      cmpi.w  #7,d0
  456.          bne.s   notis
  457.          cmpi.w  #2,SMicro(a0)
  458.          blt.s   notis
  459.          moveq   #4,d0
  460.          lea     TExtb(pc),a2
  461.          bra.s   Godec
  462.  
  463. GMovm    cmpi.w  #$48ff,d3      movem reg_list,<ea>
  464.          bgt.s   GIllegal
  465.          lea     TMovem(pc),a2      'movem' op code
  466.          moveq   #2,d0
  467.          moveq   #1,d1
  468.          btst    #6,d3
  469.          beq.s   mwd
  470.          moveq   #4,d0          qualifier
  471. mwd      move.w  (a1)+,d7
  472.          moveq   #19,d5         movem stuff type
  473.          bsr     DecAddr2
  474.          cmpi.w  #3,d2          no Dn,An
  475.          blt.s   notis
  476.          cmpi.w  #4,d2          no (An)+
  477.          beq.s   notis
  478.          cmpi.w  #5,d2          is it -(An)?
  479.          bne.s   trypct
  480.          movem.l d3-d5,-(a7)
  481.          moveq   #15,d5
  482.          moveq   #0,d4          reverse the register list
  483.          moveq   #0,d3
  484. mwd1     btst    d5,d7
  485.          beq.s   noset
  486.          bset    d4,d3
  487. noset    addq.w  #1,d4
  488.          subq.w  #1,d5
  489.          bpl.s   mwd1
  490.          move.w  d3,d7
  491.          movem.l (a7)+,d3-d5
  492. trypct   cmpi.w  #9,d2          no d(PC) etc
  493.          bgt.s   notis
  494.          tst.w   d7
  495.          bne     Rewrite        Reg mask may not be zero
  496. notis    bra     Undef
  497.  
  498. GIllegal cmpi.w  #$4a00,d3
  499.          blt.s   notis
  500.          cmpi.w  #$4afc,d3
  501.          bne.s   GTst
  502.          lea     TIllegal(pc),a2
  503.          bra     OneByte
  504.  
  505. GTst     cmpi.w  #$4abf,d3
  506.          bgt.s   GTas
  507.          move.w  d3,d0
  508.          andi.w  #$c0,d0
  509.          lsr.w   #5,d0
  510.          lea     TTst(pc),a2
  511. dec1     bsr     DecAddr1
  512.          cmpi.w  #2,d5        no An
  513.          beq.s   notis
  514.          bra.s   Rew12
  515.  
  516. GTas     cmpi.w  #$4aff,d3
  517.          bgt.s   GMovem
  518.          moveq   #1,d0       no qualifier
  519.          lea     TTas(pc),a2
  520.          bra.s   dec1
  521.  
  522. GMovem   cmpi.w  #$4c80,d3     movem <ea>,reg_list
  523.          blt.s   notis
  524.          cmpi.w  #$4cff,d3
  525.          bgt.s   GTrap
  526.          lea     TMovem(pc),a2
  527.          moveq   #2,d0
  528.          btst    #6,d3
  529.          beq.s   mwwd
  530.          moveq   #4,d0
  531. mwwd     move.w  (a1)+,-(a7)
  532.          bsr     DecAddr1
  533.          addq.w  #1,d1
  534.          moveq   #19,d2      movem stuff type
  535.          move.w  (a7)+,d4
  536.          cmpi.w  #3,d5       no Dn,An
  537.          blt.s   notok
  538.          cmpi.w  #5,d5       no -(An)
  539.          beq.s   notok
  540.          cmpi.w  #11,d5
  541.          bgt.s   notok
  542.          tst.w   d4
  543.          beq.s   notok       Reg mask may not be zero
  544. Rew2     bra     Rewrite
  545. notok    bra     Undef
  546.  
  547. GTrap    cmpi.w  #$4e40,d3
  548.          blt.s   notok
  549.          cmpi.w  #$4e4f,d3
  550.          bgt.s   GLink
  551.          lea     TTrap(pc),a2
  552. VecWrt   bsr     Vector
  553. Rew12    bra     Rewr1
  554.  
  555. GLink    cmpi.w  #$4e58,d3
  556.          bgt.s   GUnlk
  557.          moveq   #1,d0
  558.          moveq   #1,d1
  559.          move.w  d7,d4
  560.          move.w  d3,d7
  561.          andi.w  #7,d7        register
  562.          moveq   #1,d6
  563.          moveq   #2,d5        An
  564.          moveq   #12,d2       immediate data
  565.          moveq   #3,d3        signed word
  566.          lea     TLink(pc),a2
  567.          bra.s   Rew2
  568.  
  569. GUnlk    cmpi.w  #$4e5f,d3
  570.          bgt.s   GMovesp
  571.          andi.w  #$ffef,d3
  572.          moveq   #1,d0
  573.          lea     TUnlk(pc),a2
  574.          bsr     DecAddr1
  575.          bra.s   Rew12
  576.  
  577. GMovesp  cmpi.w  #$4e6f,d3
  578.          bgt.s   GReset
  579.          lea     TMove(pc),a2
  580.          moveq   #1,d0
  581.          moveq   #0,d1
  582.          andi.w  #$f,d3
  583.          cmpi.w  #7,d3
  584.          bgt.s   Fromusp
  585.          moveq   #2,d5
  586.          moveq   #1,d6
  587.          move.w  d3,d7
  588.          moveq   #17,d2
  589.          bra.s   Rew2
  590. Fromusp  move.w  d3,d4
  591.          andi.w  #7,d4
  592.          moveq   #2,d2
  593.          moveq   #1,d3
  594.          moveq   #17,d5
  595.          bra     Rewrite
  596.  
  597.  
  598. GReset   lea     TReset(pc),a2
  599.          cmpi.w  #$4e70,d3
  600.          beq.s   OneByte
  601.  
  602.          lea     TNop(pc),a2
  603.          cmpi.w  #$4e71,d3
  604.          beq.s   OneByte
  605.  
  606.          cmpi.w  #$4e72,d3    'stop' operand
  607.          bne.s   SRte
  608.          lea     TStop(pc),a2
  609. Xstop    moveq   #1,d0        no qualifier
  610.          moveq   #1,d1        2 words
  611.          moveq   #0,d2        no second address
  612.          moveq   #12,d5       immediate address
  613.          moveq   #2,d6        word operand
  614.          move.w  (a1)+,d7
  615.          bra     Rew13
  616.  
  617. SRte     lea     TRte(pc),a2
  618.          cmpi.w  #$4e73,d3
  619.          beq.s   OneByte
  620.  
  621.          lea     TRtd(pc),a2
  622.          cmpi.w  #$4e74,d3
  623.          bne.s   SRts
  624.          tst.w   SMicro(a0)   only 68010+
  625.          bne.s   Xstop
  626.          bra.s   Jmpf
  627.  
  628. SRts     lea     TRts(pc),a2
  629.          cmpi.w  #$4e75,d3
  630.          beq.s   OneByte
  631.  
  632.          lea     TTrapv(pc),a2
  633.          cmpi.w  #$4e76,d3
  634.          beq.s   OneByte
  635.  
  636.          cmpi.w  #$4e77,d3
  637.          bne.s   GMovec
  638.          lea     TRtr(pc),a2
  639. OneByte  moveq   #0,d5          no operand
  640.          moveq   #1,d0          no qualifier
  641.          moveq   #0,d1          write one word
  642.          bra     Rewr2
  643. Jmpf     bra     Undef
  644.  
  645. GMovec   cmpi.w  #$4e7a,d3
  646.          beq.s   ismovec
  647.          cmpi.w  #$4e7b,d3
  648.          bne.s   GJsr
  649. ismovec  tst.w   SMicro(a0)
  650.          beq.s   Jmpf
  651.          move.w  d7,d0
  652.          andi.w  #$7fe,d0
  653.          bne.s   Jmpf
  654.          lea     TMovec(pc),a2
  655.          moveq   #1,d0          no qualifier
  656.          moveq   #1,d1          two words
  657.          moveq   #15,d2         assume sfc
  658.          btst    #0,d7
  659.          beq.s   noinc
  660.          addq.w  #1,d2
  661. noinc    btst    #11,d7
  662.          beq.s   nocni
  663.          addq.w  #2,d2
  664. nocni    moveq   #1,d5          2nd address type An or Dn
  665.          btst    #15,d7
  666.          beq.s   noicn
  667.          addq.w  #1,d5
  668. noicn    lsr.w   #8,d7
  669.          lsr.w   #4,d7
  670.          andi.w  #7,d7
  671.          btst    #0,d3
  672.          beq.s   gnom
  673.          bsr     Swapreg
  674. gnom     bra     Rewrite
  675.  
  676. GJsr     cmpi.w  #$4e80,d3
  677. Jjmpf    blt.s   Jmpf
  678.          cmpi.w  #$4ebf,d3
  679.          bgt.s   GJmp
  680.          lea     TJsr(pc),a2
  681. XJmp     moveq   #1,d0
  682.          bsr     DecAddr1
  683.          cmpi.w  #3,d5      jsr (An) is ok
  684.          beq.s   Rew13
  685.          cmpi.w  #6,d5      nothing below $XX(An)
  686.          bcs.s   goodno
  687.          cmpi.w  #12,d5     no #$XXXX
  688.          beq.s   goodno
  689. Rew13    bra     Rewr1
  690. goodno   bra     Undef
  691.  
  692. GJmp     cmpi.w  #$4eff,d3
  693.          bgt     Jmpf
  694.          lea     TJmp(pc),a2
  695.          bra     XJmp
  696.  
  697. GLea     move.w  d3,d0
  698.          andi.w  #$fff8,d0
  699.          cmpi.w  #$49c0,d0
  700.          beq     GExt
  701.          cmpi.w  #$4180,d3
  702.          blt.s   Jjmpf
  703.          btst    #6,d3
  704.          beq.s   GChk
  705.          lea     TLea(pc),a2
  706.          moveq   #1,d0     no qualifier
  707.          bsr     Dnea
  708.          bsr     Check2
  709.          moveq   #2,d2     lea ...,An
  710. nomrel   bra     Rewrite
  711.  
  712. GChk     move.w  d3,-(a7)
  713.          bsr     DecAddr1
  714.          move.w  (a7)+,d4
  715.          tst.l   d0
  716.          bmi.s   NoChk
  717.          cmpi.w  #2,d5
  718.          beq.s   NoChk        no chk.x An,Dm
  719.          move.w  d4,d0
  720.          andi.w  #$e00,d4
  721.          lsr.w   #8,d4
  722.          lsr.w   #1,d4
  723.          moveq   #1,d2
  724.          andi.w  #$180,d0
  725.          cmpi.w  #$180,d0      .w
  726.          bne.s   Cmpl
  727.          moveq   #2,d0
  728.          lea     TChk(pc),a2
  729.          bra.s   nomrel
  730. NoChk    bra     Undef
  731. Cmpl     cmpi.w  #$100,d0         .l only on 68020
  732.          bne.s   NoChk
  733.          cmpi.w  #2,SMicro(a0)
  734.          bcs.s   NoChk
  735.          moveq   #4,d0
  736. noml     bra.s   nomrel
  737.  
  738. Group5   move.w  d3,d0
  739.          andi.w  #$c0,d0
  740.          cmpi.w  #$c0,d0
  741.          beq.s   GDbcc
  742.          lea     TSubq(pc),a2
  743.          btst    #8,d3
  744.          bne.s   GSubq
  745.          lea     TAddq(pc),a2    addq
  746. GSubq    move.w  d3,d7       subq
  747.          andi.w  #$e00,d7
  748.          lsr.w   #8,d7
  749.          lsr.w   #1,d7
  750.          bne.s   no8
  751.          moveq   #8,d7
  752. no8      moveq   #1,d6
  753.          moveq   #12,d5
  754.          lsr.w   #5,d0
  755.          moveq   #0,d1
  756.          bsr     DecAddr2
  757.          cmpi.w  #10,d2    no #$... or higher
  758.          bcc.s   gf
  759.          tst.l   d0
  760.          bne.s   noml
  761.          cmpi.w  #2,d2     no addq.b #$X,An
  762.          bne.s   noml
  763. gf       bra.s   fff
  764.  
  765. GDbcc    move.w  d3,d0
  766.          andi.w  #$38,d0
  767.          cmpi.w  #8,d0
  768.          bne.s   GScc
  769.          move.w  d3,d0       dbcc
  770.          lea     Branch(pc),a2
  771.          andi.w  #$f00,d0
  772.          lsr.w   #8,d0
  773.          mulu    #5,d0
  774.          cmpi.w  #5,d0
  775.          bgt.s   Readd
  776.          subq.l  #5,d0
  777. Readd    adda.l  d0,a2
  778.          moveq   #1,d1   no of words = 2
  779.          moveq   #1,d0   no qualifier
  780.          btst    #0,d7   displacement must be even
  781.          bne.s   fff
  782.          move.l  SRelAddr(a0),d4
  783.          ext.l   d7
  784.          add.l   d7,d4
  785.          addq.l  #2,d4
  786.          move.w  d3,d7
  787.          andi.w  #7,d7
  788.          moveq   #1,d5
  789.          moveq   #8,d2
  790.          moveq   #4,d3
  791.          bra     Rewrite
  792.  
  793. GScc     cmpi.w  #$38,d0
  794.          beq.s   fff
  795.          lea     Setcc(pc),a2   scc
  796.          moveq   #0,d0
  797.          move.w  d3,d0
  798.          andi.w  #$f00,d0
  799.          lsr.w   #6,d0
  800.          adda.l  d0,a2
  801.          moveq   #1,d0
  802.          bsr     DecAddr1
  803.          cmpi.w  #8,d5
  804.          beq.s   eadr
  805.          cmpi.w  #9,d5
  806.          bne.s   neadr
  807. eadr     btst    #0,d7      Address must be even
  808.          beq.s   neadr
  809. fff      bra     Undef
  810.  
  811.  
  812. Group6   moveq   #0,d0
  813.          move.w  d3,d0
  814.          lea     Branch(pc),a2
  815.          andi.w  #$f00,d0
  816.          lsr.w   #8,d0
  817.          mulu    #5,d0
  818.          addq.l  #1,d0
  819.          add.l   d0,a2
  820.          moveq   #0,d1   assume no of word = 1
  821.          moveq   #1,d0   assume no qualifier
  822.          moveq   #8,d5
  823.          moveq   #4,d6
  824.          move.l  d7,d4     displacement
  825.          move.l  SRelAddr(a0),d7
  826.          addq.l  #2,d7
  827.          moveq   #0,d2
  828.          tst.b   d3      8 bit displ 0 then 16 bit displ
  829.          beq.s   Trywrd
  830.          cmpi.b  #$ff,d3 8 bit displ ff then 32 bit displ
  831.          beq.s   Trylng
  832.          moveq   #6,d0   qualifier = .s
  833.          andi.l  #$ff,d3
  834.          ext.w   d3
  835.          move.l  d3,d4
  836.          bra.s   bext
  837. Trywrd   moveq   #1,d1
  838.          andi.l  #$ffff,d4
  839. bext     ext.l   d4
  840.          add.l   d4,d7
  841.          bra.s   bccr
  842. Trylng   cmpi.w  #2,SMicro(a0)  long offsets only
  843.          blt.s   fff            for >= 68020
  844.          moveq   #4,d0          qualifier = .l
  845.          moveq   #2,d1          3 words
  846.          move.l  2(a1),d4
  847.          add.l   d4,d7
  848. bccr     btst    #0,d7    branch address even
  849.          bne.s   fff
  850. neadr    bra     Rewr1
  851.  
  852. ; MOVEQ
  853.  
  854. Group7   lea     TMoveq(pc),a2
  855.          btst    #8,d3
  856.          bne.s   fff
  857.          move.w  d3,d7
  858.          andi.w  #$ff,d7
  859.          moveq   #12,d5
  860.          moveq   #0,d6
  861.          move.w  d3,d4
  862.          andi.w  #$e00,d4
  863.          lsr.w   #8,d4
  864.          lsr.w   #1,d4
  865.          moveq   #1,d2
  866.          moveq   #1,d0
  867.          moveq   #0,d1
  868.          bra.s   Rew4
  869.  
  870. ; OR group   8 7 6
  871. ;       OR   0 0 0
  872. ;            0 0 1   if bit 8 is 1 then  5 4 3
  873. ;            0 1 0                       0 0 0
  874. ;            1 0 0                       0 0 1
  875. ;            1 0 1                 are not allowed
  876. ;            1 1 0
  877. ;
  878. ;            8 7 6 5 4
  879. ;            0 1 1     divu
  880. ;            1 0 0 0 0 sbcd
  881. ;            1 0 1 0 0 pack (68020)
  882. ;            1 1 0 0 0 unpk (68020)
  883. ;            1 1 1     divs
  884.  
  885.  
  886. Group8   move.w  d3,d0
  887.          andi.w  #$1c0,d0
  888.          cmpi.w  #$c0,d0    test if 876 = 011
  889.          beq.s   GDivu
  890.          cmpi.w  #$1c0,d0   test if 876 = 111
  891.          beq.s   GDivs
  892.          btst    #8,d3      test if bit 8 set
  893.          beq.s   isor
  894.          move.w  d3,d1
  895.          andi.w  #$30,d1    test if 54 = 00
  896.          beq.s   GSbcd
  897. isor     move.w  d3,-(a7)   or command
  898.          bsr     Size       qualifier
  899.          lea     Tor(pc),a2
  900.          bsr     DecAddr1
  901.          movea.l d4,a4
  902.          move.w  (a7)+,d4
  903.          cmpi.w  #2,d5
  904.          beq.s   nondef
  905.          btst    #8,d4
  906.          beq.s   nextG
  907.          move.w  d4,d7
  908.          move.l  a4,d4
  909.          andi.w  #$e00,d7
  910.          lsr.w   #8,d7
  911.          lsr.w   #1,d7
  912.          move.w  d5,d2
  913.          moveq   #1,d5
  914. Rew4     bra     Rewrite
  915.  
  916. GDivu    lea     TDivu(pc),a2
  917.          bra.s   GDiv
  918. GDivs    lea     TDivs(pc),a2
  919. GDiv     move.w  d3,-(a7)
  920.          bsr     DecAddr1
  921.          moveq   #1,d0
  922.          move.w  (a7)+,d4
  923.          cmpi.w  #2,d5           no divy.x An,Dm
  924.          beq.s   nondef
  925.          cmpi.w  #12,d5          no divy.x ccr,Dn and higher
  926.          bgt.s   nondef
  927. nextG    andi.w  #$e00,d4
  928.          lsr.w   #8,d4
  929.          lsr.w   #1,d4
  930.          moveq   #1,d2
  931.          bra.s   Rew4
  932. nondef   bra     Undef
  933.  
  934. GSbcd    cmpi.w  #$100,d0
  935.          bne.s   GPack
  936.          lea     TSbcd(pc),a2
  937.          moveq   #1,d0
  938.          bra     DnDm
  939. GPack    cmpi.w  #2,SMicro(a0) if micro <2 undefined
  940.          blt.s   nondef
  941.          cmpi.w  #$140,d0
  942.          bne.s   GUnpk
  943.          lea     TPack(pc),a2
  944. GUnpk    lea     TUnpk(pc),a2  >>>>> not implemented >>>>
  945.          bra.s   nondef
  946.  
  947.  
  948. Group9   move.w  d3,d0
  949.          andi.w  #$c0,d0
  950.          cmpi.w  #$c0,d0
  951.          beq     GSuba
  952.          btst    #8,d3
  953.          beq.s   GSub
  954.          move.w  d3,d0
  955.          andi.w  #$30,d0
  956.          bne.s   GSub
  957.          lea     TSubx(pc),a2
  958.          moveq   #0,d1
  959.          move.w  d3,d7    subx
  960.          andi.w  #7,d7
  961.          move.w  d3,d4
  962.          andi.w  #$e00,d4
  963.          lsr.w   #8,d4
  964.          lsr.w   #1,d4
  965.          bsr     Size
  966.          moveq   #1,d2
  967.          moveq   #1,d5
  968.          btst    #3,d3
  969.          beq.s   GGR
  970.          moveq   #5,d2
  971.          moveq   #5,d5
  972. GGR      bra     Rewrite
  973.  
  974. GSub     lea     TSub(pc),a2
  975.          bsr     Size
  976.          move.w  d3,-(a7)
  977.          bsr     DecAddr1
  978.          movea.l d4,a4
  979.          move.w  (a7)+,d4
  980.          btst    #8,d4
  981.          bne.s   Slong
  982.          andi.w  #$e00,d4       sub.x <ea>,Dn
  983.          lsr.w   #8,d4
  984.          lsr.w   #1,d4
  985.          moveq   #1,d2
  986.          cmpi.w  #2,d5          is it An?
  987.          bne.s   GGR
  988.          tst.l   d0             ok if not .b
  989.          bne.s   GGR
  990. defno    bra     Undef
  991. Slong    move.w  d4,d7          sub.x Dn,<ea>
  992.          move.l  a4,d4
  993.          andi.w  #$e00,d7
  994.          lsr.w   #8,d7
  995.          lsr.w   #1,d7
  996.          move.w  d5,d2
  997.          moveq   #1,d5
  998.          cmpi.w  #3,d2          no Dn or An
  999.          bcs.s   defno
  1000. tsthi    cmpi.w  #10,d2         nothing above $...
  1001.          bcc.s   defno
  1002.          bra.s   GGR
  1003.  
  1004. GSuba    lea     TSuba(pc),a2
  1005.          moveq   #4,d0
  1006.          btst    #8,d3
  1007.          bne.s   Sublng
  1008.          moveq   #2,d0
  1009. Sublng   bsr     Dnea
  1010.          moveq   #2,d2
  1011.          bra.s   GGR
  1012.  
  1013.  
  1014. Groupb   move.w  d3,d0
  1015.          andi.w  #$c0,d0
  1016.          cmpi.w  #$c0,d0
  1017.          beq.s   GCmpa
  1018.          btst    #8,d3
  1019.          beq.s   GCmp
  1020.          move.w  d3,d0
  1021.          andi.w  #$38,d0
  1022.          cmpi.w  #8,d0
  1023.          beq.s   GCmpm
  1024.          lea     TEor(pc),a2
  1025.          bsr     Dneasize     eor
  1026.          exg     d4,d7
  1027.          exg     d5,d2
  1028.          cmpi.w  #2,d2
  1029. defnot   beq.s   defno
  1030.          bra.s   tsthi
  1031.  
  1032. GCmpa    lea     TCmpa(pc),a2     cmpa
  1033.          bra     XCmp
  1034.  
  1035. GCmp     lea     TCmp(pc),a2      cmp
  1036.          bsr     Dneasize
  1037.          tst.l   d0
  1038.          bne.s   Rew5
  1039. tstAn    cmpi.w  #2,d5            no cmp.b An,Dm
  1040.          beq.s   defnot
  1041. Rew5     bra     Rewrite
  1042.  
  1043. GCmpm    lea     TCmpm(pc),a2     cmpm
  1044.          ori.w   #$10,d3
  1045.          bsr     Dneasize
  1046.          moveq   #4,d2
  1047.          moveq   #4,d5
  1048.          bra.s   nofix
  1049.  
  1050. Groupc   move.w  d3,d0
  1051.          andi.w  #$1c0,d0
  1052.          cmpi.w  #$1c0,d0
  1053.          beq.s   GMuls
  1054.          cmpi.w  #$c0,d0
  1055.          beq.s   GMulu
  1056.          btst    #8,d3
  1057.          beq.s   GAnd
  1058.          move.w  d3,d0
  1059.          andi.w  #$38,d0
  1060.          beq.s   exgabcd
  1061.          cmpi.w  #8,d0
  1062.          beq.s   exgabcd
  1063. GAnd     lea     TAnd(pc),a2     and
  1064.          bsr     Xdneasize
  1065.          bra.s   tstAn
  1066.  
  1067. GMuls    lea     TMuls(pc),a2    muls
  1068.          bra.s   GMul
  1069.  
  1070. GMulu    lea     TMulu(pc),a2    mulu
  1071. GMul     moveq   #1,d0       no qualifier
  1072.          bsr     Dnea
  1073.          cmpi.w  #2,d5       no mul An,Dm
  1074.          beq     Undef
  1075.          bra.s   nofix
  1076.  
  1077.  
  1078. exgabcd  moveq   #1,d0       no qualifier
  1079.          move.w  d3,d1
  1080.          andi.w  #$c0,d1
  1081.          beq.s   GAbcd
  1082.          lea     TExg(pc),a2     exg
  1083.          move.w  d3,a4
  1084.          bsr     Dnea
  1085.          move.w  a4,d3
  1086.          and.w   #$f8,d3
  1087.          cmpi.w  #$48,d3
  1088.          bne.s   nofix
  1089.          moveq   #2,d2
  1090. nofix    bra     Rewrite
  1091.  
  1092. GAbcd    lea     TAbcd(pc),a2     abcd
  1093. DnDm     bsr     Dnea
  1094.          bra.s   fixan
  1095.  
  1096. ; if bits 7,6 = 11 then its adda
  1097. ; if bit 8 is 1 and bits 5,4 = 00 then its addx
  1098. ; else its add
  1099.  
  1100. Groupd   move.w  d3,d0
  1101.          andi.w  #$c0,d0
  1102.          cmpi.w  #$c0,d0      bits 7,6=11
  1103.          beq.s   GAdda
  1104.          btst    #8,d3
  1105.          beq.s   GAdd         if bit 8=0 its add
  1106.          move.w  d3,d0
  1107.          andi.w  #$30,d0      now if bits 5,4<>00 its add
  1108.          bne.s   GAdd
  1109.          lea     TAddx(pc),a2     addx
  1110.          bsr     Dneasize
  1111. fixan    cmpi.w  #2,d5
  1112.          bne.s   nofix
  1113.          moveq   #5,d2        fix addressing mode
  1114.          moveq   #5,d5
  1115.          bra.s   nofix
  1116.  
  1117. GAdda    lea     TAdda(pc),a2     adda
  1118. XCmp     moveq   #2,d0
  1119.          btst    #8,d3
  1120.          beq.s   addword
  1121.          moveq   #4,d0
  1122. addword  bsr     Dnea
  1123.          moveq   #2,d2
  1124.          bra.s   nofix
  1125.  
  1126. GAdd     lea     TAdd(pc),a2     add
  1127.          bsr     Xdneasize
  1128.          bra.s   nofix
  1129.  
  1130. * logical group
  1131.  
  1132. Groupe   lea     TAsr(pc),a2
  1133.          btst    #8,d3
  1134.          beq.s   addrok
  1135.          addq.w  #5,a2
  1136. addrok   move.w  d3,d0
  1137.          andi.w  #$c0,d0
  1138.          cmpi.w  #$c0,d0
  1139.          bne.s   nomem
  1140.          move.w  d3,d0
  1141.          andi.w  #$600,d0
  1142.          lsr.w   #8,d0
  1143.          cmpi.w  #4,d0
  1144.          beq.s   nox
  1145.          addq.l  #1,a2
  1146. nox      mulu    #5,d0
  1147.          adda.w  d0,a2
  1148.          moveq   #1,d0
  1149.          bsr     DecAddr1
  1150.          cmpi.w  #3,d5        no Dn or An
  1151.          bcs.s   Undef
  1152.          cmpi.w  #10,d5       no #$... or higher
  1153.          bcc.s   Undef
  1154.          bra     Rewr1
  1155.  
  1156. nomem    move.w  d3,d0
  1157.          andi.w  #$18,d0
  1158.          lsr.w   #2,d0
  1159.          cmpi.w  #4,d0
  1160.          beq.s   noxx
  1161.          addq.l  #1,a2
  1162. noxx     mulu    #5,d0
  1163.          adda.w  d0,a2
  1164.          move.w  d3,d7
  1165.          andi.w  #$e00,d7
  1166.          lsr.w   #8,d7
  1167.          lsr.w   #1,d7
  1168.          moveq   #1,d5    data register
  1169.          btst    #5,d3
  1170.          bne.s   isdata
  1171.          moveq   #12,d5   immediate
  1172.          moveq   #1,d6
  1173.          tst.w   d7
  1174.          bne.s   isdata
  1175.          moveq   #8,d7
  1176. isdata   bsr     Size
  1177.          move.w  d3,d4
  1178.          andi.w  #7,d4
  1179.          moveq   #0,d1
  1180.          moveq   #1,d2
  1181.          bra.s   Rewrite
  1182.  
  1183.  
  1184. **** UNDEFINED INSTRUCTION *****
  1185.  
  1186. Undef    lea     nodef(pc),a2       non defined opcode
  1187.          moveq   #0,d2
  1188.          movea.l SBegin(a0),a1  1st address
  1189.          move.w  (a1),d7
  1190.          moveq   #0,d2          type of 2nd address
  1191.          moveq   #2,d6          1st length = 2
  1192.          moveq   #8,d5          1st type = absolute
  1193.          moveq   #2,d0          .w qualifier
  1194.          moveq   #0,d1          write one word
  1195.          bra.s   Rewr1
  1196.  
  1197. Rewrite  tst.l   d0
  1198.          bmi.s   Undef
  1199.          cmpi.w  #1,d0
  1200.          ble.s   rere
  1201.          cmpi.w  #8,d2
  1202.          beq.s   dotest
  1203.          cmpi.w  #9,d2
  1204.          bne.s   rere
  1205. dotest   btst    #0,d4          make sure there are no (long) word
  1206.          bne.s   Undef          operations on odd addresses
  1207. rere     move.w  #0,-(a7)       no 3rd address
  1208.          move.l  d4,-(a7)       2nd address
  1209.          move.l  d4,SAddr2(a0)
  1210.          move.w  d3,-(a7)       2nd length
  1211.          move.w  d3,SLen2(a0)
  1212. Rewr1    tst.l   d0
  1213.          bmi.s   Undef
  1214.          move.w  d2,-(a7)       2nd type
  1215.          move.w  d2,SType2(a0)
  1216.          move.l  d7,-(a7)       1st address
  1217.          move.l  d7,SAddr1(a0)
  1218.          move.w  d6,-(a7)       1st length
  1219.          move.w  d6,SLen1(a0)
  1220. Rewr2    move.w  d5,-(a7)       1st type
  1221.          move.w  d5,SType1(a0)
  1222.          move.w  d0,-(a7)       qualifier
  1223.          move.l  a2,-(a7)       opcode text
  1224.          move.w  d1,-(a7)       number of words
  1225.  
  1226. ***** FILL BUFFER ****
  1227.  
  1228. WriteBuf move.l  a0,d1          get buffer start
  1229.          addi.w  #SBuffer,d1
  1230.          movea.l d1,a1
  1231.          move.l  d1,d7
  1232.          addi.w  #42,d7
  1233.  
  1234.          movea.l a1,a2          clear buffer
  1235.          move.l  #$20202020,d0
  1236.          moveq   #20,d1
  1237. clear    move.l  d0,(a2)+
  1238.          dbra    d1,clear
  1239.  
  1240.          move.l  SRelAddr(a0),d1  get relative address
  1241.          moveq   #1,d5
  1242.          bsr     address         write relative address
  1243.          addq.l  #1,a1           blank
  1244.  
  1245.          moveq   #0,d3
  1246.          move.w  (a7)+,d3
  1247.  
  1248.          movea.l SBegin(a0),a2
  1249.  
  1250.          move.l  d3,d1           correction to addresses
  1251.          addq.l  #1,d1
  1252.          lsl.l   #1,d1
  1253.          move.w  d1,STotal(a0)
  1254.          move.l  a2,d0
  1255.          add.l   d1,d0
  1256.          move.l  d0,SBegin(a0)
  1257.          move.l  SRelAddr(a0),d0
  1258.          add.l   d1,d0
  1259.          move.l  d0,SRelAddr(a0)
  1260.  
  1261.  
  1262. *** HEX BYTES ***
  1263.  
  1264. Bloop    move.w  (a2)+,d1        write hex header
  1265.          bsr     words
  1266.          addq.l  #1,a1
  1267.          dbra    d3,Bloop
  1268.          movea.l d7,a1
  1269.  
  1270.  
  1271. *** OPCODE ***
  1272.  
  1273.          movea.l (a7)+,a2
  1274.          move.l  a2,d0
  1275.          subi.l  #nodef,d0
  1276.          move.w  d0,SOpCode(a0)
  1277.          move.w  d0,d6
  1278.          moveq   #10,d0          Write op code
  1279. opcod    move.b  (a2)+,(a1)+
  1280.          dbeq    d0,opcod
  1281.          subq.l  #1,a1
  1282.          move.b  #$20,(a1)
  1283.  
  1284. *** QUALIFIER ***
  1285.  
  1286.  
  1287.          moveq   #0,d4
  1288.          move.w  (a7)+,d4
  1289.          cmpi.b  #1,d4         No qualifier?
  1290.          beq.s   Qualno
  1291.          lea     pointb(pc),a0     Write qualifier
  1292.          adda.w  d4,a0
  1293.          bsr     wrbuf
  1294. Qualno   addq.l  #1,a1
  1295.  
  1296.  
  1297. *** ADDRESS MODE ***
  1298.  
  1299.          moveq   #0,d0
  1300.          move.w  (a7)+,d0      type of address
  1301.          beq     endaddr       no address
  1302.  
  1303. NAddress moveq   #0,d5
  1304.          move.w  (a7)+,d4      get length
  1305.          move.l  (a7)+,d1      get address
  1306.          cmpi.w  #1,d0
  1307.          bne.s   nodreg        Address mode Dn
  1308.          lea     RegText(pc),a0
  1309.          bsr     Dreg
  1310.          bra.s   endad1
  1311.  
  1312. nodreg   cmpi.w  #2,d0
  1313.          bne.s   noareg        Address mode An
  1314.          bsr     Areg
  1315.          bra.s   endad1
  1316.  
  1317. noareg   cmpi.w  #3,d0
  1318.          beq.s   a_reg         Address mode (An)
  1319.  
  1320.          cmpi.w  #4,d0
  1321.          bne.s   no_aa_r       Address mode (An)+
  1322.          bsr     Aareg
  1323.          move.b  #'+',(a1)+
  1324.          bra.s   endad1
  1325.  
  1326. no_aa_r  cmpi.w  #5,d0         Address mode -(An)
  1327.          bne.s   no_ba_r
  1328.          move.b  #'-',(a1)+
  1329.          bra.s   a_reg
  1330.  
  1331. no_ba_r  cmpi.w  #6,d0         Address mode d(An)
  1332.          bne.s   no_da_r
  1333.          move.w  d1,d7
  1334.          move.w  a3,d1
  1335.          bsr     sword
  1336.          move.w  d7,d1
  1337. a_reg    bsr     Aareg
  1338.          bra.s   endad1
  1339.  
  1340. no_da_r  cmpi.w  #7,d0         Address mode d(An,Rn)
  1341.          bne.s   no_dar_r
  1342.          move.w  d1,d7
  1343.          move.w  a3,d1
  1344.          bsr     sbyte         Write byte
  1345.          move.b  #$28,(a1)+    Write "("
  1346.          move.w  d7,d1
  1347.          bsr     Areg          Write register
  1348.          bra     Xpc
  1349.  
  1350. no_dar_r cmpi.w  #12,d0
  1351.          bne.s   tryabs
  1352.          move.b  #'#',(a1)+
  1353.          subq.w  #4,d0         Change mode to absolute
  1354.  
  1355. tryabs   cmpi.w  #9,d0         8,9
  1356.          bgt.s   trydpc
  1357.  
  1358.          tst.w   d4            signed byte
  1359.          bne.s   trybyte
  1360.          bsr     sbyte
  1361. endad1   bra     endad2
  1362.  
  1363. trybyte  move.b  #'$',(a1)+
  1364.          cmpi.w  #1,d4
  1365.          bne.s   tryword       Byte absolute
  1366.          bsr     byte
  1367.          bra.s   endad1
  1368.  
  1369. tryword  cmpi.w  #2,d4
  1370.          bne.s   trysw         Word absolute
  1371.          tst.w   d6
  1372.          bne.s   noform
  1373.          bsr     format
  1374.          bra.s   endad1
  1375. noform   bsr     word
  1376.          bra.s   endad1
  1377.  
  1378. trysw    cmpi.w  #3,d4         signed word
  1379.          bne.s   trylw
  1380.          subq.l  #1,a1
  1381.          bsr     sword
  1382.          bra.s   endad1
  1383.  
  1384. trylw    cmpi.w  #4,d4
  1385.          bne.s   endad1
  1386.          bsr     long          Long word absolute
  1387.          bra.s   endad1
  1388.  
  1389. trydpc   cmpi.w  #10,d0
  1390.          bne.s   trypc         d(PC)
  1391.          cmpi.w  #4,d4
  1392.          beq.s   pclng
  1393.          move.w  a3,d1
  1394.          bsr     sword
  1395.          bra.s   pcsht
  1396. pclng    move.b  #'$',(a1)+
  1397.          bsr     long
  1398. pcsht    bsr     wrpc
  1399.          bra.s   endbra
  1400.  
  1401. trypc    cmpi.w  #11,d0
  1402.          bne.s   tryccr        d(PC,Rn)
  1403.          move.w  a3,d1
  1404.          bsr     sbyte
  1405.          bsr     wrpc
  1406. Xpc      move.b  #',',(a1)+
  1407.          move.w  a3,d1
  1408.          lsr.w   #8,d1
  1409.          lsr.w   #4,d1
  1410.          lea     RegText(pc),a0
  1411.          bsr     Dreg
  1412.          lea     pointw(pc),a0
  1413.          move.w  a3,d1
  1414.          andi.w  #$f00,d1
  1415.          beq.s   isword
  1416.          addq.l  #2,a0
  1417. isword   bsr     wrbuf
  1418. endbra   move.b  #')',(a1)+
  1419.          bra     endad2
  1420.  
  1421. tryccr   cmpi.w  #13,d0        to ccr
  1422.          bne.s   trysr
  1423.          lea     Tccr(pc),a0
  1424.          bra.s   wrbuf3
  1425.  
  1426. trysr    cmpi.w  #14,d0        to sr
  1427.          bne.s   tryusp
  1428.          lea     Tsr(pc),a0
  1429.          bsr     wrbuf
  1430.          bra.s   endad2
  1431.  
  1432. tryusp   cmpi.w  #18,d0        to sfc/dfc/usp/vbr
  1433.          bgt.s   smovem
  1434.          lea     Tsfc(pc),a0
  1435.          subi.w  #15,d0
  1436.          mulu    #3,d0
  1437.          ext.l   d0
  1438.          adda.l  d0,a0
  1439. wrbuf3   bsr     wr3
  1440.          bra.s   endad2
  1441.  
  1442. smovem   cmpi.w  #19,d0
  1443.          bne.s   endad2
  1444.          moveq   #0,d4
  1445.          move.w  d1,d5
  1446.          moveq   #0,d6        first loop flag
  1447. floop    btst    d4,d5        find first nonzero bit in d1
  1448.          bne.s   first
  1449.          addq.w  #1,d4
  1450.          cmpi.w  #16,d4
  1451.          bne.s   floop
  1452.          beq.s   endad2       no more nonzero bits
  1453. first    move.w  d4,d2        save first reg
  1454.          bra.s   mnext
  1455. lloop    btst    d4,d5
  1456.          beq.s   islast
  1457. mnext    addq.w  #1,d4
  1458.          cmpi.w  #16,d4
  1459.          bne.s   lloop
  1460. islast   tst.l   d6
  1461.          beq.s   ffst
  1462.          move.b  #'/',(a1)+
  1463. ffst     moveq   #1,d6
  1464.          lea     RegText(pc),a0
  1465.          move.w  d2,d1
  1466.          bsr.s   Dreg
  1467.          move.w  d4,d1
  1468.          subq.w  #1,d1
  1469.          cmp.w   d1,d2
  1470.          beq.s   lstlp
  1471.          move.b  #'-',(a1)+
  1472.          lea     RegText(pc),a0
  1473.          bsr.s   Dreg
  1474. lstlp    cmpi.w  #16,d4
  1475.          bne.s   floop
  1476.  
  1477.  
  1478. endad2   move.w  (a7)+,d0      next type
  1479.          beq.s   endaddr       no more
  1480.          move.b  #',',(a1)+
  1481.          cmpa.l  #-1,a5
  1482.          beq.s   MAD
  1483.          movea.l a5,a3
  1484. MAD      bra     NAddress      Second address
  1485.  
  1486. endaddr  movem.l (a7)+,d0-d7/a3-a6
  1487.          rts
  1488.  
  1489. ; Write (An)
  1490.  
  1491. Aareg    move.b  #'(',(a1)+
  1492.          bsr.s   Areg
  1493.          move.b  #')',(a1)+
  1494.          rts
  1495.  
  1496. ; Write An
  1497.  
  1498. Areg     lea     RegA(pc),a0
  1499. Dreg     lsl.w   #1,d1
  1500.          add.w   d1,a0
  1501. wrbuf    move.b  (a0)+,(a1)+
  1502.          move.b  (a0)+,(a1)+
  1503.          rts
  1504.  
  1505. ; Write (PC
  1506.  
  1507. wrpc     lea    PCtext(pc),a0
  1508. wr3      move.b (a0)+,(a1)+
  1509.          bra.s  wrbuf
  1510.  
  1511.  
  1512. ; Conversion to hex
  1513. ; a1 buffer (incremented)
  1514. ; d0 lost
  1515. ; d1 binary to write (unchanged)
  1516. ; d2 lost
  1517.  
  1518. sword    tst.w   d1
  1519.          bpl.s   sw1
  1520.          neg.w   d1
  1521.          move.b  #'-',(a1)+
  1522. sw1      move.b  #'$',(a1)+
  1523.          bra.s   word
  1524.  
  1525. sbyte    tst.b   d1
  1526.          bpl.s   sb1
  1527.          neg.b   d1
  1528.          move.b  #'-',(a1)+
  1529. sb1      move.b  #'$',(a1)+
  1530.          bra.s   byte
  1531.  
  1532. ; Write long word
  1533.  
  1534. long     tst.l   d1
  1535.          beq.s   null
  1536.          cmpi.l  #9,d1
  1537.          bhi.s   llong
  1538.          subq.l  #1,a1
  1539. llong    move.l  d1,d0
  1540.          swap    d0
  1541.          lsr.w   #8,d0
  1542.          bsr.s   byte1          1st byte of long
  1543.  
  1544.  
  1545. ; Write address
  1546.  
  1547. address  move.l  d1,d0
  1548.          swap    d0
  1549.          bsr.s   byte1          1st byte of address
  1550.          bra.s   words
  1551.  
  1552. ; Write hex word
  1553.  
  1554. word     tst.w   d1
  1555.          beq.s   null
  1556.          cmpi.w  #9,d1
  1557.          bhi.s   words
  1558.          subq.l  #1,a1
  1559. words    move.w  d1,d0
  1560.          lsr.w   #8,d0
  1561.          bsr.s   byte1          1st byte of word
  1562.          bra.s   bight
  1563. byte     tst.b   d1
  1564.          beq.s   null
  1565.          cmpi.b  #9,d1
  1566.          bhi.s   bight
  1567.          subq.l  #1,a1
  1568. bight    move.w  d1,d0
  1569.  
  1570. ; Convert byte to ASCII and write into buffer
  1571.  
  1572. byte1    move.b  d0,d2          save byte
  1573.          lsr.b   #4,d0          high half byte
  1574.          bsr.s   byte2
  1575.          move.b  d2,d0          restore byte
  1576.  
  1577. ; Convert half byte to ASCII and write into buffer
  1578.  
  1579. byte2    andi.b  #$f,d0         take lower half byte
  1580.          bne.s   write
  1581.          tst.w   d5
  1582.          beq.s   nowrite
  1583. write    moveq   #1,d5
  1584.          addi.b  #'0',d0        convert to "0" - "9"
  1585.          cmpi.b  #$3a,d0        above "9"?
  1586.          blt.s   nocorr
  1587.          addq.b  #7,d0          convert to "A" - "F"
  1588. nocorr   move.b  d0,(a1)+       write into buffer
  1589. nowrite  rts
  1590.  
  1591. null     subq.l  #1,a1
  1592.          move.b  #'0',(a1)+
  1593.          rts
  1594.  
  1595. ; write word or ASCII
  1596.  
  1597. format   cmpi.b  #'''',d1
  1598.          beq.s   word
  1599.          cmpi.b  #' ',d1
  1600.          blt.s   word
  1601.          cmpi.b  #$7e,d1
  1602.          bgt.s   word
  1603.          move.w  d1,d0
  1604.          lsr.w   #8,d0
  1605.          cmpi.b  #'''',d0
  1606.          beq.s   word
  1607.          cmpi.b  #' ',d0
  1608.          blt.s   word
  1609.          cmpi.b  #$7e,d0
  1610.          bgt.s   word
  1611.          subq.l  #1,a1
  1612.          move.b  #'''',(a1)+
  1613.          move.b  d0,(a1)+
  1614.          move.b  d1,(a1)+
  1615.          move.b  #'''',(a1)+
  1616.          rts
  1617.  
  1618.  
  1619. ; Decode <ea>,Dn or Dn,<ea>
  1620.  
  1621. Xdneasize move.w  d3,d0
  1622.          andi.w  #$100,d0
  1623.          movea.w d0,a4
  1624.          bsr.s   Dneasize
  1625.          cmpa.w  #0,a4
  1626.          beq.s   noswap
  1627. Swapreg  exg     d2,d5
  1628.          exg     d3,d6
  1629.          exg     d4,d7
  1630. noswap   rts
  1631.  
  1632.  
  1633. ; Decode Dn,<ea>
  1634.  
  1635. Dneasize bsr.s  Size
  1636. Dnea     move.w d3,-(a7)
  1637.          bsr    DecAddr1
  1638.          move.w (a7)+,d4
  1639.          andi.w #$e00,d4
  1640.          lsr.w  #8,d4
  1641.          lsr.w  #1,d4
  1642.          moveq  #1,d2
  1643.          rts
  1644.  
  1645. ; Get size of operand
  1646.  
  1647. Size     move.w  d3,d0
  1648.          andi.w  #$c0,d0
  1649.          lsr.w   #5,d0
  1650.          cmpi.w  #6,d0
  1651.          beq     rubbish
  1652.          rts
  1653.  
  1654. ; Get vector address
  1655.  
  1656. Vector   moveq   #1,d0
  1657.          moveq   #0,d1
  1658.          moveq   #0,d2
  1659.          moveq   #12,d5
  1660.          moveq   #1,d6
  1661.          andi.w  #7,d3
  1662.          move.w  d3,d7
  1663.          rts
  1664.  
  1665. ; Decode address for bit operation
  1666.  
  1667. Bit      move.w  d3,d0
  1668.          andi.w  #$100,d0
  1669.          bne.s   Rdata
  1670.          move.w  d3,d0
  1671.          andi.w  #$e00,d0
  1672.          cmpi.w  #$800,d0
  1673.          bne.s   rubbish
  1674.          move.w  (a1)+,d7
  1675.          cmpi.w  #31,d7         data must be 0..31
  1676.          bhi.s   rubbish
  1677.          moveq   #1,d0          no qualifier
  1678.          moveq   #1,d1          two words
  1679.          moveq   #12,d5         immediate
  1680.          moveq   #1,d6          byte
  1681.          bra.s   EndBit
  1682.  
  1683. Rdata    moveq   #1,d0          no qualifier
  1684.          moveq   #0,d1          one word
  1685.          moveq   #1,d5          type Dn
  1686.          move.w  d3,d7
  1687.          lsr.w   #8,d7
  1688.          lsr.w   #1,d7
  1689. EndBit   bsr.s   DecAddr2
  1690.          cmpi.w  #2,d2
  1691.          beq.s   rubbish        no  ",An"
  1692.          cmpi.w  #9,d2
  1693.          bgt.s   rubbish
  1694.          rts
  1695.  
  1696. ; Decode address for immediate opcode
  1697.  
  1698. Imdt     move.l  d3,d6
  1699.          andi.w  #$c0,d6
  1700.          lsr.w   #5,d6           length of 1st operand
  1701.          move.l  d6,d0           qualifier
  1702.          moveq   #12,d5          type of 1st operand
  1703.          moveq   #1,d1           number of words - 1
  1704.          cmpi.w  #6,d0
  1705.          beq.s   rubbish
  1706.          cmpi.w  #4,d0
  1707.          beq.s   longop
  1708.          move.w  (a1)+,d7
  1709.          tst.w   d0
  1710.          bne.s   nolong
  1711.          moveq   #1,d6           byte operand
  1712.          cmpi.w  #$ff,d7         check if high byte = 0
  1713.          bgt.s   rubbish
  1714.          bra.s   nolong
  1715. longop   move.l  (a1)+,d7
  1716.          moveq   #2,d1
  1717. nolong   bsr.s   DecAddr2
  1718.          cmpi.w  #2,d2
  1719.          beq.s   rubbish         no  ",An"
  1720.          rts
  1721.  
  1722. ; DecAddr1 decode second address and make it first
  1723.  
  1724. DecAddr1 tst.l   d0
  1725.          bmi.s   rubbish
  1726.          moveq   #0,d1
  1727.          bsr.s   DecAddr2
  1728.          move.w  d2,d5
  1729.          move.w  d3,d6
  1730.          move.l  d4,d7
  1731.          moveq   #0,d2
  1732.          rts
  1733.  
  1734. ; DecAddr2 decode |effective address| as second address
  1735. ;                 |  mode  |register|
  1736. ; mode                       reg if mode = 7
  1737. ; 0 = Dn                     000 = $xxxx
  1738. ; 1 = An                     001 = $xxxx xxxx
  1739. ; 2 = (An)                   010 = d(PC)
  1740. ; 3 = (An)+                  011 = d(PC,Rn)
  1741. ; 4 = -(An)                  100 = #$xxxx
  1742. ; 5 = d(An)                  101 - 111 reserved
  1743. ; 6 = d(An,Rn)
  1744.  
  1745. rubbish  moveq   #-1,d0
  1746.          rts
  1747. DecAddr2 move.w  d3,d2           type of second operand
  1748.          andi.w  #$38,d2
  1749.          lsr.w   #3,d2
  1750.          addq.w  #1,d2           mode
  1751.          move.w  d3,d4           address of second operand
  1752.          andi.w  #7,d4           register number
  1753.          cmpi.w  #8,d2
  1754.          beq.s   second
  1755.          cmpi.w  #6,d2
  1756.          blt.s   nodisp
  1757.          bne.s   fix7
  1758. getsec   addq.l  #1,d1           increment no of words
  1759.          move.w  (a1)+,a3        displacement
  1760.          cmpi.w  #10,d2          is it d(pc)?
  1761.          bne.s   nodisp
  1762.          moveq   #4,d3            write long address
  1763.          move.w  a3,d4
  1764.          ext.l   d4
  1765.          add.l   SRelAddr(a0),d4  get relative address
  1766.          addq.l  #2,d4
  1767. nodisp   rts
  1768. fix7     bsr.s   getsec          for d(An,Rn)
  1769.          tst.l   d0
  1770.          beq.s   is.b
  1771.          move.w  a3,d2           if the qualifier is not .b the
  1772.          andi.w  #1,d2           displacement must be even
  1773.          bne.s   rubbish
  1774. is.b     move.w  a3,d2           d must be X0YZ
  1775.          andi.w  #$f00,d2               or X8YZ
  1776.          cmpi.w  #$800,d2
  1777.          beq.s   fixed
  1778.          tst.w   d2
  1779.          bne.s   rubbish
  1780. fixed    moveq   #7,d2
  1781.          rts
  1782. second   moveq   #2,d3           assume length of word
  1783.          move.w  d4,d2
  1784.          addq.w  #8,d2           get address type
  1785.          cmpi.w  #10,d2
  1786.          beq.s   getsec          d(PC)
  1787.          cmpi.w  #11,d2
  1788.          beq.s   getsec          d(PC,Rn)
  1789.          cmpi.w  #9,d2
  1790.          bne.s   secwrd
  1791. secl     addq.w  #2,d1
  1792.          moveq   #4,d3
  1793.          move.l  (a1)+,d4        $xxxx xxxx/ #$xxxx xxxx
  1794.          rts
  1795. secwrd   cmpi.w  #12,d2
  1796.          bgt.s   trash    reserved
  1797.          bne.s   sec2     the #... address is determined
  1798.          cmpi.w  #4,d0    by the qualifier of the command
  1799.          beq.s   secl
  1800.          tst.w   d0
  1801.          bne.s   sec2
  1802.          move.w  (a1),d4       test if really is byte
  1803. *>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>*
  1804. * As far as I can tell this test is formally not correct,  *
  1805. * ie. eg. $000041EE is interpreted exactly the same as     *
  1806. * $000000EE namely    ori.b #-$12,d0    by the processor.  *
  1807. * I know of no assembler or complier which produces        *
  1808. * anything else for the redundant byte XX in $0000XXEE     *
  1809. * other than 00 or FF. For this reason I believe this test *
  1810. * helps to discriminate code from data.                    *
  1811. *>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>*
  1812.          andi.w  #$ff00,d4
  1813.          beq.s   byteok
  1814.          cmpi.w  #$ff00,d4
  1815.          bne.s   trash
  1816. byteok   moveq   #1,d3
  1817. sec2     addq    #1,d1          $xxxx / #$xxxx / #$xx
  1818.          move.w  (a1)+,d4
  1819.          rts
  1820.  
  1821. **** CHECK IF ADDRESS VALID *****
  1822.  
  1823. ; d2 <> 2, 12
  1824.  
  1825. Check1   cmpi.w  #2,d2
  1826.          beq.s   trash
  1827.          cmpi.w  #12,d2
  1828. ccc      bne.s   ok
  1829. trash    moveq   #-1,d0
  1830. ok       rts
  1831.  
  1832. ; d5 <> 1, 2, 4, 5, 12
  1833.  
  1834. Check2   cmpi.w  #1,d5
  1835.          beq.s   trash
  1836.          cmpi.w  #2,d5
  1837.          beq.s   trash
  1838.          cmpi.w  #4,d5
  1839.          beq.s   trash
  1840.          cmpi.w  #5,d5
  1841.          beq.s   trash
  1842.          cmpi.w  #12,d5
  1843.          bra.s   ccc
  1844.  
  1845. Group    dc.l Group0,Group1,Group2,Group3,Group4,Group5,Group6
  1846.          dc.l Group7,Group8,Group9,Undef,Groupb,Groupc,Groupd
  1847.          dc.l Groupe,Undef
  1848.  
  1849. ******* OP CODE TEXTS *******
  1850.  
  1851. nodef    dc.b 'dc',0
  1852. TAbcd    dc.b 'abcd',0
  1853. TAdd     dc.b 'add',0
  1854. TAdda    dc.b 'adda',0
  1855. TAddi    dc.b 'addi',0
  1856. TAddq    dc.b 'addq',0
  1857. TAddx    dc.b 'addx',0
  1858. TAnd     dc.b 'and',0
  1859. TAndi    dc.b 'andi',0
  1860. TBchg    dc.b 'bchg',0
  1861. TBclr    dc.b 'b'
  1862. TClr     dc.b 'clr',0
  1863. TBfchg   dc.b 'bfchg',0
  1864. TBfclr   dc.b 'bfclr',0
  1865. TBfexts  dc.b 'bfexts',0
  1866. TBfextu  dc.b 'bfextu',0
  1867. TBfffo   dc.b 'bfffo',0
  1868. TBfins   dc.b 'bfins',0
  1869. TBfset   dc.b 'bfset',0
  1870. TBftst   dc.b 'bfset',0
  1871. TBkpt    dc.b 'bkpt',0
  1872. TBset    dc.b 'bset',0
  1873. TBtst    dc.b 'b'
  1874. TTst     dc.b 'tst',0
  1875. TCallm   dc.b 'callm',0
  1876. TCas     dc.b 'cas',0
  1877. TCas2    dc.b 'cas2',0
  1878. TChk     dc.b 'chk',0
  1879. TChk2    dc.b 'chk2',0
  1880. TCmp     dc.b 'cmp',0
  1881. TCmpa    dc.b 'cmpa',0
  1882. TCmpi    dc.b 'cmpi',0
  1883. TCmpm    dc.b 'cmpm',0
  1884. TCmp2    dc.b 'cmp2',0
  1885. TDivs    dc.b 'divs',0
  1886. TDivsl   dc.b 'divsl',0
  1887. TDivu    dc.b 'divu',0
  1888. TDivul   dc.b 'divul',0
  1889. TEor     dc.b 'e'
  1890. Tor      dc.b 'or',0
  1891. TEori    dc.b 'e'
  1892. TOri     dc.b 'ori',0
  1893. TExg     dc.b 'exg',0
  1894. TExtn    dc.b 'ext',0
  1895. TExtb    dc.b 'extb',0
  1896. TIllegal dc.b 'illegal',0
  1897. TJmp     dc.b 'jmp',0
  1898. TJsr     dc.b 'jsr',0
  1899. TLea     dc.b 'lea',0
  1900. TLink    dc.b 'link',0
  1901. TMove    dc.b 'move',0
  1902. TMovea   dc.b 'movea',0
  1903. TMovec   dc.b 'movec',0
  1904. TMovem   dc.b 'movem',0
  1905. TMovep   dc.b 'movep',0
  1906. TMoveq   dc.b 'moveq',0
  1907. TMoves   dc.b 'moves',0
  1908. TMuls    dc.b 'muls',0
  1909. TMulu    dc.b 'mulu',0
  1910. TNbcd    dc.b 'nbcd',0
  1911. TNeg     dc.b 'neg',0
  1912. TNegx    dc.b 'negx',0
  1913. TNop     dc.b 'nop',0
  1914. TNot     dc.b 'not',0
  1915. TPack    dc.b 'pack',0
  1916. TPea     dc.b 'pea',0
  1917. TReset   dc.b 'reset',0
  1918. TRtd     dc.b 'rtd',0
  1919. TRte     dc.b 'rte',0
  1920. TRtm     dc.b 'rtm',0
  1921. TRtr     dc.b 'rtr',0
  1922. TRts     dc.b 'rts',0
  1923. TSbcd    dc.b 'sbcd',0
  1924. TStop    dc.b 'stop',0
  1925. TSub     dc.b 'sub',0
  1926. TSuba    dc.b 'suba',0
  1927. TSubi    dc.b 'subi',0
  1928. TSubq    dc.b 'subq',0
  1929. TSubx    dc.b 'subx',0
  1930. TSwap    dc.b 'swap',0
  1931. TTas     dc.b 'tas',0
  1932. TTrap    dc.b 'trap',0
  1933. TTrapv   dc.b 'trapv',0
  1934. TUnlk    dc.b 'unlk',0
  1935. TUnpk    dc.b 'unpk',0
  1936.  
  1937. *** BRANCH OPERANDS ***
  1938.  
  1939.          dc.b 'dbt ',0
  1940. Branch   dc.b 'dbra',0
  1941.          dc.b ' bsr',0
  1942.          dc.b 'dbhi',0
  1943.          dc.b 'dbls',0
  1944.          dc.b 'dbcc',0
  1945.          dc.b 'dbcs',0
  1946.          dc.b 'dbne',0
  1947.          dc.b 'dbeq',0
  1948.          dc.b 'dbvc',0
  1949.          dc.b 'dbvs',0
  1950.          dc.b 'dbpl',0
  1951.          dc.b 'dbmi',0
  1952.          dc.b 'dbge',0
  1953.          dc.b 'dblt',0
  1954.          dc.b 'dbgt',0
  1955.          dc.b 'dble',0
  1956. Setcc    dc.b ' st',0
  1957.          dc.b ' sf',0
  1958.          dc.b 'shi',0
  1959.          dc.b 'sls',0
  1960.          dc.b 'scc',0
  1961.          dc.b 'scs',0
  1962.          dc.b 'sne',0
  1963.          dc.b 'seq',0
  1964.          dc.b 'svc',0
  1965.          dc.b 'svs',0
  1966.          dc.b 'spl',0
  1967.          dc.b 'smi',0
  1968.          dc.b 'sge',0
  1969.          dc.b 'slt',0
  1970.          dc.b 'sgt',0
  1971.          dc.b 'sle',0
  1972.  
  1973. *** LOGICAL OPERANDS ***
  1974.  
  1975. TAsr     dc.b ' asr',0
  1976.          dc.b ' asl',0
  1977.          dc.b ' lsr',0
  1978.          dc.b ' lsl',0
  1979.          dc.b 'roxr',0
  1980.          dc.b 'roxl',0
  1981.          dc.b ' ror',0
  1982.          dc.b ' rol',0
  1983.  
  1984. ******* QUALIFIERS ******
  1985.  
  1986. pointb   dc.b '.b'
  1987. pointw   dc.b '.w'
  1988.          dc.b '.l'
  1989.          dc.b '.s'
  1990.  
  1991. *** REGISTER TEXTS ***
  1992.  
  1993. RegText  dc.b 'd0d1d2d3d4d5d6d7'
  1994. RegA     dc.b 'a0a1a2a3a4a5a6a7'
  1995. Tccr     dc.b 'ccr'
  1996. Tsr      dc.b 'sr'
  1997. PCtext   dc.b '(pc'
  1998. Tsfc     dc.b 'sfc'
  1999.          dc.b 'dfc'
  2000.          dc.b 'usp'
  2001.          dc.b 'vbr'
  2002.          end
  2003.