PLUS4-INVERSE-IT-AGAIN-IN-COLOR-SHORT-VERSION -------------------------------------------------------------------------------------------------- TOOL: MERLIN 7501 ASSEMBLER {Commodore PLUS4} Language: Assembler Extra: none Author: Misel Zivanovic Note: (C) 10th of August 2026 - www.lived.ch, mzretro.ch --------------------------------------------------------------------------------------------------- This is the same as the first example! Only difference is that i am re-using a delay routine which is now a subroutine and not a part of the main program flow. It called with JSR therefore! 100 com $3000 110 list 120 ldx #$00 130 .loop 140 lda $0c00,x 150 cmp #$20 160 beq .j1st 170 lda #$20 180 sta $0c00,x 190 .ret1 200 lda $0cf0,x 205 cmp #$20 210 beq .j2nd 215 lda #$20 220 sta $0cf0,x 225 .next 230 inx 235 cpx #$f0 240 bne .loop 245 rts 300 ;------------------------ 305 .j1st 310 lda #$a0 ;rvs space 320 sta $0c00,x 330 ;------------------------ 335 jsr .delays 435 ;------------------------ 440 lda $a5 ;get low byte 450 and #$0f ;timer to handle 460 adc #76 ;random colors 470 sta $0800,x 480 jmp .ret1 600 ;------------------------ 610 .j2nd 620 lda #$a0 ;rvs space 630 sta $0cf0,x 640 ;------------------------ 645 jsr .delays 650 ;------------------------ 760 lda $a5 ;get low byte 770 and #$0f ;timer to handle 780 adc #32 ;random colors 790 sta $08f0,x 800 jmp .next 810 ;------------------------ 830 .delays 840 ldy #$00 ;delay loops 850 .wait3 860 iny 870 cpy #$e0 ;delay time 880 bne .wait3 890 ldy #$00 900 .wait4 910 iny 920 cpy #$e0 930 bne .wait4 935 rts 950 end ---------------------------------------------------------------------------------------------------