PLUS4-BASIC-LINES-TO-START-ASSEMBLY-PROGRAM --------------------------------------------------------------------------------------------------- TOOL: BASIC 3.5 and TURBO-ASSEMBLER-MACRO and built-in ML-Monitor Language: BASIC and Assembly Extra: none Author: Misel Zivanovic Note: (C) 11th AUGUST 2026 - www.lived.ch, mzretro.ch --------------------------------------------------------------------------------------------------- Now we will "QUICKLY" add BASIC lines to our assembly code to make the well known BASIC starter lines to start our assembly code! FIRST STEP: We write 2 BASIC lines in BASIC and check the content of the memory area in Machine-Language Monitor. BASIC default start address is $1000, dec 4096. This is where we have to list the content in ML Monitor. 100 rem welcome to the show 110 sys 4150:rem mzretro.ch We start the MONITOR and list the memory with the command m 1000 1038 It will then look like this {listing and memory addresses below}: Important are three zero's behind ch @ the memory address >1030 43 48 00 00 00 ff 00 00 :ch...?. 30 31 32 33 34 35 36 This means how our assembler code can start @ $1035, dec 4149, but this is a dumb looking address and we will start at $1036, dec 4150 therefore! You could go up to 4155 if you want. Just don't forget the update the BASIC lines and then list the memory area in ML-Monitor to have the correct data {bytes} Sure: 100 SYS 4115 would go too, but there is no fun in that, right, hehe... But you need to do this just once and can then re-use it for all the following projects. So take your time and make it look fancy! --------------------------------------------------------------------------------------------------- list 100 rem welcome to the show 110 sys 4150:rem mzretro.ch ready. moN monitor pc sr ac xr yr sp ; ffff 00 ff 00 00 f8 m 1000 1038 >1000 00 1b 10 64 00 8f 20 57 :...D.. w >1008 45 4c 43 4f 4d 45 20 54 :elcome t >1010 4f 20 54 48 45 20 53 48 :o the sh >1018 4f 57 00 33 10 6e 00 9e :ow.3.N.. >1020 20 34 31 35 30 3a 8f 20 : 4150:. >1028 4d 5a 52 45 54 52 4f 2e :mzretro. >1030 43 48 00 00 00 ff 00 00 :ch...?.. >1038 00 00 ff ff ff ff 00 00 :..????.. --------------------------------------------------------------------------------------------------- SECOND STEP: Now that we know that this is what we need... --------------------------------------------- >1000 00 1b 10 64 00 8f 20 57 :...D.. w >1008 45 4c 43 4f 4d 45 20 54 :elcome t >1010 4f 20 54 48 45 20 53 48 :o the sh >1018 4f 57 00 33 10 6e 00 9e :ow.3.N.. >1020 20 34 31 35 30 3a 8f 20 : 4150:. >1028 4d 5a 52 45 54 52 4f 2e :mzretro. >1030 43 48 00 00 00 -------------------------------------------- We can make it TURBO-ASSEMBLER-MACRO compatible and as you can see, you don't even need any of the assembler commands. It's enough to plant the bytes to where they belong or must be! NOTICE the 6 BYTES LIMIT PER .BYTE LINE! TURBO-ASSEMBLER-MACRO cannot take more! Keep in mind! If you are using VICE Emulation, then just copy/paste these lines to your Commodore Plus4 window {start the TURBO-ASSEMBLER-MACRO before, of course} *= $1000 .byte $00,$1b,$10,$64,$00,$8f .byte $20,$57,$45,$4c,$43,$4f .byte $4d,$45,$20,$54,$4f,$20 .byte $54,$48,$45,$20,$53,$48 .byte $4f,$57,$00,$33,$10,$6e .byte $00,$9e,$20,$34,$31,$35 .byte $30,$3a,$8f,$20,$4d,$5a .byte $52,$45,$54,$52,$4f,$2e .byte $43,$48,$00,$00,$00 *= $1036 inc $ff19 rts --------------------------------------------------------------------------------------------------- That is all you need to do... Check also the screenshots! ---------------------------------------------------------------------------------------------------