Introduction to The Meaning of TRON
When some of us think of The Meaning of TRON, we think of a movie with cartoon-like motorcycles. For others, we think of TRON as being part of the name of a machine with lots of gadgets from an old black and white SciFi movie. In reality, though, TRON was part of the BASIC programming language. TRON means “Trace On”. This was a debugging tool. The TRON command simply prints the program line numbers as the program runs. This is especially helpful if the programmer is jumping around in the program a lot with GOTO statements. Also, later on there was an operating system called TRON. This was The Real-time Operating system Nucleus, which is an event-driven system based on task priorities.
The command is now obsolete. We have other debugging tools now. In this post, however, I’ll demonstrate how the TRON command worked. Basically, TRON turned on the trace. Likewise TROFF shut off the trace.
To demonstrate, I’ll bring up Altair 8800 Hard Disk BASIC.
Booting to BASIC
Although many early versions of BASIC have the TRON feature, I’m using the AltairDuino computer for this. In this reproduction, all of the disk images are on an SD Card. Another option for the Altair is at AltairClone.com. First, we need to mount a disk. BASIC is on hard disk #1, so we’ll turn on switch 0 (2 to the power of zero equals 1). Additionally, we need to turn on switches 12 and 13 to tell the computer that it’s a hard disk that we want to mount. Next, we’ll press AUX -2 Down to mount the BASIC Disk.
Now we must initiate the bootloader to boot to the hard disk. With all other switches down, turn on switches 3, 2, and 1. This tells the Altair that we want to run the Hard Disk Boot Loader. Finally, press AUX 1 down to boot to BASIC.
Simply hit enter on the memory size. We’ll set the number of files to 4, and the highest disk number is 0. Additionally, enter the date.
Loading a Program
First, we type MOUNT to mount the disk image to BASIC. Then type FILES to see the files on the hard drive.
Type NEW to clear out any old program. At this time, I’m going to load a program called “SALARY”. To do this, simply type LOAD “SALARY” (with quotes). Now, type LIST to see the program code. Basically, this program will ask for an initial year, salary, and percent increase per year, and give you the results of what you will be making.
Before we run the program, simply type TRON. This will turn on the Trace. At this point, we’ll type RUN to run the program.
As you can see, the line numbers print to the display as you run the logic. That way, you can see exactly which lines of code the processor is on as the program runs.
In contrast, let’s shut off the trace, and run the program again. As you can see, the program line numbers no longer appear in the user program.
This is what the user would see as the program executes. As you can see, I used the dates and salaries from a time when the TRON command was more popular! In 1975, the average salary was about $13,720. Due to inflation, during that time period, however, the increase per year was likely much higher than 3%. We were very fortunate to elect Ronald Reagan as president!
Summary of The Meaning of TRON
In short, you only run TRON when debugging a program. TRON will help your debugging process by showing you which line of code to look at if we have an error. Although I consider this to be a handy debugging tool, it’s no longer included in modern versions of basic, such as VBA, VB.NET, or Visual Basic.
For other vintage posts, check out the vintage computer category!
— Ricky Bryce