Skip to content

Memory Editor

Chysn edited this page Jan 28, 2024 · 14 revisions

wAx offers three kinds of memory editors in addition to the Assembler: A hex editor that can update up to eight values per line, a text editor that can update up to sixteen characters per line, and a binary editor that can update one binary byte.

Hex Editor

To edit memory locations as hexadecimal values, use

.A addr :nn [nn] [nn] [nn] [nn] [nn] [nn] [nn]

where addr is a valid 16-bit hexadecimal address, and each nn is a valid 8-bit hexadecimal number. You may enter up to eight values on each line.

wAx will update the memory at the specified address. If the values were updated in direct mode, wAx will provide a prompt for the next address after the value list. You may enter additional values, or press RETURN. At each prompt, you may choose any type of editor.

Text Editor

To edit memory locations as a string, use

.A addr "string"

where addr is a valid 16-bit hexadecimal address, and string is a PETSCII string up to sixteen characters in length, between double quotes.

wAx will update the memory at the specified address. If the string was updated in direct mode, wAx will provide a prompt for the next address after the end of the string. You may enter additional values, or press RETURN. At each prompt, you may choose any type of editor.

About Quotation Marks

If you want to use quotation marks within text, you may do so. A quotation mark ends a string only when nothing follows the quotation mark. So, you may do something like this:

.A 1800 "I SAID, "HEY!""

The closing quotation mark is, in fact, optional. However, you may wish to use a closing quotation mark for aesthetic reasons, or if your text ends in a quotation mark (as above), or to preserve trailing spaces:

.A 1800 "HI SCORE:    "

Using Screen Codes

wAx will convert PETSCII values to screen code values if you put a slash (/) before the opening quotation mark:

.A 1800 /"SCREEN CODES"

Note that the M and I tools display PETSCII characters and not screen codes, so you may not see the expected text when using screen codes.

Binary Editor

To edit a memory location as a binary number, use

.A addr %bbbbbbbb

where addr is a valid 16-bit hexadecimal address, and each b is a bit value 0 or 1.

wAx will update the memory at the specified address. If memory was updated in direct mode, wAx will provide a prompt for the next address. You may enter additional values, or press RETURN. At each prompt, you may choose any type of editor.