summaryrefslogtreecommitdiff
path: root/ports/rxv1/ccrx/src/tx_timer_interrupt.src
diff options
context:
space:
mode:
Diffstat (limited to 'ports/rxv1/ccrx/src/tx_timer_interrupt.src')
-rw-r--r--ports/rxv1/ccrx/src/tx_timer_interrupt.src100
1 files changed, 51 insertions, 49 deletions
diff --git a/ports/rxv1/ccrx/src/tx_timer_interrupt.src b/ports/rxv1/ccrx/src/tx_timer_interrupt.src
index 1236ec95..a9c4918c 100644
--- a/ports/rxv1/ccrx/src/tx_timer_interrupt.src
+++ b/ports/rxv1/ccrx/src/tx_timer_interrupt.src
@@ -50,7 +50,7 @@
;/* FUNCTION RELEASE */
;/* */
;/* _tx_timer_interrupt RXv1/CCRX */
-;/* 6.1.8 */
+;/* 6.1.9 */
;/* AUTHOR */
;/* */
;/* William E. Lamie, Microsoft Corporation */
@@ -87,6 +87,8 @@
;/* DATE NAME DESCRIPTION */
;/* */
;/* 08-02-2021 William E. Lamie Initial Version 6.1.8 */
+;/* 10-15-2021 William E. Lamie Modified comment(s), */
+;/* resulting in version 6.1.9 */
;/* */
;/**************************************************************************/
;VOID _tx_timer_interrupt(VOID)
@@ -96,7 +98,7 @@ __tx_timer_interrupt:
;
; /* Upon entry to this routine, it is assumed that all interrupts are locked
; out and the stack looks like the following:
-; SP+4 -> Interrupted PC
+; SP+4 -> Interrupted PC
; SP+8-> Interrupted SR
; */
;
@@ -106,38 +108,38 @@ __tx_timer_interrupt:
PUSHM R14-R15
PUSHM R1-R5
- MOV.L #__tx_timer_system_clock, R1 ; Pickup address of system clock
- MOV.L [R1], R2 ; Pickup system clock
- ADD #1, R2 ; Increment system clock
- MOV.L R2,[R1] ; Store new system clock
+ MOV.L #__tx_timer_system_clock, R1 ; Pickup address of system clock
+ MOV.L [R1], R2 ; Pickup system clock
+ ADD #1, R2 ; Increment system clock
+ MOV.L R2,[R1] ; Store new system clock
;
; /* Test for time-slice expiration. */
; if (_tx_timer_time_slice)
; {
;
- MOV.L #__tx_timer_time_slice, R1 ; Pickup address of time slice
- MOV.L [R1], R2 ; Pickup the current time slice
- CMP #0, R2 ; Is a time slice active?
- BEQ __tx_timer_no_time_slice ; No, skip timer slice processing
+ MOV.L #__tx_timer_time_slice, R1 ; Pickup address of time slice
+ MOV.L [R1], R2 ; Pickup the current time slice
+ CMP #0, R2 ; Is a time slice active?
+ BEQ __tx_timer_no_time_slice ; No, skip timer slice processing
;
; /* Decrement the time_slice. */
; _tx_timer_time_slice--;
;
- SUB #1, R2 ; Decrement the time-slice
- MOV.L R2, [R1] ; Store time-slice
+ SUB #1, R2 ; Decrement the time-slice
+ MOV.L R2, [R1] ; Store time-slice
;
; /* Check for expiration. */
; if (__tx_timer_time_slice == 0)
;
- CMP #0, R2 ; Has it expired?
- BNE __tx_timer_no_time_slice ; No, time-slice has not expired
+ CMP #0, R2 ; Has it expired?
+ BNE __tx_timer_no_time_slice ; No, time-slice has not expired
;
; /* Set the time-slice expired flag. */
; _tx_timer_expired_time_slice = TX_TRUE;
;
- MOV.L #__tx_timer_expired_time_slice, R1 ; Pickup address of expired time-slice
- MOV.L #1, R2 ; Build expired value
- MOV.L R2, [R1] ; Set expired time slice variable
+ MOV.L #__tx_timer_expired_time_slice, R1 ; Pickup address of expired time-slice
+ MOV.L #1, R2 ; Build expired value
+ MOV.L R2, [R1] ; Set expired time slice variable
; }
;
__tx_timer_no_time_slice:
@@ -146,20 +148,20 @@ __tx_timer_no_time_slice:
; if (*_tx_timer_current_ptr)
; {
;
- MOV.L #__tx_timer_current_ptr, R1 ; Pickup address of current timer ptr
- MOV.L [R1], R2 ; Pickup current pointer
- MOV.L [R2+], R1 ; pickup timer list entry, _tx_timer_current_ptr++
- CMP #0, R1 ; Is timer pointer NULL?
- BEQ __tx_timer_no_timer ; Yes, no timer has expired
+ MOV.L #__tx_timer_current_ptr, R1 ; Pickup address of current timer ptr
+ MOV.L [R1], R2 ; Pickup current pointer
+ MOV.L [R2+], R1 ; Pickup timer list entry, _tx_timer_current_ptr++
+ CMP #0, R1 ; Is timer pointer NULL?
+ BEQ __tx_timer_no_timer ; Yes, no timer has expired
;
; /* Set expiration flag. */
; _tx_timer_expired = TX_TRUE;
;
- MOV.L #__tx_timer_expired,R2 ; Build address of expired flag
- MOV.L #1, R1 ; Build expired value
- MOV.L R1, [R2]
- BRA __tx_timer_done ; Finished with timer processing
+ MOV.L #__tx_timer_expired,R2 ; Build address of expired flag
+ MOV.L #1, R1 ; Build expired value
+ MOV.L R1, [R2]
+ BRA __tx_timer_done ; Finished with timer processing
;
; }
; else
@@ -174,22 +176,22 @@ __tx_timer_no_timer:
; /* Check for wrap-around. */
; if (_tx_timer_current_ptr == _tx_timer_list_end)
;
- MOV.L #__tx_timer_list_end, R1 ; Pickup the timer list end ptr
- MOV.L [R1], R1 ; Pickup actual timer list end
- CMP R1, R2 ; Are we at list end?
- BNE __tx_timer_skip_wrap ; No, don't move pointer to the
- ; top of the list
+ MOV.L #__tx_timer_list_end, R1 ; Pickup the timer list end ptr
+ MOV.L [R1], R1 ; Pickup actual timer list end
+ CMP R1, R2 ; Are we at list end?
+ BNE __tx_timer_skip_wrap ; No, don't move pointer to the
+ ; top of the list
;
; /* Wrap to beginning of list. */
; _tx_timer_current_ptr = _tx_timer_list_start;
;
- MOV.L #__tx_timer_list_start, R2 ; Pickup the timer list start ptr
- MOV.L [R2], R2 ; Pickup the start of the list
+ MOV.L #__tx_timer_list_start, R2 ; Pickup the timer list start ptr
+ MOV.L [R2], R2 ; Pickup the start of the list
; }
;
__tx_timer_skip_wrap:
MOV.L #__tx_timer_current_ptr,R1
- MOV.L R2, [R1] ; store in updated pointer in _tx_timer_current_ptr
+ MOV.L R2, [R1] ; Store in updated pointer in _tx_timer_current_ptr
__tx_timer_done:
;
@@ -198,25 +200,25 @@ __tx_timer_done:
; {
;
MOV.L #__tx_timer_expired_time_slice, R1 ; Pickup expired time slice addr
- MOV.L [R1], R1 ; Pickup expired time slice
- MOV.L #__tx_timer_expired, R2 ; Pickup expired timer flag address
- MOV.L [R2], R2 ; Pickup actual flag
- OR R1, R2 ; Or flags together
- BEQ __tx_timer_nothing_expired ; If Z set, nothing has expired
+ MOV.L [R1], R1 ; Pickup expired time slice
+ MOV.L #__tx_timer_expired, R2 ; Pickup expired timer flag address
+ MOV.L [R2], R2 ; Pickup actual flag
+ OR R1, R2 ; Or flags together
+ BEQ __tx_timer_nothing_expired ; If Z set, nothing has expired
__tx_something_expired:
; /* Did a timer expire? */
; if (_tx_timer_expired)
; {
- MOV.L #__tx_timer_expired,R1 ; Pickup expired flag address
- MOV.L [R1], R1 ; Pickup expired flag
- CMP #0,R1 ; Is the expired timer flag set?
- BEQ __tx_timer_dont_activate ; No, skip timer activation
+ MOV.L #__tx_timer_expired,R1 ; Pickup expired flag address
+ MOV.L [R1], R1 ; Pickup expired flag
+ CMP #0,R1 ; Is the expired timer flag set?
+ BEQ __tx_timer_dont_activate ; No, skip timer activation
;
; /* Process timer expiration. */
; _tx_timer_expiration_process();
;
- BSR __tx_timer_expiration_process ; Call the timer expiration handling routine
+ BSR __tx_timer_expiration_process ; Call the timer expiration handling routine
;
; }
__tx_timer_dont_activate:
@@ -226,14 +228,14 @@ __tx_timer_dont_activate:
; {
;
MOV.L #__tx_timer_expired_time_slice, R1 ; Pickup time-slice expired flag addr
- MOV.L [R1], R1 ; Pickup actual flag
- CMP #0,R1 ; Has time-slice expired?
- BEQ __tx_timer_not_ts_expiration ; No, skip time-slice expiration
+ MOV.L [R1], R1 ; Pickup actual flag
+ CMP #0,R1 ; Has time-slice expired?
+ BEQ __tx_timer_not_ts_expiration ; No, skip time-slice expiration
;
; /* Time slice interrupted thread. */
; _tx_thread_time_slice();
- BSR __tx_thread_time_slice ; Call time-slice processing
+ BSR __tx_thread_time_slice ; Call time-slice processing
; }
;
__tx_timer_not_ts_expiration:
@@ -243,7 +245,7 @@ __tx_timer_nothing_expired:
POPM R1-R5
POPM R14-R15
;
- RTS ; return to point of interrupt
+ RTS ; Return to point of interrupt
;
;}