OS Apps: Input & Display a Hex String |
|
Overview: A portion of the SBC30 code has been sliced and edited as SBC30_TEST_OS_03f.asm for the Input & Display a Hex String function. The SIM will provide an input of "6" to select the menu item and then the input of "3", "4", "5", "7F" and "0D". The last two are <Delete> and <Enter>. The screen initially shows "345" displayed until the <Delete> is executed so that only "34" are displayed. The <Enter> signifies the end of the input so the app will display the hex string and exit to the main menu.
Tester: Oshonsoft 6502 Simulator IDE v1.45
Setup: Setup your IDE as shown in the top screenshot adjacent. In the Peripheral Devices window: - set Device 1 to be an INput on port $5000 with a One-Shot IN value of 36 (for the number 6) - Set Output Terminal to I/O Port $5000 - Set Input Terminal to I/O Port $5000 - Send Hex Bytes 33,34,35,7F,0D Adjust the 2 Memory Editors to show addresses $0000 and $0200. In the Watch Variables window, you may wish to add: - StrBuffIdx at 0054 - StrBuffLen at 0052 - StrBuff(0050) at 0220
SIM Breakpoints: BPs are needed are at 3098, 3100, 3126, 3135 ,3140 and 3156. The first ones will allow you to see the operation. The last BP is for the RTS to end the program.
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 - O - 6 - 0 1 2 3 4 5 6 7 8 9 a b c D E F F
IDE Operation: If you wish to burn the code to flashROM, try this latest build: SBC30_0_R9f.bin |
Oshonsoft 6502 Simulator IDE (Click to Enlarge)
Sim IDE
ASCII Terminal
|
Updated 2023-10-20 @ 8am