Memory Viewer window

BASin

Memory Viewer window

The Memory Viewer window is available from the View menu and the System Variables window.

Memory Viewer window

Note: Editing the memory incorrectly can corrupt your BASIC program or cause the emulated Spectrum to crash.

The memory viewer is reminiscent of a file hex-editor, but operates on the memory of the emulated spectrum. It is primarily intended for close inspection/editing of various regions of memory, and to that end it supports instant location of those areas.

At the top of the window, you will notice that there is a drop-down list attached to an edit field. From the drop-down list, you can choose from any one of the System Variables, and the display area will move to the address pointed to by that SysVar. For example, you could choose the PROG system variable, and the display will show the start of the area of memory that contains your program. You can also choose from a list of any variables that are stored in the VARS area of memory, and inspect the structure of those. It may help to refer to Chapter 24 of the Sinclair BASIC Manual, which lists how variables and programs are stored in memory in much more detail. An interesting feature that you may use often is the program line locator - simply type in a line number followed by the statement number (in Line:Statement format, i.e. "10:1") and the display will move to that line's tokenised representation in memory.

Having chosen a region to jump to, you must click the "Go" button to the right of the edit field to actually move to that location.

You can also use the "Find" button to search memory for whatever string of characters you have typed into the edit field.

You can edit the memory by either typing in the hexadecimal codes into the left-hand pane of the window, or by typing in regular ASCII codes into the right-hand pane. All changed memory locations are coloured in dark red.

At the bottom of the window is a small status area, which shows the current address that you are examining, and the contents of that address in both byte and word format.