how can i obtain the current values of registers like accumulator,B,stack pointer,PSW,DPTR,etc in C?? i am currently working on a trainer/development kit for 8051..One of the commands to be executed is R<CR> Once this command is executed,the values of all the registers like A,B,SP,PSW,DPH,DPL,R0,R1,R7 should be displayed on screen...how do i retrieve these register values in C?
something like x=ACC should work.
Simply by expressing that belief, you've just demonstrated how haven't got one bit closer to understanding what the real problem is than when you started this thread.
No, that will not "work", for any meaningful interpretation of that word. Sure, you'll get what was in the accumulator as you executed that instruction --- but that will rather certainly not be what you actually wanted to get.
You're on the wrong path, and people have been telling you that --- yet instead of turning back or at least slowing down, you're accelerating. Do you really think that's a sensible use of anyone's time?
"Do you really think that's a sensible use of anyone's time?"
hi, smartie, rather than wasting everyone's time on how this will not work, why don't you put down on a piece of paper an approach that will work?
be constructive and show us how smart you really are.
It's already done and known as a Debug Monitor.
Most commercial paid-for and open-source are available.
hi, smartie, rather than commenting on peoples replies be constructive and show us how smart you really are.
"Most" ??
I have no idea why I wrote that!
this appear out of synch in the thread it is a reoply to RE: pedantrt failure Ashley Madison "Do you really think that's a sensible use of anyone's time?"
hi, smartie, rather than commenting on peoples replies be constructive and show us how smart you really are
sorry Andy, if you thought it directed at you
Erik
"hi, smartie ..."
"be constructive and show us ..."
New clues, thank you!
If it walks like a duck and quacks like a duck, it could be a "qili" / "millwood" manifesting itself by a different name. It has been the case that if you totally ignore it, it will go away (well, on most occasions it's forced to leave by cognizant forum admin folk banning it into obscurity), but in one case I know of, ignoring the malfeasant was equally successful, although it did take some time for legitimate posters (and the malfeasant) to catch on.