home *** CD-ROM | disk | FTP | other *** search
/ GEMini Atari / GEMini_Atari_CD-ROM_Walnut_Creek_December_1993.iso / files / language / asxbin / t6809e.asm < prev    next >
Encoding:
Assembly Source File  |  1993-10-23  |  1.9 KB  |  126 lines

  1.     .title    6809 Error Tests
  2.  
  3.     .sbttl    S_ACC Tests
  4.  
  5.     mmnn    =    0x2233
  6.  
  7.     adda    #0x01        ;   8b 01
  8.     adda    *0x02        ;   9b 02
  9.     adda    mmnn        ;   bb 22 33
  10.     adda    ,x        ;   ab 84
  11.     adda    [mmnn]        ;   ab 9f 22 33
  12.  
  13.     addb    #0x01        ;   cb 01
  14.     addb    *0x02        ;   db 02
  15.     addb    mmnn        ;   fb 22 33
  16.     addb    ,x        ;   eb 84
  17.     addb    [mmnn]        ;   eb 9f 22 33
  18.  
  19.  
  20.     .sbttl    S_SOP Tests
  21.  
  22.     clr    #0x01        ;a
  23.     clr    *0x02        ;   0f 02
  24.     clr    mmnn        ;   7f 22 33
  25.     clr    ,x        ;   6f 84
  26.     clr    [mmnn]        ;   6f 9f 22 33
  27.  
  28.  
  29.     .sbttl    S_LR Tests
  30.  
  31.     cmpx    #0x01        ;   8c 00 01
  32.     cmpx    *0x02        ;   9c 02
  33.     cmpx    mmnn        ;   bc 22 33
  34.     cmpx    ,x        ;   ac 84
  35.     cmpx    [mmnn]        ;   ac 9f 22 33
  36.  
  37.  
  38.     .sbttl    S_STR Tests
  39.  
  40.     stx    #0x01        ;a
  41.     stx    *0x02        ;   9f 02
  42.     stx    mmnn        ;   bf 22 33
  43.     stx    ,x        ;   af 84
  44.     stx    [mmnn]        ;   af 9f 22 33
  45.  
  46.  
  47.     .sbttl    S_LEA Tests
  48.  
  49.     leax    #0x01        ;a
  50.     leax    *0x02        ;a
  51.     leax    mmnn        ;a
  52.     leax    ,x        ;   30 84
  53.     leax    [mmnn]        ;   30 9f 22 33
  54.  
  55.  
  56.     .page
  57.     .sbttl    Direct Addressing Tests
  58.  
  59.     .area    ROM
  60.  
  61.     .globl    rom0,rom255,rom256
  62.  
  63. rom0:    .byte    1
  64.     .blkb    254
  65. rom255:    .byte    2
  66. rom256:    .byte    3
  67.  
  68.     .area    DATA
  69.  
  70.     .globl    dat0,dat255,dat256
  71.  
  72. dat0:    .byte    4
  73.     .blkb    254
  74. dat255:    .byte    5
  75. dat256:    .byte    6
  76.  
  77.     .area    PROGRAM
  78.  
  79.     neg    *0x20        ;00 20
  80.  
  81.     .setdp    rom0,ROM
  82.  
  83.     neg    *rom0        ;   00 00
  84.     neg    *rom255        ;   00 ff
  85.  
  86.     neg    *rom256        ;a  00 00
  87.     neg    *dat0        ;r  00 00
  88.     neg    *dat255        ;r  00 ff
  89.     neg    *dat256        ;ra 00 00
  90.  
  91.     .setdp    dat0,DATA
  92.  
  93.     neg    *rom0        ;r  00 00
  94.     neg    *rom255        ;r  00 ff
  95.     neg    *rom256        ;ra 00 00
  96.  
  97.     neg    *dat0        ;   00 00
  98.     neg    *dat255        ;   00 ff
  99.     neg    *dat256        ;a  00 00
  100.  
  101.     .setdp    0,_CODE
  102.  
  103.     neg    *rom0        ;r  00 00
  104.     neg    *rom255        ;r  00 ff
  105.     neg    *rom256        ;ra 00 00
  106.  
  107.     neg    *dat0        ;r  00 00
  108.     neg    *dat255        ;r  00 ff
  109.     neg    *dat256        ;ra 00 00
  110.  
  111.  
  112.     .sbttl    PC and PCR mode checks
  113.  
  114.     .globl    extern
  115.  
  116.     num    =    0x7f
  117.     ext    =    0x80
  118.  
  119.     adda    0x17,pc        ;   ab 8c 17
  120.     neg    num,pc        ;   60 8c 7f
  121.     tst    ext,pc        ;   6d 8d 00 80
  122.     tst    ext,pcr        ;   6d 8c (0x80 - . - 3)
  123.     adda    a0,pc        ;a
  124.     neg    extern,pc    ;a
  125. a0:
  126.