Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

This section explains how to manipulate system parameters, i.e. from the Panel, the Printer Editor and other system resources. The rest of this section displays useful routines which does not conveniently fit in any of the other sections. 

System resource parameters

These parameters are divided into 5 groups. Their mnemonic identifier is a 16bit identifier code where the high byte of the code identifies the related group:

$80xx       PANEL system parameters (timeout, baud rates, date format...)
$83xx       Window management parameters.
$86xx       Process management parameters.
$89xx       Memory management parameters.
$8Cxx       Director/CLI parameters.

Enquiries 

The OS_Nq call is used to read the system parameters, including information on the screen, memory, available streams and settings from the Panel and Printer Editor. A call is made by loading the BC register with a reason code (the system parameter mnemonic) and the other registers with values specific to that reason code. Register changes and output specifications are different for each reason code.

Here is the call specification:

 

Code Block
languagenone
titleOS_Nq, enquire
RST 20H, DEFB $66

IN:
            BC = reason code
            ADEHLIX parameters
 
OUT if call succeeded:
            Fc = 0
            Depends on BC and other arguments
 
Out if call failed:
            Fc = 1
            A = return code:
                        RC_BAD ($04), incorrect reason code or parameters
                        RC_UNK ($03), unknown request

Window Management 

The following enquiry calls are for fetching low level window information:

NQ_WBOX (BC = $8300), return window information NQ_WCUR (BC = $8303), return cursort information NQ_RDS (BC = $8306), read text from the screen

The above window enquiry calls are described in detail in the OS_Nq call specification. 

Process Management

The following codes return system handles in IX:

NQ_Ain ($8600)          Application enquiry (system use only)
NQ_Khn ($8603)          read keyboard handle (use ":INP" device instead)
NQ_Shn ($8606)          read screen handle (use ":SCR" device instead)
NQ_Phn ($8609)          read printer indirected handle
NQ_Nhn ($860C)          read null handle (use ":NUL" device instead)
NQ_Wai ($860F)          Who am I? (system use only)
NQ_Com ($8612)          read comms handle (use ":COM" device instead)
NQ_Ihn ($8615)          read IN handle (use ":INP" device instead)
NQ_Ohn ($8618)          read OUT handle (use ":OUT" device instead)
NQ_Rhn ($861B)          read direct printer handle

...