Using a W65c02 Simulator: 'Search n Go' Function |
|
Overview: A portion of the SBC30 code has been sliced and edited as SBC30_TEST_SEARCH_02.asm for the Search For & Execute a Program function (Search N Go) that is executed by typing "G" or "g" in the terminal.
In the Sim the user is prompted: 1) To select a starting address for the search. Example: $8000 2) To select a starting address of the programs found. Example: $8029 which is where the ASCII program is located.
Tester: Oshonsoft 6502 Simulator IDE v1.41
Setup: Setup your IDE as shown in the top screenshot. In the Peripheral Devices window: - set Device 1 to be an INput on port $5000 with a One-Shot IN value of 47 (for the letter G) - Set Output Terminal to I/O Port $5000 - Set Input Terminal to I/O Port $5000 - Send Hex Bytes 38,30,30,30,38,30,32,39. (8000, 8029) Adjust the 3 Memory Editors to show addresses $0000, $0200 and $8000. In the Watch Variables window, you may wish to add: - EAcnt_LoHi at $0034 - EAloc_LoHi at $0036 - PCnt_LoHi at $0038 - AddrLoHi at $0006
SIM Breakpoints: The only BPs needed are at 906 and 908 to show the JuMP to address $8029 found in AddrLoHi at $0006, as well as the usual RTS. Use <CTRL><F6> to get you to the breakpoints, use <F2> at each to get a feel for what is occurring, then continue to the next BP using <CTRL><F6>.
App Operation: Using the FlashROM code and not the Sim, here are the keystrokes needed to produce the adjacent lower screenshot: - Press Reset button - G - 8000 - 8B9D
IDE Operation: If you wish to burn the code to flashROM, try this latest build: SBC30_0_R8.bin |
Oshonsoft 6502 Simulator IDE (Click to Enlarge)
Sim IDE
ASCII Terminal
|
Updated 2023-10-01 @ 8am