PLUS4-ANIMATION2-EXTENDED-IRQ --------------------------------------------------------------------------------------------------- TOOL: BASIC 3.5 / ML-Monitor {built-in - Commodore Plus/4} Language: BASIC Extra: none Author: Misel Zivanovic Note: (C) 17th AUGUST 2026 - www.lived.ch, mzretro.ch --------------------------------------------------------------------------------------------------- A classic loading routine {below as a BASIC Loader} --------------------------------------------------------------------------------------------------- . 0332 a9 01 lda #$01 . 0334 a2 08 ldx #$08 . 0336 a0 01 ldy #$01 . 0338 20 ba ff jsr $ffba . 033b a9 02 lda #$02 . 033d a2 4e ldx #$4e . 033f a0 03 ldy #$03 . 0341 20 bd ff jsr $ffbd . 0344 a9 00 lda #$00 . 0346 a2 00 ldx #$00 - low byte {poke 839,low }, load to this address . 0348 a0 38 ldy #$20 - high byte {poke 841,high}, example here $2000 . 034a 20 d5 ff jsr $ffd5 . 034d 60 rts . 034e 30 2a bmi $037a - 0* def. name {poke 846,[0-9], 0-gfx.bin is a valid name! . 0350 00 brk - use to stop 2nd load of this routine! line 100 --------------------------------------------------------------------------------------------------- IMPORTANT TO KNOW: --------------------------------------------------------------------------------------------------- DO NOT CHANGE THE ASTERISK {*} in the name structure of 2 characters! This will make it possible to load a file with the name "5-color-data.bin" or "7-sound.bin" m 34e 34e >034e 30 2a 00 00 00 00 00 00 :0*...... --------------------------------------------------------------------------------------------------- BASIC LOADER --------------------------------------------------------------------------------------------------- With this few lines, you can use your BASIC 3.5 a totally different way! No need to do 500 DATA lines, or write a BASIC routine to make a game level. Load .bin files, e.g. screens, color maps, sound data, custom characters directly from the floppy disk into the memory where you need your data! From BASIC, no assembly knowledge needed! Before you can load .bin files, you must saved them. Best way to do that is using the built-in ML-Monitor and make sure the name is correct. I think 10 files are okay, but with small change you can even have 99 files! Example: S"1-screen.gfx",8, 0c00, fe8 Keep in mind that you always must add +1 to the final address {which is here $0fe7+1 = $0fe8} This will save the whole screen! In the example below, the name is "1-sound.snd", but this will work too because the most important part is the first character {actually s number in our case} Of course, if on the disk there are 3 files, {e.g. 1-bike.gfx, 1-sound.snd, 1-screen.gfx}, then the first one will be loaded! LOAD BINARY FILES {BASIC LOADER} --------------------------------------------------------------------------------------------------- 100 if peek(848) = 150 then goto 150 110 for n=0 to 31:read d$:a=dec(d$) 130 poke 818+n,a:next:poke 848,150 150 : 160 rem to load a binary file called 170 rem 1-sound.snd, to $3800 180 rem type: 185 poke 839,00:poke 841,56 190 poke 846,49:sys 818 195 : 500 data a9,01,a2,08,a0,01,20,ba 510 data ff,a9,02,a2,4e,a0,03,20 520 data bd,ff,a9,00,a2,00,a0,38 530 data 20,d5,ff,60,30,2a,00,00 ---------------------------------------------------------------------------------------------------