Example: |
AnyKeypressExits:
CALL ACOM1_GetRxCount ; Received characters accrue while processing
MOV R18, R24 ; a command; get the current buffered count
Loop: ; Compare R30, R27:R26, and R25:R24:R23:R22
CALL ASystemSecondsLowBYTE ; Obtain the Low Order BYTE
MOV R30, R24
CALL ASystemSecondsLowWORD ; Obtain the Low Order WORD
MOVW R26, R24
CALL ASystemSeconds ; Obtain the complete ULONG value
CALL ADumpRegs_Begin ; View all the Registers' contents
CALL ACOM1_GetRxCount ; Get the new buffered (received) byte count
CP R24, R18 ; Compare to see if the received count changed
BREQ ALoop ; If not, loop back, otherwise exit (so it's
RET ; when ANY character has been received)
|
Notes: |
The Operating System updates the UNSIGNED LONG variable
ulT0_Seconds,
for which the range of values is 0 to 4,294,967,295 Seconds. It will
automatically roll over upon reaching its maximum value, but that would
take a little over 136 years, if left unmodified! The
ulT0_Seconds value may be read directly and changed, if there is any
reason for it. |