9Eh AM$ENTR call ALARM application
Input B register - Function number.
Output depends on function, see below.
Description

Provides an entry point into the LZ ALARM routines.

The availible functions are:

  • Function 0 - Initialise. This clears all alarms and enables alarm checking by setting AMB_EI.
  • Function 1 - Calls the ALARM application as from the top level. Sets the screen to four line mode. Allows alarms to be viewed and set. On exit restores the screen to previously set mode.
  • Function 2 - Checks for Diary and ordinary alarms due now and in the next 34mins and 8 secs. If an alarm is due it will go off. At most one Diary and two ordinary alarms will go off. The function then checks for an alarm due in the next 2048 seconds. If an alarm of any type is due the routine returns with carry set and D contains the number of seconds before the next alarm. (Note - 2<=D<2048). If no alarm is due in that time carry is clear on exit.
    Note: if AMB_EI is clear this function does nothing.
    Output Values:
    • Carry clear: No Alarm due in the next 2048s
    • Carry set: An alarm is due in the next 2048s.
    • If Carry is set, D register - number of seconds before alarm
  • Function 3 - Tests for Diary and ordinary alarm due now. If one is due it will go off. At most one Diary and one ordinary alarm will go off.
    Note: if AMB_EI is clear this function does nothing.
  • Function 4 - Checks for unacknowleged diary alarms. This does the 'Review missed alarms' screen on switch-on. It checks for any DIARY alarms that have gone off but were not acknowleged by pressing ON/CLEAR. If there are any it displays a screen showing how many were missed and will review them. The existing screen is preserved.
    Note: if AMB_EI is clear this function does nothing.
  • Function 5 - Turns alarms off. This function preserves AMB_EI by copying it to AMB_SEI and then clears it. This disables functions 2,3 & 4 above. Care should be taken with this routine since it cannot be called again without restoring AMB_EI other wise alarms will be disabled until AMB_EI is set 'by hand'.
  • Function 6 - Restores alarm. This copies AMB_SEI back to AMB_EI, effectively restoreing the alarm checking.

This call is not available on CM/XP machines.

Example
example
Errors - none -