Well, the final version of the GoAsm implementation of VKim's excellent debugging tools is complete. I have implemented every function except Fix as that is not relevant in GoAsm. You will need GoAsm 0.47 or above in order to use the macros. Unfortunately the StartTimer/EndTimer functions had to go, the timing was unreliable because they were blowing the cache all to hell every time you used them so you were essentially measuring the latency of a cache miss and not the instruction timing, I have no plans to re-implement them. The PrintDouble function is working well. Unlike the MASM version, if you run your program from RadASM (or RadASM is running) it will send to the RadASM output window, if it cannot find RadASM it will start the VKim debug window and send to that. The debug.lib file is now completely incompatible with the masm version, there is nothing that they have in common at all (even the function names are changed) as I have moved alot of the code to the lib instead of bloating with massive macros.

I have uploaded it for the complete RadASM implementation (RadGoAsm.zip)

The following is the syntax I have tested and verified :

(Note that the IDE will display the macro names in bold red to make them easy to find)

#include "\RadASM\GoAsm\inc\debug.a"

DBGWIN_DEBUG_ON = 1 ; Allow spy/traps
DBGWIN_SHOWONLYERRORS = 1 ; suppress ERROR_SUCCESS

.data
szString DB "Text string",0
pszString DD 0


dwVar DD 123
double DQ 2310.23123213

.code
Start:
PrintDec(123)
PrintDec(eax)
PrintDec([dwVar])
PrintDec(OFFSET dwVar)
mov eax,OFFSET dwVar
PrintDec([eax])
PrintHex(123)
PrintHex(eax)
PrintHex([dwVar])
PrintHex(OFFSET dwVar)
mov eax,OFFSET dwVar
PrintHex([eax])
PrintDouble(double)
PrintString(szString)
PrintStringByAddr(OFFSET szString)
mov eax,OFFSET szString
PrintStringByAddr(eax)
mov [pszString],eax
PrintStringByAddr([pszString])
PrintText("Quoted text")
ASSERT(eax,"eax is not 0 so this is not displayed")
xor eax,eax
ASSERT(eax,"eax is 0 so this is displayed")
mov [pszString],eax
ASSERT([pszString],"pszString is 0 so this is displayed")
ASSERT([pszString],"") ; Show the default message
PrintLine
mov D[pszString],OFFSET szString
DumpMem([pszString],10)
DumpMem(OFFSET szString,10)
mov eax,OFFSET szString
mov ecx,10
DumpMem(eax,ecx)
PrintLine
DumpFPU
PrintLine
DumpEFlags
Spy(pszString)
inc D[pszString]
inc D[pszString]
inc D[pszString]
StopSpy
invoke SetLastError,0
PrintError
TrapException(OFFSET EH)
xor ecx,ecx
div ecx
EH:
DbgDump(OFFSET szString,10)
Measure
xor eax,eax
EndMeasure
ShowLine
invoke ExitProcess,0
Posted on 2004-01-08 04:40:12 by donkey
There was a small bug in debug.lib, if the UNICODE Windows.inc file was included there was unexpected behavior from the FPUDump macro. It has been corrected and the new version uploaded to my site. The new lib is in the RadGoAsm.zip file and the debug.zip project has been updated.
Posted on 2004-01-11 12:58:31 by donkey
Hi All,

With the release of GoAsm version 0.47 I have removed the older version of VKim from my site, the only available version is now part of the complete GoAsm implementation package.
Posted on 2004-01-22 16:31:54 by donkey
There was a small fix for some functions if the application is a Unicode app, PrintString and PrintStringByAddr will now output the proper string by converting from Unicode first. You must use UNICODE = 1 to let the library know that the app is Unicode. Debug.zip and RadGoAsm.zip have been updated at my site.
Posted on 2004-01-23 11:58:35 by donkey