<< Back

cesky: , English:

SYSTEM

System functions

Note: Files StdOut and StdIn (standard input and output) are only prepared, but not yet used by the system. Input and output of programs cannot be redirected.


SysGetInt - get current interrupt handler address

INPUT:
CL = interrupt number (0..255)

OUTPUT:
AX = current interrupt handler address
CY = segment has not default value, need use SysGetInt32

NOTES: It temporaly disables interrupts.


SysSetInt - set new interrupt handler address

INPUT:
AX = new interrupt handler address
CL = interrupt number (0..255)

NOTES: It temporaly disables interrupts.


SysGetInt32 - get current interrupt handler address 32-bit

INPUT:
CL = interrupt number (0..255)

OUTPUT:
DX:AX = current interrupt handler address

NOTES: It temporaly disables interrupts.


SysSetInt32 - set new interrupt handler address 32-bit

INPUT:
DX:AX = new interrupt handler address
CL = interrupt number (0..255)

NOTES: It temporaly disables interrupts.


TokenUp - uppercase token

INPUT:
SI = token (1 byte length + N bytes text)


Tokenize - tokenize text

INPUT:
CX = length of text (should be max. 128)
SI = buffer with text
DI = destinaton buffer for tokens (min. size CX + 1)

OUTPUT:
AX = number of tokens

NOTES: Text is packed into tokens: 1 byte length + N bytes text. Quotation and apostrophe marks are removed.


InputText - input text from user (till Enter)

INPUT:
AX = old length of text
CX = max. length of text
DI = destination buffer

OUTPUT:
AX = new length of text in buffer


GetStdOut - get StdOut file (standard output)

OUTPUT:
BX = pointer to FILE structure with StdOut file


GetStdIn - get StdIn file (standard input)

OUTPUT:
BX = pointer to FILE structure with StdIn file


StdOutTextStr - output TEXT to StdOut file (currently unsupported)

INPUT:
BX = pointer to
TEXT structure


ExecCmd - execute command

INPUT:
CX = length of text (max. 128 chars)
SI = buffer with text

OUTPUT:
CY = error, command not found


Command - execute command shell interpreter

INPUT:
BX =
TEXT with command to execute (NULL = prompt user)

NOTES: Destroys all registers, does not return and initializes memory.


KernelCheck - check system integrity

NOTES:
Halts on kernel CRC error.


GetCommandLine - get command line

OUTPUT:
CX = length of command line
DX = number of tokens
SI = command line
DI = token line


SysVer - get system version

OUTPUT:
AL = version major number
AH = version minor number
BX = version
CTEXT
DX =
system ID (SYSVER_ID)
SI = kernel info table
KERNINFO


Exit - return to system from application


kernel info table KERNINFO:

KINFO_InitCode: (word) init code start
KINFO_InitConst: (word) init constant data start
KINFO_Code: (word) code start
KINFO_Const: (word) constant data start
KINFO_Data: (word) data start
KINFO_End: (word) kernel end


System version:

SYSVER_MAJ: (=1) version MAJOR
SYSVER_MIN: (=0) version MINOR
SYSVER_TXT: (="1.0") version in text format
SYSVER_ID: (=384Ch) Litos 8 magic

COMMAND_MAX EQU 127 ; max. length of command line


Source code SYSTEM.ASM

<< Back