home *** CD-ROM | disk | FTP | other *** search
- ;Alain BROBECKER (aka baah/Arm's Tech), 08sep1997
- ;A stupid example showing some features of asm6502
- #name TestAsm0X ;Name to save to
- #list ;See what happens
- #base 0 ;Start assembly at 0
- ;Easy to use and very usefull is the incbin facility
- #incbin c64charsX
- ;Then copy 10 times the &55 byte
- #dsb 10,&55
- ;With #set,#rept,#endr,#b etc... you are able to create data tables
- #set N = 0
- #rept 7
- #b N,N+16
- #set N N+1
- #endr
- ;Make sure next instruction is aligned on a multiple of 32
- ;(ie adressAND31=0), until this fill with &ff
- #align 31,&ff
- ;All adressing modes are supported of course!
- asl
- asl a ;is equivalent to the previous one
- lda #16
- lda z,1
- lda z,1,x
- ldx z,1,y
- lda &0800
- lda &0800,x
- lda &0800,y
- bcc label
- bcc +9 ;will jump to label too...
- adc (&10,x)
- adc (&10),y
- jmp (&0010)
- .label
- ;all instructions in a comment are ignored even after a :: asl
-