Jump to content

Load BASIC programs from text


Stefan
 Share

Recommended Posts

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.

  • Like 1
Link to comment
Share on other sites

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 by Stefan
Link to comment
Share on other sites

  • 2 weeks later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...

Important Information

Please review our Terms of Use