Memory

Viewing Memory

There are two mini-memory areas on the info panel.  You can view memory in Hex, (normal 7-Bit) ASCII, or Apple (8-Bit) TEXT format.

Control characters are shown in yellow.  The Apple uses something called 8-Bit (High-Bit) ASCII, in which the first 128 characters (normal ASCII) are also mapped onto the last 128 characters, but with a different background.  (Technically, the first 64 characters are drawn inverse, the next 64 characters flashing, and the last 128 normally.)  Some programs will store text in this extended Apple format, where a High-Bit character can be used as a flag to represent an end of word.

Here is a summary:


Command

Effect

M1 ####

View mini-memory 1 in Hex at the Address

M2 ####

View mini-memory 2 in Hex at the Address

MA1 ####

View mini-memory 1 in ASCII at the Address

MA2 ####

View mini-memory 2 in ASCII at the Address

MT1 ####

View mini-memory 1 in “Apple Text” at the Address

MT2 ####

View mini-memory 1 in “Apple Text” at the Address

D ####

Alias for M1

Examples:

Input

Effect

MA1 D0D0

View Applesoft Tokens (Low ASCII cyan, High ASCII white)

MT2 FF0A

View Apple message displayed when booted, showing Apple Model.

DATA

Switch to the Data Window to view memory. Most scrolling keys work.

CODE

Switch to the Code Window to view the disassembler.


Zero-page Watches

Add a zero-page watch at the indirect address (nn).

Command

Effect

ZPA (or ZP) nn

Add/Update address to next zero page pointer

ZPA (or ZP) # nn

Add/Update address to specific zero page pointer

ZPC #

Clear (remove) zero page pointer

ZPD #

Disable zero page pointer - it is still in the list, just not active

ZPE #

(Re)Enable disabled zero page pointer

ZPL

List all zero page pointers


Memory Watches

Add a 16-bit memory watch at the 16-bit address nnnn.
NB. For 'WA # v': specifying 'v' instead of an address will watch the video scanner.

Command

Effect

WA (or W) nnnn|symbol

Add/Update address or symbol to next watch

WA (or W) # nnnn|symbol|v

Add/Update address or symbol to specific watch

WC #

Clear (remove) watch

WD #

Disable specific watch - it is still in the list, just not active

WE #

(Re)Enable disabled watch

WL

List all watches


Searching Memory

You can search memory for hex values.  Wildcard support is also supported via the '?' wildcard operator, including nibble searching.   A single '?' by itself, means match one byte of any value.  A hex value with the high nibble or low nibble of '?' will mask off the corresponding nibble.   (At the moment there is no way to refer to the list of results.   A future version will support _# to reference search result's addresses.)

Searching memory for text is forthcoming in a future version of the debugger.


Command

Effect

SH #,len byte1 …

Search memory for 8-bit hex value(s).

SH #,len word1 …

Search memory for 16-bit value(s).


Examples:

Input

Effect

SH 800,8000 C030

Search memory for speaker access.

SH 800,8000 AD ? C0

Search memory for “ LDA $C0xx”.

SH 800,8000 3? C0

Search memory for speaker access $C03x.

SH 800,8000 ?1 C0

Search memory for soft-switch $C0x1.

L _1

Disassemble from search result #1 address.

Note: Not yet implemented!


Changing Memory

To change the Apple's memory, the classic "Apple Monitor" command to enter memory is recognized, as well as the "normal" debugger comamnd.


Command

Effect

####:byte1 …

Classic "Apple Monitor" command to enter byte(s).  Alias for E.

E addr byte1 …

Set memory to the 8-Bit (byte) value(s).

EB symbol ####

Alias for E.

E8 symbol ####

Alias for E.

EW symbol ####

Set memory (at the symbol Address) to the 16-Bit (word) Value(s).

E16 symbol ####

Alias for EW.

NOP

Writes an “NOP” opcode (EA) at the current Program Counter (PC)

ZAP

Alias for NOP.


Examples:

Input

Effect

300:60

Same as Applesoft Poke 768,96