创建任务HotBIOS: TskHandle = CreateTsk(TskFunction,//任务函数 SWINum, //软中断号 TskPriority,//任务级别 InitTskHook,//初始化任务钩子 QuitTskHook)//终止删除任务钩子 HotBIOS任务申请ICB代码 0xXXX0 CallD 0xXXX1 NewHotBIOSTsk//呼叫HtBIOS_NewHotBIOSTsk() 0xXXX2 Ld #SWINum, B//告诉HotBIOS以后该任务使用SWINum和SWINum+1 0xXXX3 CrcPassword 0xXXX4 TskFunction //任务函数 0xXXX5 TskPriority //任务级别 0xXXX6 InitTskHook //初始化任务钩子 0xXXX7 QuitTskHook //终止删除任务钩子 HotBIOS任务分配ICB代码 0xXXX0 CallD 0xXXX1 InitTskHook //void InitTskHook(unsigned int M, unsigned char N); 0xXXX2 Ld #N, B 0xXXX3 M 0xXXX4 CallD 0xXXX5 TskFunction //int TskFunction(void); 0xXXX6 Stl B, 0xXXX7 #Sp(0h) 0xXXX8 CallD 0xXXX9 QuitTskHook //void QuitTskHook(unsigned int M, unsigned char N); 0xXXXA Ld #N, B 0xXXXB M 0xXXXC CallD 0xXXXD DeleteTsk 0xXXXE Ld #N, B 0xXXXF M //void DeleteTsk(unsigned int M, unsigned char N);
|