macro LDIR,source,dest,count ;LoaD, Increment, Repeat lda #source sta $01 lda #dest sta $03 ldx count ldy #0 \@: ;this is a local label lda ($00),y ;load a byte from the source address sta ($02),y ;store in destination address iny ;increment dex bne \@ ;repeat until x=0 endm