Stefan Posted June 26, 2021 Share Posted June 26, 2021 Hello everyone! The last week I've been working on a program that loads a BASIC program from a text file. After some (or a lot of) fiddling I finally got it to work. Some notes on the source file format: There are no line numbers in the source file Instead you define labels on lines you want to jump to with GOTO or GOSUB Labels must be defined at the start of a line, but it's OK to have leading blank spaces A label must start with one of the letters A-Z. The following characters may be A-Z or numbers 0-9 The symbol table stores the first 12 letters of a label Line breaks are marked by a single LF or CR The work flow: You edit the source file on the X16 using X16Edit or any other available editor Store the source file on the SDCARD Load the BASIC loader program, and run it Enter the source file name Type RUN to run the loaded BASIC program Enclosed is a video showing this work flow. I need to do some more work on this before publishing. basload.mov 1 Quote Link to comment Share on other sites More sharing options...
Scott Robison Posted June 26, 2021 Share Posted June 26, 2021 Seems very similar to my BASIC Preprocessor project. 1 Quote Link to comment Share on other sites More sharing options...
Stefan Posted June 26, 2021 Author Share Posted June 26, 2021 (edited) True. I forgot that you had made that program. I must look at your solution again. There are some differences as far as I can tell: Source format is different My program does not support long variable names My program outputs BASIC code directly to RAM Edited June 26, 2021 by Stefan Quote Link to comment Share on other sites More sharing options...
Scott Robison Posted June 26, 2021 Share Posted June 26, 2021 Right. I understand it's not identical, just similar. That's no reason *not* to do it though. Just commenting. Quote Link to comment Share on other sites More sharing options...
Stefan Posted July 10, 2021 Author Share Posted July 10, 2021 I did now publish a first version of my loader. You find it here: https://www.commanderx16.com/forum/index.php?/files/file/192-load-basic-programs-from-text-files/ Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.