Loading a typical CO file: Difference between revisions
(New page: == Overview == If you've ever loaded and tried to run a CO program, you may have found that the laptop emits a beep sound and fails to launch the program. This is actually the Model T al...) |
No edit summary |
||
Line 46: | Line 46: | ||
Use the widebar to cursor to select the CO program you just cleared space for, and it should launch. If you made a mistake, it will beep. If this happens, try walking through these steps again. | Use the widebar to cursor to select the CO program you just cleared space for, and it should launch. If you made a mistake, it will beep. If this happens, try walking through these steps again. | ||
[[Category:Model T Developer Reference]] |
Revision as of 16:49, 7 August 2011
Overview
If you've ever loaded and tried to run a CO program, you may have found that the laptop emits a beep sound and fails to launch the program.
This is actually the Model T alerting you to the fact that you are making an error. Model T CO files are machine language programs designed to run at a fixed location in memory.
A .CO file that you see on the main menu is just a file. It cannot run from the place it sits in in RAM, because all the jumps and calls and loads and stores are within the range that it is assembled (or "ORGed") to run at.
To run the program, BASIC copies it to whatever "start" address it was designed to run at. Unless you tell your laptop otherwise, however, it reserves all memory to the filesystem, the BASIC interpreter and the stack. When BASIC beeps, it is telling you that the space the program you selected needs to run it is currently reserved for other purposes.
So, before you can execute such a program you need to reserve memory for it at the place it is assembled to run at.
This article documents the common procedure for reserving this memory.
Determining the START Address
From the main menu, hit the SPACE bar until the wide bar cursor highlights BASIC.
Hit ENTER.
At the BASIC prompt type
LOADM”FOO”
But replace FOO with the name of your CO file. If you don't remember what it is, first type FILES to get a list.
Your screen will display
- The Start address
- The End address
- The Execution address
Reserving RAM To Run Your Program
Now, with the Start address in hand type
CLEAR 0,ADDRESS
But replace ADDRESS with the number BASIC printed out for the Start address.
Press F8 to return to the main menu.
Use the widebar to cursor to select the CO program you just cleared space for, and it should launch. If you made a mistake, it will beep. If this happens, try walking through these steps again.