| Purpose: | Print the number of times the Command Script processor either checked or executed a Script command during the the prior second. |
| Assumes: | Nothing. |
| Passed: | Nothing. |
| Returns: | R23:R22 WORD wLastHz the wLastScriptHz value that was printed |
| Alters: | R18, R20, R21, the FLAGs (SREG) and the COM1 Transmit buffer |
| Example: |
|
| Test it: |
|
| Notes: | Note the reported cycles is "1" in the example above, even though no Command Script needed to be executed in the prior second. Upon entry to the Script logic, it checks whether there is any Script to execute. If there is none at that moment, the Script processing logic itself turns the BIT_SM_SCRIPT System Mode BIT off in order not to waste time checking for a Script for the remainer of that second. This means when there is no Script to be run, the Script processor actually does run precisely once each second. |
| The BIT_SM_SCRIPT BIT is contained in EEbSystemMode BYTE. | |
| The unit Serial Number must be valid for ANY Script to be processed. If it is not, all System Modes (i.e., all those enabled with the EEbSystemMode BYTE) are disabled, but the Command Processor is still enabled. | |
| Dropin: (setup code) |
; Setup for the PrintScriptProgramHz() call: ; Passed: Nothing. ; Returns: R23:R22 WORD wLastHz the wLastScriptHz value that was printed ; Alters: R18, R20, R21, the FLAGs, and the COM1 Transmit Buffer |
| Also see: | The PrintAllAINs and PrintMainProgramHz System Functions and the Command Scripts System Feature. |
| The BIT_RTC_SEC_SCRIPT_HZ in EEbFlags_RTC causes this function to be called automatically once each second. |