home *** CD-ROM | disk | FTP | other *** search
/ ftp.barnyard.co.uk / 2015.02.ftp.barnyard.co.uk.tar / ftp.barnyard.co.uk / cpm / walnut-creek-CDROM / ENTERPRS / CPM / UTILS / S / Z80ASM24.ZIP / TEST1A.ASM next >
Assembly Source File  |  1991-10-06  |  3KB  |  195 lines

  1. ;
  2. ; z80 assembler test instruction file
  3. ;
  4. ;
  5.     org    100h        ; test org pseudo op
  6. ;
  7. ;
  8. label1    equ    $        ; test equ pseudo op
  9. ;
  10.     defw    label1        ; test defw pseudo op
  11.     defb    03fh        ; test defb pseudo op form 1
  12.     defb    'this is a test' ; test defb pseudo op form 2
  13.     defs    55        ; test defs pseudo op
  14. ;
  15. ; the next three lines use the ibm pseudo which was added to facilitate
  16. ; screen formatting.
  17. ;
  18. ; the format is:  ibm hex,ascii,hex,ascii,... with no quotes around the
  19. ; ascii
  20. ;
  21. ; if the user whishes to use ascii first then the first byte must begin
  22. ; with a quote.
  23. ;
  24. ; the hex numbers must be in pairs and must not have 'h' after them the
  25. ; ascii strings can include any characters (including quotes and semi-
  26. ; colons except no commas
  27. ;
  28. ;
  29. ;
  30.     ibm    1a0000,top of screen on    lear seigler adm3,0d0a0d0a,down    3 lines
  31.     ibm    0fad,ascii coding,0fe4,screen formatting
  32.     ibm    'ASCII FIRST,0DFF,THEN HEX
  33. ;
  34.     ld    a,b        ; test load
  35.     ld    a,0ffh
  36.     ld    a,(hl)
  37.     ld    a,(ix+5)
  38.     ld    a,(iy+6)
  39.     ld    (hl),b
  40.     ld    (ix+5),b
  41.     ld    (iy+5),b
  42.     ld    (hl),23
  43.     ld    (ix+1),24
  44.     ld    (iy+1),25
  45.     ld    (bc),a
  46.     ld    (de),a
  47.     ld    (label1),a
  48.     ld    a,(bc)
  49.     ld    a,(de)
  50.     ld    a,(label1)
  51.     ld    a,i
  52.     ld    a,r
  53.     ld    i,a
  54.     ld    r,a
  55.     ld    bc,label1
  56.     ld    de,label1
  57.     ld    hl,label1
  58.     ld    sp,label1
  59.     ld    ix,label1
  60.     ld    iy,label1
  61.     ld    hl,(label1)
  62.     ld    ix,(label1)
  63.     ld    iy,(label1)
  64.     ld    (label1),hl
  65.     ld    (label1),bc
  66.     ld    (label1),de
  67.     ld    (label1),ix
  68.     ld    (label1),iy
  69.     ld    sp,hl
  70.     ld    sp,ix
  71.     ld    sp,iy
  72.     push    bc
  73.     push    de
  74.     push    hl
  75.     push    af
  76.     push    ix
  77.     push    iy
  78.     pop    bc
  79.     pop    de
  80.     pop    hl
  81.     pop    ix
  82.     pop    iy
  83.     pop    af
  84.     ex    de,hl
  85.     ex    af,af'
  86.     exx
  87.     ex    (sp),hl
  88.     ex    (sp),ix
  89.     ex    (sp),iy
  90.     ldi
  91.     ldir
  92.     ldd
  93.     lddr
  94.     cpi
  95.     cpir
  96.     cpd
  97.     cpdr
  98.     add    a
  99.     add    0ffh
  100.     add    (hl)
  101.     add    (ix+5)
  102.     add    (iy+6)
  103.     adc    a
  104.     sub    a
  105.     sbc    a
  106.     and    a
  107.     or    a
  108.     xor    a
  109.     cp    a
  110.     inc    a
  111.     inc    (hl)
  112.     inc    (ix+3)
  113.     inc    (iy+5)
  114.     dec    (hl)
  115.     daa
  116.     cpl
  117.     neg
  118.     ccf
  119.     scf
  120.     nop
  121.     halt
  122.     di
  123.     ei
  124.     im0
  125.     im1
  126.     im2
  127.     add    hl,bc
  128.     adc    hl,de
  129.     sbc    hl,de
  130.     add    ix,bc
  131.     add    iy,de
  132.     inc    ix
  133.     inc    iy
  134.     dec    ix
  135.     dec    iy
  136.     rlca
  137.     rla
  138.     rrca
  139.     rra
  140.     rlc    b
  141.     rlc    (hl)
  142.     rlc    (ix+5)
  143.     rlc    (iy+4)
  144.     rl    b
  145.     rrc    b
  146.     rr    b
  147.     sla    b
  148.     sra    b
  149.     srl    b
  150.     rld
  151.     rrd
  152.     bit    5,e
  153.     bit    5,(hl)
  154.     bit    5,(ix+5)
  155.     bit    5,(iy+4)
  156.     set    4,b
  157.     set    4,(hl)
  158.     set    4,(ix+5)
  159.     set    4,(iy+4)
  160.     res    4,e
  161.     res    4,(hl)
  162.     jp    label1
  163.     jp    nz,label1
  164.     jp    c,label1
  165.     jr    +6
  166.     jr    c,5
  167.     jr    nc,5
  168.     jr    z,5
  169.     jr    nz,5
  170.     jp    (hl)
  171.     jp    (ix)
  172.     jp    (iy)
  173.     djnz    5
  174.     call    label1
  175.     call    nz,label1
  176.     ret
  177.     ret    nz
  178.     reti
  179.     retn
  180.     rst    38h
  181.     in    a,(03h)
  182.     in    b,(c)
  183.     ini
  184.     inir
  185.     ind
  186.     indr
  187.     out    (034h),a
  188.     out    (c),e
  189.     outi
  190.     otir
  191.     outd
  192.     otdr
  193. ;
  194.     end    $
  195.