How to debug your program with NO$ZX emulator

Any discussions related to the creation of new hardware or software for the ZX80 or ZX81
Post Reply
User avatar
mrtinb
Posts: 1906
Joined: Fri Nov 06, 2015 5:44 pm
Location: Denmark
Contact:

How to debug your program with NO$ZX emulator

Post by mrtinb »

I've made a short video, to show how I use NO$ZX to debug my programs.

Because I have a Mac, it is easier for me to use the old version of NO$ZX in DOSBOX, rather than the newer Windows version. I also find the Windows version a lot more buggier.

https://youtu.be/PfSNFvPPSLw
  1. Start NO$ZX in DOSBOX or Windows if you like.
  2. You are now shown the debugger, and the emulator is started with F9.
  3. Load the program you wish to debug. You can use LOAD "", to select your P-file from a file browser.
  4. When your program is loaded, you press ESC to go back to the debugger.
  5. Use CTRL-G to go to the start address of your program. The start address has to be given as hex number. My program starts at 43A2, so that's what I put in.
  6. At the line you want to stop to debug, you press F2, and a breakpoint is inserted. A line with a breakpoint is shown with hilited color. This is not shown when the line is selected. So if you select another line, you can see the breakpoint on the line you pressed F2.
  7. Now start the emulator again with F9.
  8. In the emulator start your program like you normally do. My program has no Basic code, so I start it with RAND USR 17314 (which is decimal for $43A2).
  9. The debugger automatically stop your program at the breakpoint.
  10. Now you can step through your program with F7.
All this is easier with the function keys, than with your mouse. The mouse was used in the video, as I don't show which keys were pressed.
Martin
https://zx.rtin.be
ZX81, Lambda 8300, Commodore 64, Mac G4 Cube
Post Reply