PLUS4-CUSTOM-CHARACTERS -------------------------------------------------------------------------------------------------- TOOL: MERLIN 7501 ASSEMBLER {Commodore PLUS4} Language: Assembler Extra: none Author: Misel Zivanovic Note: (C) 27th JULY 2026 - www.lived.ch, mzretro.ch --------------------------------------------------------------------------------------------------- This is my 2nd program for the Commodore Plus4. It is creating a custom character set, which is running in the background {IRQ} It's just the alphabet {the same i made for the ATARI earlier}, but I will extend it in the future to also include numbers etc. Don't let this stop you from making your own character set! HOW TO USE IT /PROCEED: ----------------------- 1st START the MERLIN 7501 ASSEMBLER from the disk! 2nd MOVE THE SOURCE CODE START ADDRESS TO: $5000 with this command in direct mode {no line number}: ------------------------------------- poke 43,1:poke44,80: poke 20480,0:new ------------------------------------- This will let the default $2100 source code address free for the assembly code and that is why the start address can be $2100 {com $2100} Additional info: ---------------- When you save the source code and load it the next time, it will go again to the default address {$2100} that means that you need to move the start address every time when you assemble the code to $2100.That is including loading too. So first move the source code address, then load a file you need. --------------------------------------------------------------------------------------------------- Now back to regular business: Copy/paste this code below to VICE Plus4 Emulator and assemble it with the ASM command. It can be started with SYS 8448 and it is running as an interrupt. You can exit this custom characters at any time by placing the cursor to the LEFT UPPER CORNER and then press there on SHIFT + Q to exit. 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 .more 139 lda .chars,x 140 sta $3808,x ;no @ 141 inx 142 cpx #208 ;26 characters 143 bne .more ; 150 sei 151 lda #$61 ;when code is added 152 sta $0314 ;check the low and 153 lda #$21 ;high byte address! 154 sta $0315 ;for the irq start 161 ldy #$00 ; 162 sty $0be8 ;main delay 167 cli 168 rts 169 ; 170 ldy $0be8 ;< irq start address 171 iny ; low high byte 172 sty $0be8 173 ldy $0be8 174 cpy #$10 ;keep y > 1! 175 beq .mychars 176 ;---------- 177 lda $0c00 ;press shift+q 178 cmp #81 ;to exit the 189 beq .out ;interrupt mode! 190 .exit ;where: 191 jmp $ce0e ;left upper corner! 200 ; ;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 sei ;safe exit 261 lda #14 ;no reset needed! 262 sta $0314 263 lda #206 264 sta $0315 265 cli 266 pla 267 tay 268 pla 269 tax 270 pla 271 rti 272 rts 280 ; 300 .mychars 700 ldy #$00 ;reset main delay 701 sty $0be8 ; 702 jmp .exit ;!mandatory! 703 ; 704 ;2nd run yes/no 705 .stat 706 *da $00 707 ; 800 .chars 888 ;@ unused 901 ;255,129,129,129,129,129,255,0 900 ;a,b,c,d,e,f 901 *da 30,62,118,230,254,198,198,0 903 *da 240,248,220,254,198,198,252,0 904 *da 62,126,224,192,192,198,254,0 905 *da 248,252,206,198,198,198,254,0 906 *da 62,126,224,252,192,192,254,0 907 *da 62,126,192,252,192,192,192,0 908 ;g,h,i,j,k,l,m 909 *da 28,62,118,224,206,198,254,0 910 *da 54,118,230,198,254,198,198,0 911 *da 12,28,56,48,48,48,48,0 912 *da 6,14,28,24,24,88,120,0 913 *da 206,222,248,240,248,222,206,0 914 *da 48,112,224,192,192,192,252,0 915 *da 54,118,230,238,254,214,198,0 916 ;n,o,p,q,r,s,t 917 *da 54,118,230,246,254,222,206,0 918 *da 60,126,230,198,198,198,254,0 919 *da 252,254,198,198,254,192,192,0 920 *da 60,126,230,198,198,204,254,6 921 *da 252,254,198,198,254,220,206,0 922 *da 62,126,224,252,14,14,252,0 923 *da 254,254,48,48,112,96,96,0 924 ;u,v,w,x,y,z 925 *da 54,118,230,198,198,198,124,0 926 *da 100,230,198,198,110,124,56,0 927 *da 96,230,198,198,214,254,110,0 928 *da 102,230,198,124,108,198,198,0 929 *da 102,230,206,124,48,48,48,0 930 *da 254,206,24,48,48,96,254,0 931 ;chars done ---------------------------------------------------------------------------------------------------