We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
Hi, How to move the program counter(PC) to DPTR.Can any one suggest on this. Thanks in advance, Regards, Gopi
.... CALL loadPCtoDPTR loadPCtoDPTR: POP DPH POP DPL PUSH DPL PUSH DPH RET
Btw, it was a joke (but it works anyway :) In fact, PC counter is that value which command executed from. So it is not a problem just write something like next: .... (your code) MOV DPTR,#mark_pointer mark_pointer: .... (your code) Here you indicated a label which value is the PC counter exactly when processor executes command located at it. Good days!
Don't forget that DPTR and PC refer to different logical address spaces; thus, depending on your physical memory implementation, DPTR=0x1234 may well address a different physical address location from PC=0x1234, etc!
What? You are wrong here..
MOVC A,@A+DPTR
MOVC A,@A+PC
"You are wrong here.." Doh! Sorry - still in holiday mode! "Ofcoz, if you will use MOVX... command then it will be a big difference" Yes, that's what I meant to say!