Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Simply copy routine by Scan
- //
- // Copies every 16th byte from $1000-$2000 to $2000-
- // Uses the undocumented opcodes AXS and ISC
- // Reference: No More Secrets http://csdb.dk/release/?id=161035
- // Copy routine to zero page for less cycle consumption
- .const ENDPAGE = $20
- BasicUpstart2(main)
- main: ldy #$00
- ldx #$00
- .label xhi= *+2
- repeat: lda $1000,x
- .label yhi= *+2
- sta $2000,y
- txa
- axs #$f0 // X= A&X-#imm, adds #$10, carry is always clear before operation
- bcc !+ // carry set if overflow
- lda #ENDPAGE
- sec
- isc xhi
- beq done
- !: iny
- bne repeat
- inc yhi
- bcc repeat
- done: rts
- .pc = $1000
- .fill $1000,i
Add Comment
Please, Sign In to add comment