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

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
06/09/06 22:22
Read: times


 
#118123 - _naked
Responding to: ???'s previous message
If you read the manual, how can you have missed the _naked keyword?

unsigned char myfunc(unsigned char x) _naked
{
  _asm
  mov a,dpl         ; pass the parameter
  lcall MY_FUNCTION ; better use call if you want to come back
  mov dpl,a         ; put my return value where SDCC expects it
  ret               ; must insert ret for naked functions too
  _endasm;
}


List of 6 messages in thread
TopicAuthorDate
SDCC assembly interfacing            01/01/70 00:00      
   read the manual            01/01/70 00:00      
      I did (ofcourse)            01/01/70 00:00      
         whichever tools the easy way is to ..            01/01/70 00:00      
         _naked            01/01/70 00:00      
            well....            01/01/70 00:00      

Back to Subject List