A7h DI$ENTR call diary
Input B register - Function number
Output Function 2 only: B register - indicates exit key

This is the correct way into the LZ diary from machine code - do not search the main menu for "Diary" and its address, as its name changes in multi-lingual versions.

All four functions begin by enabling SHIFT-EXE, clearing the diary's paste buffer, setting the time in the diary to the system time and defining the diary UDGs. They all end by disabling the SHIFT-EXE key.

The following functions are available:

  • Function 0 - Initialise diary. This is called on cold booting the LZ. It clears the diary (shrinks the cell to 1 byte length and writes a 0 in it) and sets the "Setup" bytes to their default values (DIB_1SLT=48, DIB_2SLT=56, DIB_3SLT=72, DIB_AP=non-zero).
  • Function 1 - Call the diary as from the top-level menu option "Diary". This enters the week view initially.
  • Function 2 - Search current diary for a given string. This is called by the "Search" option on the "Utils" menu. The find string should be in RTT_FF. If an entry matches it will be printed on the bottom 2 lines of the screen, and the user can press MODE to enter the diary in page mode at this entry, EXE to search for the next match, or ON/CLEAR to abort the search.
    Output Values:
    • C set: The search went past end of diary.
    • C clear, B=0: ON/CLR pressed, search aborted.
    • C clear, B=1: MODE pressed, diary entered, then left.
  • Function 3 - Display the monthly calendar, as from the top-level menu option "Month". This will have the same menu available as in the week view, and you can enter the day page with EXE.

This call is not available on CM/XP machines.

Errors - none -