Using a modified version of EMU48, HP dev allows you to run and debug your assembly level applications.
To debug your application, you must first compile it succefully (F9). this will generate a .HP file containing your application.
launch the Debugger (Ctrl-D or menu Debug Debug) then, load your program (see EMU48 help files). Store it if you want. It's a good idee for your program not to move in the ram while debugging it.
You will now need to indicate to the debugger the starting address of your progam in RAM. It's compolsory if you want to use source level debugging.
you can acheive this in three differents ways.
Put somewhere (and one only) in your assembly program the DEBUG instruction (in fact 80813, a type of RSI)
Launch your program. HP dev will automaticly find the starting address of your program.
You can display the find Start dialog box using the findStart item of the Debug menu. this fill display the following dialog box:
Click on Find and HP dev will attempt to find automaticly the starting address of your program. to perform this opperation, HPdev use the file generated whille compiling the project. It's important to have in EMU48 the same version that on the PC hard disk.
If you have more than one instance of your program in EMU48 ram, the first one will be use (for example, after a STO command, the object can still be in the Temporary RAM, you should Erase it first (try MEM command))
you can type directly the starting address in the Start Find dialog box. Use a command like ->A on emu48 to get this address.
You are now ready to debugg your application.
Put some breakpoint in your source (Debug Breakpoint or F5) launch your program and enjoy!
Use F7, F8 and F10 to debugg your program.
You can modify the registers values (Just modify the value and press ENTER).
You can modify the RAM contents (Just modify the value and press ENTER).
To View, Modify the RAM, put an expression in the Address edit box ($80100 for example) and press enter. then you will see the memory content (To modify it, just press ENTER).
You can view the BreakPoint list using the Break poink list window (Show Break Points in Debug menu).
Here, you can list the breakpoints, delete them. By double clicking on one of them, you go to the source point where the breakpoint is.
You can put some conditional BreakPoints.
Use the conditional Break command or Shift F5. you can put a condition on memory value, register value and counter (This will break when you pass for the nth time on the breakpoint).
You can either stop if the memeory value is equal or different to a value using the match cheickbox. Idem for the register value based breakpoints.
The Ignore interrupts checkItem allows you to specify if you want to debug interrupt or not.
Note: the BreakPoint list window will not be updated if you add some more breakpoints.