Search   
Home  Print View  

 

Operation

Branch Content

Running a Program

You must know the initial address of the program you want to run. It can reside either in EPROM, RAM, private or shared memory. For starting the program, key its initial address in the Entry Switches and press the LD button so you see that address in the Address Display and the first byte of the program in the Data Display. Then press the START button.

Pressing the START button causes the Console to assert a Non Maskable Interrupt (NMI) request to the microprocessor. The short interrupt routine reads the given address into the Program Counter (PC) so execution starts immediately at that address. The computer has entered Run mode.

You can stop the program at any time by pressing the HLT button. This causes the computer to enter Halt mode. No memory nor I/O content gets changed: the computer has simply frozen at this point.

Stopping a program this way is useful for debugging. Once the computer is halted you can use the Console to examine or even change memory or I/O content in order to repair data corruption or program miscoding.

For resuming execution press the CONT button. This will cause the program to continue from exactly the same point in which it was stopped independently of current Display reading or Entry Switches positions.

For restarting execution from a different given point, proceed as you did when started the program, that is, key the desired address, press LD, then START.

A program may terminate with a Halt instruction. This will cause the computer to freeze but not to enter Halt mode. This condition is called "soft halt" and is indicated by the "END" Lamp. In order to escape from soft halt you can either restart the program by pressing the START button or to reset the computer by pressing the RESET button. Production programs are not expected to terminate this way but it might be useful for testing purposes (kind of break point).

LC-81 Homebrew Minicomputer -- this software is based on Help Books running at melissa