home *** CD-ROM | disk | FTP | other *** search
/ ARM Club 3 / TheARMClub_PDCD3.iso / programs / emulaton / asm6503 / examples / TestAsm0 < prev    next >
Text File  |  1998-08-25  |  1KB  |  36 lines

  1. ;Alain BROBECKER (aka baah/Arm's Tech), 08sep1997
  2. ;A stupid example showing some features of asm6502
  3.             #name       TestAsm0X   ;Name to save to
  4.             #list                   ;See what happens
  5.             #base 0                 ;Start assembly at 0
  6. ;Easy to use and very usefull is the incbin facility
  7. #incbin c64charsX
  8. ;Then copy 10 times the &55 byte
  9.   #dsb      10,&55
  10. ;With #set,#rept,#endr,#b etc... you are able to create data tables
  11. #set N = 0
  12. #rept 7
  13.   #b         N,N+16
  14. #set N N+1
  15. #endr
  16. ;Make sure next instruction is aligned on a multiple of 32
  17. ;(ie adressAND31=0), until this fill with &ff
  18. #align 31,&ff
  19. ;All adressing modes are supported of course!
  20.   asl
  21.   asl a                 ;is equivalent to the previous one
  22.   lda #16
  23.   lda z,1
  24.   lda z,1,x
  25.   ldx z,1,y
  26.   lda &0800
  27.   lda &0800,x
  28.   lda &0800,y
  29.   bcc label
  30.   bcc +9                ;will jump to label too...
  31.   adc (&10,x)
  32.   adc (&10),y
  33.   jmp (&0010)
  34. .label
  35. ;all instructions in a comment are ignored even after a :: asl
  36.