* = $c000 ; disintegratinator ; 32b intro 2024-10-26 ; by oxidisedbraincells ; run using SYS 49152 ; originally wanted this to increment all non-spaces 256 times ; but it would stop incrementing on every space so it just kinda deleted everything ; still that just makes it an even cooler effect though ; maybe i don't need to initialise these three to zero ;ldx #$00 ;ldy #$00 ; unused zeropage space $FB and $FC is used to store the address of screen RAM being written to ;stx $FB incrementingloop lda #$03 ; gets incremented to 4 on first run of increment256characters sta $FC incrementpage ; first increment the page of memory we're writing to inc $FC spacecheck lda ($FB),y cmp #32 ; space beq LOOPEND ; don't increment if character is space ;lda ($FB),y clc adc #1 sta ($FB),y ; unfortunately INC has no indirect addressing mode so we have to use this stuff LOOPEND iny bne spacecheck ; do this increment-or-skip process 256 times; a full page of memory lda $FC cmp #$07 ; if we've done page 07 already we've finished incrementing bne incrementpage inx bne incrementingloop ; do it 256 times; guarantees that the screen is cleared totally rts ; back to BASIC