📄 it_st7mc.ls
字号:
1 ; C Compiler for ST7 (COSMIC Software)
2 ; Generator V4.4a - 17 Dec 2001
3 ; Optimizer V4.2g - 21 Dec 2001
5 switch .data
6 0000 _SpdVarPeriodCounter:
7 0000 00 dc.b 0
8 0001 _timer_after_start:
9 0001 03e8 dc.w 1000
10 0003 _Restart_Timer:
11 0003 0000 dc.w 0
12 0005 _TimeBaseStatus:
13 0005 00 dc.b 0
46 ; 54 void Resert_SCIRX_Watchdog(void)
46 ; 55 {
47 .text: section .text,new
48 0000 _Resert_SCIRX_Watchdog:
51 ; 56 SCIRX_Watchdog = 600; // 6 second SCI RX waterdog interval
53 0000 ae02 ld x,#2
54 0002 cf0001 ld _SCIRX_Watchdog,x
55 0005 a658 ld a,#88
56 0007 c70002 ld _SCIRX_Watchdog+1,a
57 ; 57 MotorStatus &= 0xdf;
59 000a 1b00 bres _MotorStatus,#5
60 ; 58 }
63 000c 81 ret
99 ; 60 void Timer_SetSCITXDelayPeriod(u8 Period)
99 ; 61 {
100 .text: section .text,new
102 xref.b _Timer_SetSCITXDelayPeriod$L
103 0000 _Timer_SetSCITXDelayPeriod:
106 ; 62 SCI_TxDelay_Timer = Period; // Reset counter to new value
108 0000 c70000 ld _SCI_TxDelay_Timer,a
109 ; 63 TimeBaseStatus &= (u8)(~SCI_TXDelay_ELAPSED); // Clear Flag
111 0003 c60005 ld a,_TimeBaseStatus
112 0006 a4fe and a,#254
113 0008 c70005 ld _TimeBaseStatus,a
114 ; 64 }
117 000b 81 ret
141 ; 66 BOOL Timer_IsSCITXDelayElapsed(void)
141 ; 67 {
142 .text: section .text,new
143 0000 _Timer_IsSCITXDelayElapsed:
146 ; 68 if ( TimeBaseStatus & SCI_TXDelay_ELAPSED )
148 0000 c60005 ld a,_TimeBaseStatus
149 0003 a501 bcp a,#1
150 0005 270b jreq L74
151 ; 70 TimeBaseStatus &= (u8)(~SCI_TXDelay_ELAPSED); // Clear Flag
153 0007 c60005 ld a,_TimeBaseStatus
154 000a a4fe and a,#254
155 000c c70005 ld _TimeBaseStatus,a
156 ; 71 return ( TRUE );
158 000f a601 ld a,#1
161 0011 81 ret
162 0012 L74:
163 ; 75 return ( FALSE );
165 0012 4f clr a
168 0013 81 ret
203 ; 79 void Timer_SetSpdVarPeriod(u8 Period)
203 ; 80 {
204 .text: section .text,new
206 xref.b _Timer_SetSpdVarPeriod$L
207 0000 _Timer_SetSpdVarPeriod:
210 ; 81 SpdVarPeriodCounter = Period;
212 0000 c70000 ld _SpdVarPeriodCounter,a
213 ; 82 }
216 0003 81 ret
240 ; 84 u8 Timer_GetSpdVarPeriod(void)
240 ; 85 {
241 .text: section .text,new
242 0000 _Timer_GetSpdVarPeriod:
245 ; 86 return(SpdVarPeriodCounter);
247 0000 c60000 ld a,_SpdVarPeriodCounter
250 0003 81 ret
274 ; 89 BOOL Timer_SpdVarPeriodElapsed(void)
274 ; 90 {
275 .text: section .text,new
276 0000 _Timer_SpdVarPeriodElapsed:
279 ; 91 if (SpdVarPeriodCounter == 0)
281 0000 c60000 ld a,_SpdVarPeriodCounter
282 0003 2603 jrne L111
283 ; 93 return ( TRUE );
285 0005 a601 ld a,#1
288 0007 81 ret
289 0008 L111:
290 ; 97 return ( FALSE );
292 0008 4f clr a
295 0009 81 ret
330 ; 101 void Set_RestartTimer(u16 Period)
330 ; 102 {
331 .text: section .text,new
333 xref.b _Set_RestartTimer$L
334 0000 _Set_RestartTimer:
337 ; 103 Restart_Timer = 0;
339 0000 4f clr a
340 0001 c70003 ld _Restart_Timer,a
341 0004 c70004 ld _Restart_Timer+1,a
342 ; 104 TimeBaseStatus |= (u8)(Restart_3Min_Begin);
344 0007 c60005 ld a,_TimeBaseStatus
345 000a aa02 or a,#2
346 000c c70005 ld _TimeBaseStatus,a
347 ; 105 }
350 000f 81 ret
374 ; 107 BOOL Timer_RestartTimerBegin(void)
374 ; 108 {
375 .text: section .text,new
376 0000 _Timer_RestartTimerBegin:
379 ; 109 if (TimeBaseStatus & Restart_3Min_Begin)
381 0000 c60005 ld a,_TimeBaseStatus
382 0003 a502 bcp a,#2
383 0005 2703 jreq L341
384 ; 111 return (TRUE);
386 0007 a601 ld a,#1
389 0009 81 ret
390 000a L341:
391 ; 115 return (FALSE);
393 000a 4f clr a
396 000b 81 ret
418 ; 139 void dummy_rt(void)
418 ; 140 {
419 .text: section .text,new
420 0000 _dummy_rt:
424 ; 141 }
427 0000 80 iret
449 ; 160 void TRAP_Interrupt(void)
449 ; 161 {
450 .text: section .text,new
451 0000 _TRAP_Interrupt:
455 ; 162 }
458 0000 80 iret
480 ; 182 void MCC_Interrupt(void)
480 ; 183 {
481 .text: section .text,new
482 0000 _MCC_Interrupt:
486 ; 184 }
489 0000 80 iret
511 ; 204 void PORTS_0_Interrupt(void)
511 ; 205 {
512 .text: section .text,new
513 0000 _PORTS_0_Interrupt:
517 ; 206 }
520 0000 80 iret
542 ; 226 void PORTS_1_Interrupt(void)
542 ; 227 {
543 .text: section .text,new
544 0000 _PORTS_1_Interrupt:
548 ; 228 }
551 0000 80 iret
573 ; 248 void PORTS_2_Interrupt(void)
573 ; 249 {
574 .text: section .text,new
575 0000 _PORTS_2_Interrupt:
579 ; 250 }
582 0000 80 iret
604 ; 270 void SPI_Interrupt(void)
604 ; 271 {
605 .text: section .text,new
606 0000 _SPI_Interrupt:
610 ; 272 }
613 0000 80 iret
635 ; 291 void TIMB_Interrupt(void)
635 ; 292 {
636 .text: section .text,new
637 0000 _TIMB_Interrupt:
641 ; 293 }
644 0000 80 iret
697 ; 312 void TIMA_Interrupt(void)
697 ; 313 {
698 .text: section .text,new
699 0000 _TIMA_Interrupt:
701 0000 9089 push y
702 00000102 OFST: set 258
703 0002 b601 ld a,c_x+1
704 0004 88 push a
705 0005 b600 ld a,c_x
706 0007 88 push a
707 0008 b601 ld a,c_y+1
708 000a 88 push a
709 000b b600 ld a,c_y
710 000d 88 push a
711 000e 88 push a
712 000f 88 push a
715 ; 316 if (ValBit(TASR,6))
717 0010 0c0003cc0107 btjf _TASR,#6,L562
718 ; 318 timer=TAOC1HR<<8;
720 0016 be00 ld x,_TAOC1HR
721 0018 4f clr a
722 0019 9096 ld y,s
723 001b 90d70102 ld (OFST+0,y),a
724 001f 9f ld a,x
725 0020 90d70101 ld (OFST-1,y),a
726 ; 319 timer+=TAOC1LR;
728 0024 96 ld x,s
729 0025 b600 ld a,_TAOC1LR
730 0027 db0102 add a,(OFST+0,x)
731 002a d70102 ld (OFST+0,x),a
732 002d d60101 ld a,(OFST-1,x)
733 0030 a900 adc a,#0
734 0032 d70101 ld (OFST-1,x),a
735 ; 320 timer+= 10000; // int every 10 ms
737 0035 d60102 ld a,(OFST+0,x)
738 0038 ab10 add a,#16
739 003a d70102 ld (OFST+0,x),a
740 003d d60101 ld a,(OFST-1,x)
741 0040 a927 adc a,#39
742 0042 d70101 ld (OFST-1,x),a
743 ; 321 TAOC1HR=(u8)(timer>>8);
745 0045 b700 ld _TAOC1HR,a
746 ; 322 TAOC1LR=(u8)timer;
748 0047 d60102 ld a,(OFST+0,x)
749 004a b700 ld _TAOC1LR,a
750 ; 324 SCIRX_Watchdog--;
752 004c ce0001 ld x,_SCIRX_Watchdog
753 004f c60002 ld a,_SCIRX_Watchdog+1
754 0052 a001 sub a,#1
755 0054 88 push a
756 0055 9f ld a,x
757 0056 a200 sbc a,#0
758 0058 c70001 ld _SCIRX_Watchdog,a
759 005b 84 pop a
760 005c c70002 ld _SCIRX_Watchdog+1,a
761 ; 325 if (SCIRX_Watchdog == 0) MotorStatus |= SCI_FAILURE; //SetMotorStatus(SCI_FAILURE);
763 005f c60002 ld a,_SCIRX_Watchdog+1
764 0062 2607 jrne L762
765 0064 ce0001 ld x,_SCIRX_Watchdog
766 0067 2602 jrne L762
769 0069 1a00 bset _MotorStatus,#5
770 006b L762:
771 ; 327 if (SCI_TxDelay_Timer != 0)
773 006b c60000 ld a,_SCI_TxDelay_Timer
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -