PLUS4-MULTICOLOR-CHARS-UPDATE -------------------------------------------------------------------------------------------------- TOOL: MERLIN 7501 ASSEMBLER {Commodore PLUS4} Language: Assembly Extra: none Author: Misel Zivanovic Note: (C) 30. JULY 2026 - www.lived.ch, mzretro.ch EXTRA: UPDATED VERSION --------------------------------------------------------------------------------------------------- MULTICOLOR CHARACTERS WITH COMMODORE PLUS4 - Extra graphic and symbols added --------------------------------------------------------------------------------------------------- WARNING: before you copy/paste this source code into the emulation, start these commands first! {you can also copy/paste it and hit enter}. It moves the source code from $2100 to $6000 poke 43,1:poke44,96: poke 24576,0:new Now you can start typing, copy/paste or load this code from the floppy disk! --------------------------------------------------------------------------------------------------- Placing the cursor to left upper corner and press "SHIFT + Q", will exit this assembler IRQ routine No need to reset the computer! --------------------------------------------------------------------------------------------------- 10 com $2100 11 list 12 lda .stat 13 cmp #55 14 beq .nomore 15 bne .runit 16 .nomore 17 rts 18 .runit 19 lda #55 20 sta .stat 100 ;assembler merlin 7501 103 ;c= plus 4 - mzretro.ch 104 ;custom characters 106 ;start with sys 8448 100 ; 110 lda #$00 111 sta $03 112 sta $05 113 lda #$38 114 sta $04 115 lda #$d0 116 sta $06 117 ldy #$00 118 .loop1 119 lda ($05),y 120 sta ($03),y 122 iny 123 bne .loop1 124 inc $04 125 inc $06 126 lda #$d8 127 cmp $06 128 bne .loop1 129 lda $ff12 ;read status 130 and #251 ;switch 131 sta $ff12 ;ram characters 132 lda $ff13 ;set 133 and #3 134 ora #56 ;location 135 sta $ff13 ;$3800 136 ; 137 ldx #$00 ;custom chars 138 .chr 139 lda .mcchars,x 140 sta $3808,x ;no @ 141 inx 142 cpx #208 ;26 characters 143 bne .chr ;numbers for now 144 ldx #$00 ;custom symbols-gfx 145 .symb 146 lda .gfx,x 147 sta $38d8,x 148 inx 149 cpx #168 ;21 characters 150 bne .symb ;no numbers for now 151 ldx #$00 ;custom numbers 152 .nxround 153 lda .numblock,x 154 sta $3980,x 155 inx 156 cpx #80 ;10 (0-9) 157 bne .nxround 158 lda #$93 ;screen clr 159 jsr $ffd2 160 ldx #$00 ;add some chars 161 .cloop 162 lda #3 ;and colors 163 sta $0800,x 164 inx 165 cpx #$80 166 bne .cloop 167 lda #17 ;color 00, screen color 168 sta $ff15 169 lda #17 ;border color 170 sta $ff19 171 lda #153 172 jsr $ffd2 173 sei 174 lda #$9b ;when code is added 175 sta $0314 ;check the low and 176 lda #$21 ;high byte address! 177 sta $0315 ;for the irq start 178 ldy #$00 ; 179 sty $0be8 ;main delay 180 cli 181 rts 182 ; 183 lda #100 ;color 01 multicolor 1 184 sta $ff16 185 lda #93 ;color 11 multicolor 2 186 sta $ff17 187 lda $ff07 ;multicolor on 188 ora #16 189 sta $ff07 190 ldy $0be8 ;< irq start address 191 iny ; low high byte 192 sty $0be8 193 ldy $0be8 194 cpy #$10 ;keep y > 1! 195 beq .mychars 196 ;---------- 197 lda $0c00 ;press shift+q 198 cmp #81 ;to exit the 199 beq .out ;interrupt mode! 201 .exit ;where: 202 jmp $ce0e ;left upper corner! 203 ; ;in capitol char mode 250 .out ;exit to basic, no irq 251 lda $ff12 ;read status 252 ora #4 ;set characters 253 sta $ff12 ;back to 254 lda $ff13 ;original 255 and #3 ;rom 256 ora #$d0 ;source 257 sta $ff13 ;$d000-53248 258 lda #$00 259 sta .stat 260 lda $ff07 ;no multicolor 261 and #239 262 sta $ff07 263 sei ;safe exit 264 lda #14 ;no reset needed! 265 sta $0314 266 lda #206 267 sta $0315 268 cli 269 pla 270 tay 271 pla 272 tax 273 pla 274 rti 275 rts 280 ; 400 .mychars 401 ldy #$00 ;reset main delay 402 sty $0be8 ; 403 jmp .exit ;!mandatory! 404 ; 405 ;2nd run yes/no 406 .stat 407 *da $00 408 ; 450 .mcchars 451 ;@ unused 452 ;mc character definitions 453 ; a,b,c,d,e,f 454 *da $a0,$88,$cc,$fc,$44,$44,$44,$00 455 *da $a0,$88,$cc,$f0,$44,$44,$54,$00 456 *da $a8,$88,$c0,$c0,$40,$44,$54,$00 457 *da $a0,$88,$cc,$cc,$44,$44,$54,$00 458 *da $a8,$88,$c0,$f0,$40,$44,$54,$00 459 *da $a8,$88,$c0,$f0,$40,$40,$40,$00 470 ; g,h,i,j,k,l 471 *da $a0,$88,$c0,$cc,$44,$44,$54,$00 472 *da $88,$88,$cc,$fc,$44,$44,$44,$00 473 *da $20,$20,$30,$30,$10,$10,$10,$00 474 *da $08,$08,$0c,$0c,$04,$44,$54,$00 475 *da $88,$88,$cc,$f0,$44,$44,$44,$00 476 *da $80,$80,$c0,$c0,$40,$44,$54,$00 480 ; m,n,o,p,q,r 481 *da $88,$88,$ec,$fc,$44,$44,$44,$00 482 *da $88,$88,$cc,$ec,$48,$44,$44,$00 483 *da $a8,$88,$cc,$cc,$44,$44,$54,$00 484 *da $a0,$88,$cc,$fc,$40,$40,$40,$00 485 *da $a0,$88,$cc,$cc,$44,$64,$58,$00 486 *da $a0,$88,$cc,$fc,$50,$44,$44,$00 490 ; s,t,u,v,w,x,y,z 491 *da $a8,$88,$c0,$fc,$04,$44,$54,$00 492 *da $a8,$a8,$30,$30,$10,$10,$10,$00 493 *da $88,$88,$cc,$cc,$44,$44,$54,$00 494 *da $88,$88,$cc,$cc,$44,$50,$40,$00 495 *da $88,$88,$cc,$cc,$44,$54,$44,$00 496 *da $88,$88,$cc,$30,$54,$44,$44,$00 497 *da $88,$88,$cc,$fc,$10,$10,$10,$00 498 *da $a8,$08,$30,$30,$40,$40,$54,$00 500 .gfx 501 ; [, pound, ], arr. up, <-, space 502 *da $a0,$80,$c0,$c0,$40,$40,$50,$00 503 *da $28,$96,$9a,$df,$df,$d7,$3c,$00 504 *da $0a,$02,$03,$03,$01,$01,$05,$00 505 *da $77,$dd,$77,$dd,$77,$dd,$77,$dd 506 *da $88,$88,$22,$22,$88,$88,$22,$22 507 *da $00,$00,$00,$00,$00,$00,$00,$00 550 ; !,",#,$,%,& 551 *da $20,$20,$30,$30,$10,$00,$10,$00 552 *da $88,$88,$cc,$00,$00,$00,$00,$00 553 *da $87,$93,$87,$93,$c6,$d2,$c6,$d2 554 *da $55,$69,$75,$75,$75,$55,$74,$55 555 *da $55,$1d,$55,$5d,$5d,$5d,$69,$55 556 *da $14,$55,$55,$55,$55,$55,$55,$14 600 ; '()*+, 601 *da $08,$0c,$10,$10,$00,$00,$00,$00 602 *da $08,$20,$30,$30,$10,$10,$04,$00 603 *da $20,$08,$0c,$0c,$04,$04,$10,$00 604 *da $80,$80,$f0,$f0,$50,$54,$54,$55 605 *da $02,$02,$0f,$0f,$05,$15,$15,$55 606 *da $38,$97,$d6,$97,$d6,$97,$d6,$2c 607 ; - . / 608 *da $00,$00,$00,$b4,$00,$00,$00,$00 609 *da $00,$00,$00,$00,$00,$30,$10,$00 610 *da $54,$1c,$35,$54,$1c,$35,$54,$1c 650 .numblock 651 ; 0,1,2,3,4,5,6,7,8,9 652 *da $28,$88,$cc,$cc,$44,$44,$50,$00 653 *da $08,$28,$0c,$0c,$04,$04,$04,$00 654 *da $a8,$88,$0c,$30,$40,$44,$54,$00 655 *da $a0,$88,$0c,$30,$04,$44,$50,$00 656 *da $80,$88,$cc,$fc,$04,$04,$04,$00 657 *da $a8,$80,$c0,$fc,$04,$44,$50,$00 658 *da $28,$88,$c0,$fc,$44,$44,$50,$00 659 *da $a8,$88,$0c,$30,$10,$10,$10,$00 660 *da $28,$88,$cc,$30,$44,$44,$50,$00 661 *da $28,$88,$cc,$fc,$04,$44,$50,$00 662 ; done! 700 end