📄 os_cpu_c.ls
字号:
1 ; C Compiler for MC68HC12 [COSMIC Software]
2 ; Version V4.2f - 17 Sep 1998
1275 ; 59 void *OSTaskStkInit (void (*task)(void *pd), void *pdata, void *ptos, INT16U opt)
1275 ; 60 {
1276 switch .text
1277 0000 _OSTaskStkInit:
1279 0000 3b pshd
1280 0001 1b9c leas -4,s
1281 00000004 OFST: set 4
1284 ; 65 opt = opt; /* 'opt' is not used, prevent warning */
1286 ;***** ldd OFST+8,s ***** M2
1287 ;***** std OFST+8,s ***** M2
1288 ; 66 wstk = (INT16U *)ptos; /* Load stack pointer */
1290 0003 ed8a ldy OFST+6,s
1291 ;***** sty OFST-4,s ***** S2
1292 ; 67 *--wstk = (INT16U)pdata; /* Simulate call to function with argument */
1294 ;***** ldd OFST+4,s ***** M2
1295 ;***** ldy OFST-4,s ***** L1
1296 0005 195e leay -2,y
1297 ;***** sty OFST-4,s ***** S2
1298 ;***** std [OFST-4,s] ***** D1
1299 ;***** std 2,y- ***** M2
1300 0007 1802887e movw OFST+4,s,2,y-
1301 ; 68 *--wstk = (INT16U)task;
1303 000b ec84 ldd OFST+0,s
1304 ;***** ldy OFST-4,s ***** L1
1305 ;***** leay -2,y ***** P4
1306 ;***** sty OFST-4,s ***** S2
1307 ;***** std [OFST-4,s] ***** D1
1308 000d 6c7e std 2,y-
1309 ; 69 *--wstk = (INT16U)task; /* Put pointer to task on top of stack */
1311 ;***** ldd OFST+0,s ***** L1
1312 ;***** ldy OFST-4,s ***** L1
1313 ;***** leay -2,y ***** P4
1314 ;***** sty OFST-4,s ***** S2
1315 ;***** std [OFST-4,s] ***** D1
1316 000f 6c7e std 2,y-
1317 ; 70 *--wstk = (INT16U)0x2222; /* Y Register */
1319 0011 cc2222 ldd #8738
1320 ;***** ldy OFST-4,s ***** L1
1321 ;***** leay -2,y ***** P4
1322 ;***** sty OFST-4,s ***** S2
1323 ;***** std [OFST-4,s] ***** D1
1324 0014 6c7e std 2,y-
1325 ; 71 *--wstk = (INT16U)0x1111; /* X Register */
1327 0016 cc1111 ldd #4369
1328 ;***** ldy OFST-4,s ***** L1
1329 ;***** leay -2,y ***** P4
1330 ;***** sty OFST-4,s ***** S2
1331 ;***** std [OFST-4,s] ***** D1
1332 0019 6c7e std 2,y-
1333 ; 72 *--wstk = (INT16U)0xBBAA; /* D Register */
1335 001b ccbbaa ldd #-17494
1336 ;***** ldy OFST-4,s ***** L1
1337 ;***** leay -2,y ***** P4
1338 ;***** sty OFST-4,s ***** S2
1339 ;***** std [OFST-4,s] ***** D1
1340 001e 6c40 std 0,y
1341 ; 73 bstk = (INT8U *)wstk; /* Convert WORD ptr to BYTE ptr to set CCR */
1343 ;***** ldy OFST-4,s ***** L1
1344 ;***** sty OFST-2,s ***** S2
1345 ; 74 *--bstk = 0x80; /* CCR Register (Disable STOP instruction) */
1347 0020 c680 ldab #128
1348 ;***** ldy OFST-2,s ***** L1
1349 ;***** dey ***** P5
1350 ;***** sty OFST-2,s ***** P5
1351 ;***** stab [OFST-2,s] ***** D1
1352 0022 6b6f stab 1,-y
1353 ;***** sty OFST-2,s ***** S2
1354 ; 75 return ((void *)bstk); /* Return pointer to new top-of-stack */
1356 ;***** ldd OFST-2,s ***** L6
1357 0024 b764 tfr y,d
1360 0026 1b86 leas 6,s
1361 0028 3d rts
1591 ; 91 void OSTaskCreateHook (OS_TCB *ptcb)
1591 ; 92 {
1592 switch .text
1593 0029 _OSTaskCreateHook:
1595 ;***** pshd ***** P2
1596 00000000 OFST: set 0
1599 ; 93 ptcb = ptcb; /* Prevent compiler warning */
1601 ;***** ldd OFST+0,s ***** L2
1602 ;***** std OFST+0,s ***** S2
1603 ; 94 }
1606 ;***** puly ***** P2
1607 0029 3d rts
1639 ; 108 void OSTaskDelHook (OS_TCB *ptcb)
1639 ; 109 {
1640 switch .text
1641 002a _OSTaskDelHook:
1643 ;***** pshd ***** P2
1644 00000000 OFST: set 0
1647 ; 110 ptcb = ptcb; /* Prevent compiler warning */
1649 ;***** ldd OFST+0,s ***** L2
1650 ;***** std OFST+0,s ***** S2
1651 ; 111 }
1654 ;***** puly ***** P2
1655 002a 3d rts
1675 ; 128 void OSTaskSwHook (void)
1675 ; 129 {
1676 switch .text
1677 002b _OSTaskSwHook:
1681 ; 130 }
1684 002b 3d rts
1704 ; 142 void OSTaskStatHook (void)
1704 ; 143 {
1705 switch .text
1706 002c _OSTaskStatHook:
1710 ; 144 }
1713 002c 3d rts
1733 ; 157 void OSTimeTickHook (void)
1733 ; 158 {
1734 switch .text
1735 002d _OSTimeTickHook:
1739 ; 159 }
1742 002d 3d rts
1754 xdef _OSTimeTickHook
1755 xdef _OSTaskSwHook
1756 xdef _OSTaskStkInit
1757 xdef _OSTaskStatHook
1758 xdef _OSTaskDelHook
1759 xdef _OSTaskCreateHook
1760 end
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -