BBC BASIC for Windows
Programming >> Assembly Language Programming >> Debugging Assembly
http://bb4w.conforums.com/index.cgi?board=assembler&action=display&num=1226720831
Debugging Assembly
Post by Michael Hutton on Nov 15th, 2008, 02:47am
http://groups.yahoo.com/group/bb4w/files/Tools/Assembly%20Debugging/REGDUMPLIB.bbc
Using the 'dual stacks' method of calling a BBC procedure from inside assembly I have posted REGDUMPLIB in the yahoo group.
It will dump out the contents of the general and FPU registers to (a) dialogue box(s) in which you can examine the registers at that point. It will also dump out a .txt file of all the calls you make. There is an option of not opening the dialogue boxes and just dumping to a file so that you can examine them at your leisure.
It should be fairly simple to use. There is minimal interaction but do make sure that you reserve enough space in your DIM'd code area for the CALL's !
I've added a GUID to all the procedure names so that they don't clash with anyone's programs. It's a fairly simple thing to do when you've finished programming. Just make sure you add a code to the procedure names such as _MDCH_ then when you've finished simple search and replace _MDCH_ with the GUID, but do not include the outer braces {} and change the - for _. You can find a GUID generator in the new SDK...
I will update it. I stupidly forgot to add a edit box for the 16-bit registers but have added their output to the text file. I also haven't put the segment selector registers in. Also, it doesn't work, yet, with CALL's with parameters. I haven't looked at the code for a week but will try and figure a way of doing so. And, it doesn't output the EIP or ESP registers because they change.
I will add to it, but don't hold your breath!
Michael