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?
"how do i retrieve these register values in C?"
the approach will depend on what kind of registers you are trying to read.
something like x=DPH; should work, for registers that are not impacted by the statement itself - look at the disassembly for sure.
for registers whose value will be impacted by the statement (PC for example), you may have to do manual adjustments.
Because the 'C' (almost certainly) will impact the register values, you should consider whether doing this in 'C' is really a good idea...
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 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.
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.
<QUOTE>pedantrt failure</QUOTE>
what is a pedantrt?
is it a new programers word?
even this proffesional does not know
www.yourdictionary.com/pedantry
Go marry Ashely, you deserve one another.
_shiff_ !
Ho, just in case you don't know what "sniff" means, here is some help:
www.urbandictionary.com/define.php
Oh, yeah.
Ironic?
Tapeer,
you think im like aboriginal petrul? a strange complument ;-)
i must go agin and do not do time for smalltalking.
you got to chap 2 of abi yet. lol
Always yo're frend.
Zeusti.
of course i ment
Always yo're freind.
LOL
What is all the weird fuss about (I could not read it - sorry, try again if you will)? I just arranged you a wonderful marriage. And what a bride/battleaxe you'll be getting! Oh, yeah.
Tamir: You have to decide if you mean shiff or sniff.
Our friend zeusti writes excellent english with perfect spelling sometimes. Sometimes not. So we either have zeusti plus zeusti two, or zeusti can adaptively change his skill level to match the occasion.
My sincerest apologies - "sniff" it is !
View all questions in Keil forum