Hello friends I need a short programme which would show me CPU registers so I can use their data to make sure my add,sub or div programs are working.Please if you can gimme one little program which could help.
The simple way is to use the functions already provided in MASM32 in order to print numbers "on screen". Check the MASM32 samples and also check countless small simple examples provided on this board.
I guess it is easier to start with a console application than a GUI application for printing numbers on screen. This way you could print anything on screen ranging from register values to variables and memory region dumps. Later on you can write your own functions but you have to start somewhere.
If you are no capable of doing this then a fast solution would also be to use OllyDbg debugger. Start your program in Ollydbg and you can see the CPU registers values as you execute each instruction step by step.
Danish,
Here is a hint.
YourProc proc args etc ....
LOCAL _eax :DWORD
mov _eax, eax
print str$(_eax),13,10
ret
YourProc endp
The trick is to write them to memory first so you don't change any registers. Once you have them in memory you just display them at the console.