PAul's Assembly language macros tools...

Discussion to talk about software related topics only.
Post Reply
User avatar
pbreed
Posts: 1081
Joined: Thu Apr 24, 2008 3:58 pm

PAul's Assembly language macros tools...

Post by pbreed »

I was answering a support request about assembly today and this caused me to dig up my personal assembly language debugging macros....
I don't think I've shared them before, they arent really production quality, but there from my personal tool box and somewhat interesting...

Create a project add ctest.s
and use the main.cpp attached...

Take a look in TestASMFunction at the end of ctest.s

It demonstrates printing strings, dumping registers and dumping the stack all non destructivly to the assembly registers....
IE you can put the print and dump register macros inline in your assembly language functions without corrupting the register values other than
the speed loss for printing...(Looking at things you might loose the condition codes in the sr as well....this would be an easy fix just add sr to the push pop of a0,d0)
this needs a single "C" function to output chars to provided in the example main attached.

Happy assembly hacking..
Attachments
main.cpp
The main to excercise ctest.c
(1.23 KiB) Downloaded 334 times
ctest.s
Assembly macros...
(4.7 KiB) Downloaded 347 times
Post Reply