大家好:
请教一个ucos中堆栈初始化子程序的问题,程序如下:
OS_STK *OSTaskStkInit (void (*task)(void *pd), void *pdata, OS_STK *ptos, INT16U opt)
{
INT16U *stk;
#ifdef BANKED
INT16U RegPage; /* uses to save the ppage */
INT16U *OffsetAddress;
#endif
stk = (INT16U *)ptos; //load stack pointer
*--stk = opt; //opt the is one byte blank
#ifdef BANKED
OffsetAddress = (INT16U *)&task; /* 16 bit address*/
RegPage = (INT8U)task; /* PPAGE */
*--stk = (INT16U)*OffsetAddress; //pc for use of opt in task
*--stk = (INT16U)*OffsetAddress; //pc
#endif
#ifdef SMALL
*--stk = (INT16U)(task); //pc for use of opt in task
*--stk = (INT16U)(task); //pc
#endif
*--stk = (INT16U)(0x1122); //Y Register
*--stk = (INT16U)(0x3344); //X Register
*--stk = (INT16U)pdata; //D Register:A,B
*--stk = (INT16U)(0x00); //CCR,16 bits in S12X
/*((INT8U *)stk)--; //CCR,8 bits in S12
*(INT8U *)stk = (INT8U)(0x00); //CCR*/
#ifdef BANKED
((INT8U *)stk)--; // a byte need for PPAGE
*(INT8U *)stk = RegPage;//PPAGE
#endif
return((OS_STK *)stk);
}
其中那个0X1122和0X3344代表的是什么啊? |