| Purpose: | Print the number of times the main() system loop executed during the the prior second. |
| Assumes: | Nothing. |
| Passed: | Nothing. |
| Returns: | R23:R22 WORD wLastHz the wTixLastSecond value that was printed |
| Alters: | R18, R20, R21, the FLAGs (SREG) and the COM1 Transmit buffer |
| Example: |
|
| Test it: |
|
| Notes: | Note in the example above that the very same value was reported on two or three lines when the calls were made in quick succession. That is not an error. |
| The main() loop count totalizer is stored in R3:R2 and, as would be expected, incremented each pass through the main() loop. | |
| When the system clock milliseconds counter rolls past one thousand (1,000) milliseconds, it increments ulT0_Seconds, the value in R3:R2 is moved to wTixLastSecond, and R3:R2 is reset to zero. This is an Operating System feature which cannot be disabled. | |
| The System WORD Variable wTixLastSecond is maintained at address 0x01D6 in SRAM. | |
| If the number of loops through main() so far during the current second is desired, simply read the WORD value in R3:R2. | |
| Dropin: (setup code) |
; Setup for the PrintMainProgramHz() call: ; Passed: Nothing. ; Returns: R23:R22 WORD wLastHz the wTixLastSecond value that was printed ; Alters: R18, R20, R21, the FLAGs, and the COM1 Transmit Buffer |
| Also see: | The PrintAllAINs and PrintScriptProgramHz System Functions. |
| The BIT_RTC_SEC_PRG_HZ BIT in EEbFlags_RTC causes this function to be called automatically once each second. |