?? os_cpu_a.lst
字號:
0292 9810 452 MOV R1,[R0+] ; Restore DPP0
0294 F6F100FE 453 MOV DPP0,R1 ;
0298 9810 454 MOV R1,[R0+] ; Restore DPP2
029A F6F104FE 455 MOV DPP2,R1 ;
029E 9810 456 MOV R1,[R0+] ; Restore DPP3
02A0 F6F106FE 457 MOV DPP3,R1 ;
02A4 9810 458 MOV R1,[R0+] ; Restore CP
02A6 F6F110FE 459 MOV CP,R1 ;
02AA CC00 460 NOP
02AC 98F0 461 MOV R15,[R0+] ; Restore R15
02AE 98E0 462 MOV R14,[R0+] ; Restore R14
02B0 98D0 463 MOV R13,[R0+] ; Restore R13
02B2 98C0 464 MOV R12,[R0+] ; Restore R12
02B4 98B0 465 MOV R11,[R0+] ; Restore R11
02B6 98A0 466 MOV R10,[R0+] ; Restore R10
02B8 9890 467 MOV R9,[R0+] ; Restore R9
02BA 9880 468 MOV R8,[R0+] ; Restore R8
02BC 9870 469 MOV R7,[R0+] ; Restore R7
02BE 9860 470 MOV R6,[R0+] ; Restore R6
02C0 9850 471 MOV R5,[R0+] ; Restore R5
02C2 9840 472 MOV R4,[R0+] ; Restore R4
02C4 9830 473 MOV R3,[R0+] ; Restore R3
02C6 9820 474 MOV R2,[R0+] ; Restore R2
02C8 9810 475 MOV R1,[R0+] ; Restore R1; Restore all processor registers from the
new task's stack
02CA FB88 476 RETI
**** W 118: normally RETS is used for FAR procedures
477
478 _OSIntCtxSw ENDP
479 UCOS_C16X ENDS
480
481 ;********************************************************************************************************
482 ; HANDLE TICK ISR
483 ; void OSTickISR (void)
484 ;
485 ; Description: This function is called every 10ms
486 ;
487 ; Arguments : none
488 ;
489 ; Returns : none
490 ;
491 ; Note(s) : The following C-like pseudo-code describe the operation being performed in the code below.
C166/ST10 assembler v6.0 r2 SN00082920-083 (c) 1998 TASKING, Inc. Date: Dec 5 2000 Time: 10:02:43 Page: 10
os_cpu_a
LOC CODE LINE SOURCELINE
492 ;
493 ; Disable interrupts;
494 ; Save all registers on the current task's stack;
495 ; OSIntEnter();
496 ; OSTimeTick(); Notify uC/OS-II that a tick has occured
497 ; Clear RTC or Timer Interrupt Response Bit
498 ; OSIntExit(); Notify uC/OS-II about end of ISR
499 ; Restore all registers that were save on the current task's stack;
500 ; Enable interrupts;
501 ; Return from Interrupt;
502 ;********************************************************************************************************
503
504 UCOS_C16X SECTION CODE
505 _OSTickISR PROC TASK UCOS_OSTickISR INTNO=23h
506
02CC BE88 507 BCLR IEN ; Disable interrupts
508
509 ; Total execution time : xx states.
02CE 8810 510 MOV [-R0],R1 ; Save R1
02D0 8820 511 MOV [-R0],R2 ; Save R2
02D2 8830 512 MOV [-R0],R3 ; Save R3
02D4 8840 513 MOV [-R0],R4 ; Save R4
02D6 8850 514 MOV [-R0],R5 ; Save R5
02D8 8860 515 MOV [-R0],R6 ; Save R6
02DA 8870 516 MOV [-R0],R7 ; Save R7
02DC 8880 517 MOV [-R0],R8 ; Save R8
02DE 8890 518 MOV [-R0],R9 ; Save R9
02E0 88A0 519 MOV [-R0],R10 ; Save R10
02E2 88B0 520 MOV [-R0],R11 ; Save R11
02E4 88C0 521 MOV [-R0],R12 ; Save R12
02E6 88D0 522 MOV [-R0],R13 ; Save R13
02E8 88E0 523 MOV [-R0],R14 ; Save R14
02EA 88F0 524 MOV [-R0],R15 ; Save R15
525
02EC F2F410FE 526 MOV R4,CP ; Get Context Pointer (CP)
02F0 8840 527 MOV [-R0],R4 ; Put it on the user stack
02F2 F2F406FE 528 MOV R4,DPP3 ; Get Data Page Pointer 3 (DPP3)
02F6 8840 529 MOV [-R0],R4 ; Put it on the user stack
02F8 F2F404FE 530 MOV R4,DPP2 ; Get Data Page Pointer 2 (DPP2)
02FC 8840 531 MOV [-R0],R4 ; Put it on the user stack
02FE F2F400FE 532 MOV R4,DPP0 ; Get Data Page Pointer 0 (DPP0)
0302 8840 533 MOV [-R0],R4 ; Put it on the user stack
0304 F2F40EFF 534 MOV R4,MDC ; Get Multiply/Divide Control (MDC)
0308 8840 535 MOV [-R0],R4 ; Put it on the user stack
030A F2F40CFE 536 MOV R4,MDH ; Get Multiply/Divide High (MDH)
030E 8840 537 MOV [-R0],R4 ; Put it on the user stack
0310 F2F40EFE 538 MOV R4,MDL ; Get Multiply/Divide Low (MDL)
0314 8840 539 MOV [-R0],R4 ; Put it on the user stack; Save current task's context
540
0316 E6F90000 R 541 MOV R9,#SOF _ADDR03 ; call OSIntEnter();
031A 8890 542 MOV [-R0],R9
031C E6F90000 R 543 MOV R9,#SEG _ADDR03
0320 8890 544 MOV [-R0],R9
0322 FA000000 R 545 JMPS SEG (_OSIntEnter), SOF(_OSIntEnter)
546
C166/ST10 assembler v6.0 r2 SN00082920-083 (c) 1998 TASKING, Inc. Date: Dec 5 2000 Time: 10:02:43 Page: 11
os_cpu_a
LOC CODE LINE SOURCELINE
0326 E6F90000 R 547 _ADDR03: MOV R9,#SOF _ADDR04 ; call OSTimeTick();
032A 8890 548 MOV [-R0],R9
032C E6F90000 R 549 MOV R9,#SEG _ADDR04
0330 8890 550 MOV [-R0],R9
0332 FA000000 R 551 JMPS SEG (_OSTimeTick), SOF(_OSTimeTick)
552
0336 D180 553 _ADDR04: EXTR #1
554
0338 E6F90000 1R 555 MOV R9,#SOF _ADDR05 ; call OSIntExit();
033C 8890 556 MOV [-R0],R9
033E E6F90000 R 557 MOV R9,#SEG _ADDR05
0342 8890 558 MOV [-R0],R9
0344 FA000000 R 559 JMPS SEG (_OSIntExit), SOF(_OSIntExit)
560
0348 9810 561 _ADDR05: MOV R1,[R0+] ; Restore MDL
034A F6F10EFE 562 MOV MDL,R1 ;
034E 9810 563 MOV R1,[R0+] ; Restore MDH
0350 F6F10CFE 564 MOV MDH,R1 ;
0354 9810 565 MOV R1,[R0+] ; Restore MDC
0356 F6F10EFF 566 MOV MDC,R1 ;
035A 9810 567 MOV R1,[R0+] ; Restore DPP0
035C F6F100FE 568 MOV DPP0,R1 ;
0360 9810 569 MOV R1,[R0+] ; Restore DPP2
0362 F6F104FE 570 MOV DPP2,R1 ;
0366 9810 571 MOV R1,[R0+] ; Restore DPP3
0368 F6F106FE 572 MOV DPP3,R1 ;
036C 9810 573 MOV R1,[R0+] ; Restore CP
036E F6F110FE 574 MOV CP,R1 ;
0372 CC00 575 NOP
0374 98F0 576 MOV R15,[R0+] ; Restore R15
0376 98E0 577 MOV R14,[R0+] ; Restore R14
0378 98D0 578 MOV R13,[R0+] ; Restore R13
037A 98C0 579 MOV R12,[R0+] ; Restore R12
037C 98B0 580 MOV R11,[R0+] ; Restore R11
037E 98A0 581 MOV R10,[R0+] ; Restore R10
0380 9890 582 MOV R9,[R0+] ; Restore R9
0382 9880 583 MOV R8,[R0+] ; Restore R8
0384 9870 584 MOV R7,[R0+] ; Restore R7
0386 9860 585 MOV R6,[R0+] ; Restore R6
0388 9850 586 MOV R5,[R0+] ; Restore R5
038A 9840 587 MOV R4,[R0+] ; Restore R4
038C 9830 588 MOV R3,[R0+] ; Restore R3
038E 9820 589 MOV R2,[R0+] ; Restore R2
0390 9810 590 MOV R1,[R0+] ; Restore R1; Restore new task's context
591
0392 BF88 592 BSET IEN ; Enable interrupts
0394 FB88 593 RETI ; Return to interrupted task
594
595 _OSTickISR ENDP
596 UCOS_C16X ENDS
597 END
total errors: 0, warnings: 1
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -