• A RET instruction does not return correctly (problem only with flash) !!!
    I have a problem in the context switch function of an OS. the switch function saves the context of the task that is running. Then, it sets the appropriate registers and need to jump to the task_function...
  • return value of subroutines and SCXT
    Hi, i am wondering how to give back a value of a subroutine to the calling routine and use a register when using scxt. example: SCXT CP,#0FC40h NOP CALLS something CMP R10, ONES...
  • Return Statements inside Case Statements
    I encountered a wierd runtime error after compiling and running the following statement: FuncCall(unsigned char casenum) { switch (casenum) { case 0x00: return 0x0100; default: return 0x1000;...
  • Saving Return Address on User Stack
    I've read the article that there is no support in the C167 KEIL compiler. Hence, I've tried to use MACRO assembler as follows. *DEFINE ( calls(Rx, Ry) ) LOCAL RETURN_LBL ( MOV R13, #SOF %RETURN_LBL...
  • strtod return ptr not advanced if converted value =0
    This code has worked for years in C51: ----- CmdParm[CmdCnt / 2] = strtod(ParamBuf, &rPos); // get a number // returns with rPos pointing to the next unconverted char in the ParamBuf if(rPos > ParamBuf...