Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
05/12/05 21:21
Read: times


 
#93359 - re:what is this.
Responding to: ???'s previous message
Erik Malund said:
Addr;
Data;
what is this ?

this is to stop the compiler from complaining about this variables not being used.

Erik Malund said:

while(EECON & 1){}; //check the EEBUSY bit
EECON=2;
_asm
mov acc,b
movx @dptr,a
what is in dptr ???
what is in b ???

you do not know!

You are making assumptions about the compiler which you cant


I am basing some of my info of this:

"SDCC passes the input parameter in DPL. It actually uses DPL, DPH, B and A, in that order, for 8, 16 and 32 bit parameters. This function has a "void" return, but DPL, DPH, B and A are also used when there is a return value. Normally, SDCC assumes that any function it calls will use R0 through R7, so these is no need to save these registers before writing into them. "
-http://www.pjrc.com/tech/8051..._sdcc.html

I don't use the _asm statement very much, so go easy on me.
Erik Malund said:
should you not disable interrupts?

Your are right about the interrupts, I forget to do that after changing my code.

List of 5 messages in thread
TopicAuthorDate
AT89c51ED2 EEPROM problem.            01/01/70 00:00      
   what is this            01/01/70 00:00      
      re:what is this.            01/01/70 00:00      
   Also Tried            01/01/70 00:00      
      So..            01/01/70 00:00      

Back to Subject List