SYSTEM$
Returns system status and configuration information.
Usage:
|
M = VAL(SYSTEM$("AVAILABLE MEMORY"))
PRINT "Version " & SYSTEM$("VERSION:HTBasic")
PRINT SYSTEM$("PRINTER NAME")
|
Description:
SYSTEM$ returns system information in a string. The information returned depends on which of the following strings is specified in the SYSTEM$ command.
BackPorting to HP BASIC. Minor differences in some SYSTEM$ responses exist where appropriate to reflect hardware or operating system differences.
"AVAILABLE MEMORY"
Returns the available memory in bytes. In most cases the FRE function is easier to use. The amount of available memory when HTBasic is started can be specified with a command line switch. See FRE.
CRT ID
Returns a twelve character CRT identification string. A space in a position indicates that capability is not present.
Bytes
|
Meaning
|
1
|
always "6".
|
2
|
always ":".
|
3-5
|
CRT width, for example " 80".
|
6
|
"H" if at least one display enhancement is supported, i.e. inverse, blink, underline. Not all CRTs support all enhancements.
|
7
|
"C" if colors are available in at least one screen mode.
|
8
|
"G" if graphics are available.
|
9
|
"B" if the display is bit-mapped.
|
10-12
|
|
"DISP LINE"
The present content of the display line is returned. This allows you to write subroutines that temporarily save off the display line content, DISP something else and then restore the display line.
SYSTEM$("DISP LINE") is a new HTBasic function that is not available in HP BASIC. It should not be used in programs that must be ported back to HP BASIC.
"DUMP DEVICE IS"
"GRAPHICS INPUT IS"
"GFONT IS"
Returns a string specifying the current GFONT IS font.
"KBD LINE"
Returns a string whose content is the same as the current keyboard input line.
"KEYBOARD LANGUAGE"
Returns a string identifying foreign language keyboards. On some computers, it is not possible for HTBasic to know the keyboard type. On these systems "ASCII" is returned regardless of the actual keyboard.
"LEXICAL ORDER IS"
Returns the current language set by the LEXICAL ORDER IS command. "ASCII" is the default.
"MASS MEMORY"
Returns a sixteen character string identifying types and numbers of mass storage devices attached. On some computers, this information is not available to HTBasic. On these systems, "0" is returned for each device type. If the number of devices of any type exceeds nine, "*" is returned in that byte position.
Bytes
|
Meaning
|
1
|
number of internal disk drives.
|
2-4
|
not assigned.
|
5
|
number of initialized EPROM cards (always 0).
|
6
|
number of bubble memory cards (always 0).
|
7-16
|
not assigned.
|
"MASS STORAGE IS or MSI"
Returns the current device and directory. MSI is an abbreviation for MASS STORAGE IS and returns the same information.
"PLOTTER IS"
Returns a string specifying the current PLOTTER IS device.
"PRINTALL IS"
Returns a string specifying the current PRINTALL IS device.
"PRINTER IS"
Returns a string specifying the current PRINTER IS device.
"PRINTER NAME"
Returns the current description of the driver currently assigned as the PRINTER IS device. If this driver is the WIN-PRINT driver, it returns the printer description.
"PROCESS ID"
Under multitasking operating systems such as NT, this call returns the process ID of HTBasic. Under single-tasking operating systems such as DOS, this call always returns "0".
"PROCESSOR AFFINITY"
Returns the current processor affinity mask. To set the processor affinity, use CONFIGURE SYSTEM(“PROCESSOR AFFINITY;mask_value”, where mask_value is a decimal number whose binary equivalent is a "bit mask" for selecting processor cores . For example, to select processors 3 and 1, use a decimal value of 5 (binary '0101'). To set the processor affinity to just processor 3, you would use a decimal value of 4 (binary '0100', where the third bit indicates processor 3).
"SERIAL NUMBER"
Returns a string containing your License Serial Number. It is the twelve character string you entered during installation or activation.
"SYSTEM ID"
Returns an ID string that is unique to your systems hardware configuration.
"SYSTEM PRIORITY"
Returns a string containing the current system priority. Use VAL(SYSTEM$("SYSTEM PRIORITY")) to retrieve the priority as a numeric value.
"TIMEZONE IS"
Under operating systems like Windows, which store the local time in the real time clock, this call always returns "0". Under operating systems like UNIX, which store Greenwich Mean Time in the real time clock, this call returns the number of seconds difference between your local time and GMT. Negative values represent timezones west of Greenwich.
"TRIG MODE"
Returns the current trigonometric mode, "DEG" for degrees and "RAD" for radians.
"VERSION:BASIC"
Returns a string containing the HP BASIC version number emulated, i.e., "5.1", "6.2", etc.
"VERSION:HTB"
Returns a string containing HTBasic version information.
This function can be useful for programs that run on both HP BASIC and HTBasic systems, enabling them to determine which system they are currently running on. The following example sets a variable according to the system running the program:
SUB Which_system
COM /Which_system/Htbasic,Hpbasic
IF SYSTEM$("VERSION:HTB")="0" THEN
Hpbasic=1
ELSE
Htbasic=1
END IF
SUBEND
VERSION:OS
Returns a string containing operating system revision information. The string is of the form "x.yy Windows" and under NT it is "x.yy Windows NT". X is the major revision and yy is the minor revision.
VERSION:bin-name
Returns a string containing the version number of the binary named. Replace bin-name with the name of the binary of interest. LIST BIN can be used to see the version numbers for all loaded binaries.
WILDCARDS
Returns "OFF:" if wild-carding is turned off. This function always returns "ON:". See WILDCARDS.
WINDOW SYSTEM
Returns "Console" under most versions of HTBasic. Under some versions it returns the name of the current screen driver. See PLOTTER IS for an explanation of screen drivers.
See Also: