davervw / ch64edit

C64 Character Set Editor
https://techwithdave.davevw.com/2024/04/edit-vic-20-programmable-characters.html
MIT License
3 stars 0 forks source link

Syntax error in 10 when exit program #6

Closed davervw closed 5 months ago

davervw commented 5 months ago

image

start of basic is where fonts are loaded. The initial SYS command is overwritten by ROM font at initial startup. Exiting the program now shows syntax error because the BASIC interpreter is trying to interpret font image data as tokenized BASIC statements.

Very slight risk of having valid instructions there, would have to maliciously load font file with BASIC statements at the beginning of the font. But usually this is just an inconvenience.

Ideal fix would be to move BASIC next token pointer to a place that interprets the end of program (zero bytes) probably by adding $1000 to where a copy of the SYS command has been implemented for restarting the program at the new start of BASIC RAM.