There are two integrated debugging tools in RadASM, breakpoints and VKim's debug.
To use breakpoints you must include one of the following lines in your main code.
Breakpoints are set using the right click menu in the code editor window. Place the cursor on a line of code and right-click, select Toggle Breakpoint to set or remove a single breakpoint select Clear Breakpoints to remove all breakpoints. Once you have a breakpoint set, the Add Variable selection will be enabled for that line, you can use this to specify variables that you wish to have displayed when the breakpoint is reached. RadASM will pause the program once the line immediately before the breakpoint has executed and a dialog will display a register dump plus the variables you have specified.
Breakpoints require that you run the program from the RadASM Make menu using the Run command. You must remove all breakpoints if you wish to run the program independent of RadASM.
Breakpoints are saved in the project file and will not be lost by closing the project. You must re-build a program using breakpoints each time RadASM is opened as the MDI handle must be known for breakpoints to work properly.
There can be a maximum of 10 breakpoints in a project.
There is a RadASM specific implementation of VKim's debug. To enable it insert the following lines in your main code.
The RadASM implementation is identical to the original except that instead of outputting to a debug window it will output to the RadASM output window.
For information on using VKim's debug see the help file in \RadASM\Help\DBGWIN.HLP
The GoAsm includes are currently available at my website. The GoAsm implementation of VKim's debug requires a minimum of GoAsm 0.46i beta release and supports the following functions:
PrintDec - Syntax = PrintDec(eax) or PrintDec([hInstance]) Only dwords are supported optional text is not.
PrintHex - Same as PrintDec
PrintText - Syntax = PrintText("Quoted text")
PrintString - Syntax = PrintString(StringLabel) do not encase the label in square brackets
PrintStringByAddr - Syntax = PrintStringByAddr(pString)
PrintLine - Same as MASM
PrintError - Same as MASM
DumpMem - Syntax = DumpMem(pMem,nBytes)
DumpFPU - Syntax = DumpFPU
Spy - Syntax = Spy(Label) do not encase the label in square brackets
StopSpy = Same as MASM
TrapException = TrapException(OFFSET CodeLabel)
PrintDouble = PrintDouble(QWordLabel) do not encase the label in square brackets
ASSERT = ASSERT(eax,"Message") if you wish the default message you must use "" in place of "Message"
DbgDump - Syntax = DbgDump(pMem,nBytes)
PrintException - Syntax = PrintException(pEXCEPTION_RECORD)
Extensions for GoAsm version only:
ShowLine - Syntax = ShowLine - Prints the current line number in the output window
DumpEFlags - Syntax = DumpEFlags - dumps the eflags register
DumpMMX - Syntax = DumpMMX - Dumps the MMX registers
Measure/EndMeasure - returns the number of bytes between the two
PrintQWORD - Syntax = PrintQWORD(label) do not encase the label in square brackets
PrintQWORDHex - Syntax = PrintQWORDHex(label) do not encase the label in square brackets
The Fix function is unsupported
To enable VKim's debug for GoAsm include the following line in your source code:
The directive STRINGS UNICODE will cause debug to translate the PrintString, PrintStringByAddr and PrintText functions from Unicode to ANSI.
You can set up the Run w/Debug Make menu selection to work with your external debugger and you can also include it to your tools menu. For those debuggers that accept command line filenames you can add that with a ,5 at the end of the command line.