HOME

Using a W65c02 Simulator:

Zero-out or change a 256-byte block of RAM

Overview:

A portion of the SBC30 code has been sliced and edited as  SBC30_TestZero_01.asm to show the Zero a Block function that is executed by typing "Z" or "z" in the terminal.

The user is prompted to enter a 4-digit address, then the data you wish to fill the block.

The result is the address is echoed and 256 bytes of the data at the starting address you specified are displayed in a grid to the display and are written to RAM at the address you specified. Example: At address $0300 to $03FF we find "00" which is not an ASCII displayable code - it's the NULL code. "46" will yield the letter "F". Confirm that "46" was written by dumping $0300.

 

Tester:

Oshonsoft 6502 Simulator IDE

 

Setup:

Setup your IDE as shown in the top screenshot.

Enable the Input Terminal with an I/O port of $5000.

Set the "One-Shot IN Value" to "5A" for the letter "Z".

Within the Input Terminal, click "Send Hex Bytes" and enter "30,33,30,30,46" ($0300, $46). The first hex number is the address and the second hex number is the block filler data.

Within the large Assembler window set a breakpoint on line 336 so we can see the Z function without the app restarting once it's complete. Set the BP symbol by left-clicking then right-clicking in the narrow white space column between line number 262 and the instruction "rts".

Adjust one of the Memory Editors to show address $0200.

Adjust a second Memory Editor to show addresses $0300.

I usually keep a third Memory Editor open to watch addresses starting at $0100.

 

IDE Operation:

If you wish to burn the code to flashROM, try this latest build: SBC30_0_R.bin

Oshonsoft 6502 Simulator IDE

(Click to Enlarge)

 

Sim IDE

 

ASCII Terminal

 

 

 

 

Updated 2023-09-10 @ 3pm

 

HOME