1

In the magazine 64er from June 1990 a BASIC extension for running Commodore Basic V3.5 on the C64 was presented. The extension is available at csdb. However, to run a BASIC 3.5 program, it is necessary to load the extension, start it, and then load the BASIC program and start it. How can I link a BASIC program with the BASIC 3.5 extension for C64 so that I get a standalone program?

7

Simple way:

  1. Load the BASIC 3.5 extension and RUN it.
  2. Load your BASIC program.
  3. Use a cartridge freezer to create a snapshot of the memory that can be re-loaded on cold boot.

There are many cartridge freezers, such as Super Snapshot, that can create a single loadable file for any program that resides fully in memory.

Harder way:

A quick disassembly of the BASIC 3.5 extension you linked shows that it has a small bootstrap that copies the extension to RAM under BASIC ($A000) and to $C000. It then starts in interactive mode by jumping to $C000. So, to "link it to your BASIC program", you just need to insert some additional code after this initialization and before BASIC enters interactive mode. In this additional code, you need to copy your tokenized BASIC code (obtained by SAVE'ing it from BASIC 3.5) to $1001, which is where a BASIC 3.5 program is stored. You'd have to insert this as the final step before control returns to the user. This way, once you reach the BASIC prompt, your program is ready to RUN (or LIST, or modify).

Doing this will require some proficiency with 6502 assembly language, plus the ability to use a disassembler, editor, and assembler to create your "linked" executable.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.