OS_Nq, Enquire

Register parameters

RST 20H, DEFB $66
IN:
     BC = enquiry 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

Available Reason Codes

The list below shows which data that can be polled from OS_Nq.

In the description of each reason code which follow, only successful calls are considered. In some cases it is possible that other error codes will be returned. With luck this should be clear from the context. Details of these calls are specified in subsequent pages.

Window management

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

Process Management

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
NQ_Voz ($861E), application verifies running OZ version (OZ 4.5 and newer)
NQ_Roz ($8621), read OZ revision number (OZ 4.5 and newer)
NQ_Btl ($8624), read battery status (OZ 4.5 and newer) 

Memory Management

NQ_Mfs ($8900), read free space information (system use only)
NQ_Slt ($8903), read slot type information (system use only)
NQ_Mfp ($8906), get total of free RAM pages in slot (OZ 4.2 and newer)
NQ_Mup ($8909), get memory used in pool (OZ 5.0 and newer)
NQ_Mnt ($890C), fetch mount status (OZ 5.0 and newer)

Director and CLI

NQ_Dev ($8C00), fetch current device
NQ_Dir ($8C03), fetch current directory
NQ_Fnm ($8C06), fetch current filename match string

Director and CLI handles

NQ_Dmh ($8C09), fetch Director special memory handle (system use only)
NQ_Inp ($8C0C), read std. input handle
NQ_Out ($8C0F), read std. output handle
NQ_Prt ($8C12), read printer stream handle
NQ_Tin ($8C15), read input-T handle
NQ_Tot ($8C18), read output-T handle
NQ_Tpr ($8C1B), read printer-T stream handle
NQ_Chn ($8C1E), read comms handle

Panel and Printer Editor values

All the Panel and Printer Editor codes can be used to read values via OS_Nq in the following manner:


IN:
     BC = PA_xxx
     A = number of bytes to read
     DE = buffer for bytes to be read
OUT:
     A = number of bytes actually read

SI_SFT calls OS_Nq in an undocumented way for reading Panel settings.

In: A is not set before call.
DE is set to 2.

Out: Result is picked up in E or possibly DE for two-byte returns.

Please refer to OS_Sp for Panel and Printer Editor value parameter reason codes.

Bugs

This call may fail if called from segment 2 (fixed since OZ 4.7).

Related calls

DC_Sp, DC specify
DC_Nq, DC enquire
OS_Sp, specify

web analytics