This is the correct way into the LZ notepad from machine code - do not
search the main menu for "Notes" and its address, as its name changes
in multi-lingual versions.
All four functions begin by clearing the diary's paste buffer which is
used in the notepad editor to save the current find string. The block
file type and the cell type are then initialised for Notepad editing.
After the required function has been called, the block file type and cell
type are set up for OPL editing again.
The following functions are available:
- Function 0 - Initialise notepad. This is called on cold booting the
LZ. It inserts the name "Notepad:" into the cell, sets the cursor to
the first editable character, clears the system variable NTB_PSSW for
no password, sets ntb_flgs=8 for no numbering, name not capitalized,
do title line and exit when ON/CLEAR pressed.
- Function 1 - Call the notepad as from the top-level menu option "Notes".
- Function 2 - Search first the current notepad and then all saved notepads
for a given string. Saved notepads are searched in device order A:,
B:, C:. This function 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 line of the screen, and the user can press
MODE to edit the notepad at this line, EXE to search for the next match,
or ON/CLEAR to abort the search.
Note that password protected notepads are not searched.
- C set: The search went past end of notepad.
- C clear, B=0: ON/CLR pressed, search aborted.
- C clear, B=1: MODE pressed, notepad entered, then left.
- Function 3 - Edit a named notepad as from a top-level notepad menu
item that has been added by the user. If the name is not the same as
that in the notepad cell, the notepad file is searched for on the paks
in order A:, B:, C: and loaded into the cell. Any error messages (eg.
File not found, Read pak error) are displayed on detection and no error
codes are returned. UTW_S0 points to the name of the notepad to be edited.
- Function 4 - Checks whether a notepad file is password protected.
UTW_S0 points to the name of the notepad to be edited.
- B register 0 if unprotected
- B register non-zero if protected
- A register has other flags for notepad:
- bit7 - true if numbered
- bit3 - true if on/clear exits editor
- bit2 - true if prompt to be capitalized
- bit1 - true if no title required
This call is not available on CM/XP machines.