📄 test.ls
字号:
1 ; C Compiler for MC68HC12 [COSMIC Software]
2 ; Version V4.2f - 17 Sep 1998
1223 ; 53 void main (void)
1223 ; 54 {
1224 switch .text
1225 0000 _main:
1229 ; 57 OSInit(); /* Initialize "uC/OS-II, The Real-Time Kernel" */
1231 0000 160000 jsr _OSInit
1233 ; 61 OSTaskCreate(AppStartTask, (void *)0, (void *)&AppStartTaskStk[255], 0);
1235 0003 c7 clrb
1236 0004 37 pshb
1237 0005 cc0303 ldd #_AppStartTaskStk+255
1238 0008 3b pshd
1239 0009 87 clra
1240 000a c7 clrb
1241 000b 3b pshd
1242 000c cc0018 ldd #L714_AppStartTask
1243 000f 160000 jsr _OSTaskCreate
1245 0012 1b85 leas 5,s
1246 ; 65 OSStart(); /* Start multitasking (i.e. give control to uC/OS-II) */
1248 0014 160000 jsr _OSStart
1250 ; 66 }
1253 0017 3d rts
1291 ; 82 static void AppStartTask (void *pdata)
1291 ; 83 {
1292 switch .text
1293 0018 L714_AppStartTask:
1295 0018 3b pshd
1296 00000000 OFST: set 0
1299 ; 84 pdata = pdata;
1301 ;***** ldd OFST+0,s ***** L2
1302 0019 6c80 std OFST+0,s
1303 ; 85 AppTickInit(); /* Initialize the ticker */
1305 001b 0750 jsr L524_AppTickInit
1307 ; 87 OSTaskCreate(AppTask1, (void *)0, (void *)&AppTask1Stk[255], 10);
1309 001d c60a ldab #10
1310 001f 37 pshb
1311 0020 cc0203 ldd #_AppTask1Stk+255
1312 0023 3b pshd
1313 0024 87 clra
1314 0025 c7 clrb
1315 0026 3b pshd
1316 0027 cc0049 ldd #L124_AppTask1
1317 002a 160000 jsr _OSTaskCreate
1319 002d 1b85 leas 5,s
1320 ; 88 OSTaskCreate(AppTask2, (void *)0, (void *)&AppTask2Stk[255], 20);
1322 002f c614 ldab #20
1323 0031 37 pshb
1324 0032 cc0103 ldd #_AppTask2Stk+255
1325 0035 3b pshd
1326 0036 87 clra
1327 0037 c7 clrb
1328 0038 3b pshd
1329 0039 cc005b ldd #L324_AppTask2
1330 003c 160000 jsr _OSTaskCreate
1332 003f 1b85 leas 5,s
1333 0041 L754:
1334 ; 92 OSTimeDly(1); /* Delay task execution for one clock tick */
1336 0041 cc0001 ldd #1
1337 0044 160000 jsr _OSTimeDly
1340 0047 20f8 bra L754
1373 ; 109 static void AppTask1 (void *pdata)
1373 ; 110 {
1374 switch .text
1375 0049 L124_AppTask1:
1377 0049 3b pshd
1378 00000000 OFST: set 0
1381 ; 111 pdata = pdata;
1383 ;***** ldd OFST+0,s ***** L2
1384 004a 6c80 std OFST+0,s
1385 004c L774:
1386 ; 116 AppTask1Ctr++;
1388 004c fd0002 ldy _AppTask1Ctr
1389 004f 02 iny
1390 0050 7d0002 sty _AppTask1Ctr
1391 ; 117 OSTimeDly(1); /* Delay task execution for one clock tick */
1393 0053 cc0001 ldd #1
1394 0056 160000 jsr _OSTimeDly
1397 0059 20f1 bra L774
1430 ; 134 static void AppTask2 (void *pdata)
1430 ; 135 {
1431 switch .text
1432 005b L324_AppTask2:
1434 005b 3b pshd
1435 00000000 OFST: set 0
1438 ; 136 pdata = pdata;
1440 ;***** ldd OFST+0,s ***** L2
1441 005c 6c80 std OFST+0,s
1442 005e L715:
1443 ; 141 AppTask2Ctr++;
1445 005e fd0000 ldy _AppTask2Ctr
1446 0061 02 iny
1447 0062 7d0000 sty _AppTask2Ctr
1448 ; 142 OSTimeDly(1); /* Delay task execution for one clock tick */
1450 0065 cc0001 ldd #1
1451 0068 160000 jsr _OSTimeDly
1454 006b 20f1 bra L715
1479 ; 169 static void AppTickInit (void)
1479 ; 170 {
1480 switch .text
1481 006d L524_AppTickInit:
1485 ; 171 TSCR = 0x80; /* Enable timer */
1487 006d c680 ldab #128
1488 006f 5b86 stab _TSCR
1489 ; 216 TIOS |= 0x80; /* Make channel an output compare */
1491 0071 4c8080 bset _TIOS,128
1492 ; 217 TC7 = TCNT + OS_TICK_OC_CNTS; /* Set TC7 to present time + OS_TICK_OC_CNTS */
1494 0074 dc84 ldd _TCNT
1495 0076 c361a8 addd #25000
1496 0079 5c9e std _TC7
1497 ; 218 TMSK1 |= 0x80; /* Enable OC7 interrupt. */
1499 007b 4c8c80 bset _TMSK1,128
1500 ; 220 }
1503 007e 3d rts
1558 xdef _main
1559 switch .bss
1560 0000 _AppTask2Ctr:
1561 0000 0000 ds.b 2
1562 xdef _AppTask2Ctr
1563 0002 _AppTask1Ctr:
1564 0002 0000 ds.b 2
1565 xdef _AppTask1Ctr
1566 0004 _AppTask2Stk:
1567 0004 000000000000 ds.b 256
1568 xdef _AppTask2Stk
1569 0104 _AppTask1Stk:
1570 0104 000000000000 ds.b 256
1571 xdef _AppTask1Stk
1572 0204 _AppStartTaskStk:
1573 0204 000000000000 ds.b 256
1574 xdef _AppStartTaskStk
1575 xref _OSStart
1576 xref _OSInit
1577 xref _OSTimeDly
1578 xref _OSTaskCreate
1579 end
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -