Basic Program Viewer
by Graham Crow

This program allows Basic program files to be examined under the Wimp. When run, this program adds an icon to the icon bar. Clicking Menu over this icon displays a menu containing the usual Info and Quit options.

Dragging a Basic program file to the icon bar icon loads the file and opens two windows, the viewer window and the options window. The viewer window displays the loaded file. If closed, it can be reopened by clicking Select on the icon bar icon. Closing the viewer window results in the options window also being closed.

The options window contains a number of icons which control the display in the viewer window. If the options window is closed, it can be reopened by clicking Select over the viewer window. The icons in the options window operate as follows:

Dump and Decoded toggle the display format between Dump, in which the file is displayed in much the same way as with the *Dump command, and Decoded, in which each line displays one byte as an address in hex and decimal, an ASCII code in hex, decimal and binary, and either as a character, part of a line number/line length block, part of a line number (with GOTO etc.), or a Basic keyword. If the Dump option is selected, the number in the writeable icon next to the Dump icon determines the number of bytes displayed on each line.

Addr and Line toggle the way that the view position is determined. If Addr is selected, selecting OK will result in the address in the writeable icon next to the Addr icon being used. The corresponding line number is written to the writeable icon next to the Line icon. Likewise, if Line is selected, selecting OK will result in the line number in the writeable icon next to the Line icon being used. The corresponding address is written to the writeable icon next to the Addr icon. The permissible values for the address and line number are displayed next to the writeable icons.

Entering a hex number into the writeable icon entitled Page results in the addresses displayed in the viewer window starting at the given address, the default being &8F00.

Note that values entered into writeable icons do not take effect until either Return is pressed while the caret is in one of the writeable icons, or one of the icons Dump, Decoded or OK is selected.

The four action icons Line-, Line+, Start and End change the portion of the file which is displayed in the viewer window. Line- and Line+ scroll the window by one program line. Start and End scroll to the start and end of the program.

Clicking select over the Print icon starts printing the file. The file is printed in the same format as it is displayed in the viewer window. Clicking select over the Stop icon stops printing. Pressing the Print key while the caret is in the options window has the same effect as clicking select over the Print icon.
