[Front] [Prev Chapter]
[Next Chapter]
NOTE: For brevity, the value AX=2780H is not listed in the entry parameters for each function.
The value in register CX identifies the individual functions, with CL being the module number (see Table 2-1) and CH the function within a module. The first call you make must be the Installation Check (see "Installation Check" on page 2-14), to verify that the multitasker is present.
Many of the INT 2F / AX=2780H calls take parameters in other registers. Some of these use the 32-bit general purpose registers. This should cause you no difficulty so long as you direct the assembler to accept 32-bit registers and operands. Parameters that are pointers are sometimes passed as 32-bit linear addresses, not segment:offset pairs. You can convert a segment:offset pair to a linear address by calculating segment*16+offset.
|
CL Hex
|
Module
|
|---|---|
|
01
|
Supervisor (SUP)
|
|
02
|
Real Time Monitor (RTM)
|
|
03
|
Memory (MEM)
|
|
04
|
Domains (DOM)
|
|
05
|
Virtual Machines (VM)
|
Installation Check
Function
Check whether the multitasker is resident. Entry Parameters
|
Register
|
Value
|
|---|---|
|
AX
|
2780H
|
|
CX
|
1101H
|
|
Register
|
Value
|
|---|---|
|
CX
|
00H - Multitasker resident 1101H - Multitasker not resident
|
|
EBX
|
Version (if CX=0)
|
If the multitasker is present, its version number is returned in BX. The initial release is version 1.00, corresponding to the value 0100H in BX.
|
Register
|
Value
|
|---|---|
|
CX
|
2502H
|
|
Register
|
Value
|
Meaning
|
|---|---|---|
|
ECX
|
Error code: 00H - No error 3EH - E_CritOverrun
|
>255 CritEnters
|
You can call X_CritEnter again while inside a critical region. If you do, you must call X_CritExit the same number of times you called X_CritEnter. The system maintains a count of the number of times you have entered, and only allows other processes to run when it reaches zero again.
The only error possible is that the count may overflow and generate the E_CritOverrun error.
Critical regions are similar to mutexes, but should be used only for truly time-critical operations, because they completely disable all other processes. While your process is in a critical region, it can call other system functions, but it cannot suspend or terminate itself. If it calls functions to do either of these they will not take effect until after the X_CritExit call.
See Also: X_CritExit, X_MXCreate
NOTE: The industry-standard call INT 2FH / AX=1681H is also supported by the multitasker, and is the preferred method.
|
Register
|
Value
|
|---|---|
|
CX
|
2602H
|
|
Register
|
Value
|
Meaning
|
|---|---|---|
|
ECX
|
Error code: 00H - No error 3DH - E_CritUnderrun
|
No CritEnter
|
If you were not in a critical region when you called X_CritExit, it returns an E_CritUnderrun error.
See Also: X_CritEnter
NOTE: The industry-standard call INT 2FH / AX=1682H is also supported by the multitasker, and is the preferred method.
|
Register
|
Value
|
|---|---|
|
CX
|
1003H
|
|
DS:EDX
|
Pointer to a Descriptor Parameter Block; see "Explanation"
|
|
Register
|
Value
|
Meaning
|
|---|---|---|
|
EBX
|
=DESC_PB_SEL
|
Selector
|
|
ECX
|
Error code: 00H - No error 31H - E_BadDesc 32H - E_NoDesc
|
Invalid DESC_PB_SINFO No free descriptors
|
|
DS:[EDX]
|
DESC_PB_SEL
|
Selector
|
The parameter block is defined in STRUCS.DEF as follows:.
|
DESC_PBLK
|
struc
|
|
|
DESC_PB_BASE
|
dd
|
?
|
|
DESC_PB_LIMIT
|
dd
|
?
|
|
DESC_PB_SEL
|
dw
|
?
|
|
DESC_PB_MINFO
|
db
|
?
|
|
DESC_PB_SINFO
|
db
|
?
|
|
DESC_PBLK
|
ends
|
|
Before you call Z_DescAlloc, you must initialize all fields in DESC_PBLK except DESC_PB_MINFO and DESC_PB_SEL, which will be filled with the selector of the allocated descriptor when the function returns successfully. If the size exceeds 1 MB, the granularity will be set to 4 KB, otherwise the segment will have byte granularity. In either case, the DESC_PB_LIMIT you supply must be the limit (size-1) in bytes.
|
Bit
|
Reset
|
Set
|
|---|---|---|
|
0
|
16-bit code or data
|
32-bit code or data
|
|
1
|
Data segment
|
Code segment
|
|
4
|
Allocate from LDT
|
Allocate from LDT
|
|
5,6
|
Privilege level
|
Privilege level
|
Note that data segments are assumed to be writable and expand-up, and code segments to be non-conforming and readable. Call Z_DescFree to deallocate the descriptor when it is no longer needed.
Z_DescFree (1103H)
Function
Release a descriptor. Entry Parameters
|
Register
|
Value
|
|---|---|
|
CX
|
1103H
|
|
DS:EDX
|
Pointer to a Descriptor Parameter Block; see "Z_DescAlloc (1003H)" on page 2-18
|
|
Register
|
Value
|
Meaning
|
|---|---|---|
|
ECX
|
Error code: 00H - No error 31H - E_BadDesc
|
Invalid selector
|
Note that freeing a descriptor renders its selector invalid. The selector must not be loaded into a segment register while the descriptor is freed, or reloaded at a later date.
See Also: Z_DescAlloc, Z_DescGet, Z_MemDescAlloc, Z_DescSet
|
Register
|
Value
|
|---|---|
|
CX
|
1203H
|
|
DS:EDX
|
Pointer to a Descriptor Parameter Block; see "Z_DescAlloc (1003H)" on page 2-18
|
|
Register
|
Value
|
Meaning
|
|---|---|---|
|
ECX
|
Error code: 00H - No error 31H - E_BadDesc
|
Invalid selector
|
See Also: Z_DescAlloc, Z_MemDescAlloc, Z_DescSet
|
Register
|
Value
|
|---|---|
|
CX
|
1303H
|
|
DS:EDX
|
Pointer to a Descriptor Parameter Block; see "Z_DescAlloc (1003H)" on page 2-18
|
|
Register
|
Value
|
Meaning
|
|---|---|---|
|
EBX
|
Selector
|
|
|
ECX
|
Error code: 00H - No error 31H - E_BadDesc
|
Invalid selector or DESC_PB_SINFO
|
See Also: Z_DescAlloc, Z_DescGet, Z_MemDescAlloc
|
Register
|
Value
|
|---|---|
|
CX
|
1504H
|
|
DS:EDX
|
Pointer to a PCREATE_PBLK parameter block; see "X_PCreate (0E02H)" on page 2-126
|
|
Register
|
Value
|
Meaning
|
|---|---|---|
|
EBX
|
Handle
|
Child domain's handle
|
|
CX
|
Error code: 00H - No error xxH - Error codes
|
See Table A-1 on page A-1
|
Z_DomFork may fail at any stage, which requires a limited resource to be allocated. See Table A-1 on page A-1 for a full list of error codes.
See Also: Z_DomTerm, X_PCreate
Z_DomHandleGet (2B02H)
Function
Get the domain of a specified process. Entry Parameters
|
Register
|
Value
|
|---|---|
|
CX
|
2B02H
|
|
EDX
|
Process handle
|
|
Register
|
Value
|
Meaning
|
|---|---|---|
|
EBX
|
Domain handle
|
|
|
ECX
|
Error code: 00H - No error 0BH - E_BadPHandle
|
Process handle is invalid
|
See Also: X_PCreate, X_PHandleGet, Z_PHandleListGet, Z_PNameGet, X_DomHandleGetMy
Get the current domain's handle.
|
Register
|
Value
|
|---|---|
|
CX
|
0204H
|
|
Register
|
Value
|
Meaning
|
|---|---|---|
|
EBX
|
Handle
|
Handle of calling process' domain
|
|
ECX
|
Error code: 00H - No error
|
|
You can get the domain handle of another process, if you know its process handle, by calling Z_DomHandleGet.
See Also: Z_DomHandleGet
|
Register
|
Value
|
|---|---|
|
CX
|
2604H
|
|
EDX
|
Domain handle (0=current domain)
|
|
Register
|
Value
|
Meaning
|
|---|---|---|
|
EBX
|
Free memory
|
|
|
ECX
|
Error code: 00H - No error 36H - E_BadDomain
|
Invalid domain handle
|
See Also: Z_DomMemMaxGet, Z_DomMemMaxSet, X_DomMemUsedGet
|
Register
|
Value
|
|---|---|
|
CX
|
2804H
|
|
Register
|
Value
|
|
|---|---|---|
|
EBX
|
Domain Memory Limit
|
|
|
ECX
|
Error code: 00H - No error
|
|
See Also: X_DomMemFreeGet, Z_DomMemMaxSet, X_DomMemUsedGet
|
Register
|
Value
|
|---|---|
|
CX
|
2904H
|
|
EDX
|
New value for the Domain Memory Limit
|
|
Register
|
Value
|
|
|---|---|---|
|
EBX
|
Old limit
|
|
|
ECX
|
Error code: 00H - No error
|
|
The previous value of the limit is returned in EBX.
See Also: X_DomMemFreeGet, Z_DomMemMaxGet, X_DomMemUsedGet
|
Register
|
Value
|
|---|---|
|
CX
|
0D04H
|
|
DS:EDX
|
Pointer to a BANKMEM_PBLK parameter block; see "Explanation"
|
|
Register
|
Value
|
Meaning
|
|---|---|---|
|
ECX
|
Error code: 00H - No error 36H - E_BadDomain
|
Invalid domain handle
|
You must supply all fields in the parameter block, which is defined as follows:
|
BANKMEM_PBLK
|
struc
|
|
|
BANKM_PB_DOMAIN
|
dd
|
?
|
|
BANKM_PB_LENGTH
|
dd
|
?
|
|
BANKM_PB_SOURCE
|
dd
|
?
|
|
BANKM_PB_DEST
|
dd
|
?
|
|
BANKMEM_PBLK
|
ends
|
|
See Also: Z_DomMemWrite
|
Register
|
Value
|
|---|---|
|
CX
|
2704H
|
|
EDX
|
Domain handle (0=current domain)
|
|
Register
|
Value
|
Meaning
|
|---|---|---|
|
EBX
|
Allocated memory
|
|
|
ECX
|
Error code: 00H - No error 36H - E_BadDomain
|
Invalid domain handle
|
See Also: X_DomMemFreeGet, Z_DomMemMaxGet, Z_DomMemMaxSet
|
Register
|
Value
|
|---|---|
|
CX
|
0E04H
|
|
DS:EDX
|
Pointer to a BANKMEM_PBLK parameter block; see "Z_DomMemRead (0D04H)" on page 2-30
|
|
Register
|
Value
|
Meaning
|
|---|---|---|
|
ECX
|
Error code: 00H - No error 36H - E_BadDomain
|
Invalid domain handle
|
You must supply all fields in the BANKMEM_PBLK parameter block which is defined under Z_DomMemRead.
See Also: Z_DomMemRead
|
Register
|
Value
|
|---|---|
|
CX
|
1204H
|
|
EDX
|
Domain handle (0=current domain)
|
|
Register
|
Value
|
Meaning
|
|---|---|---|
|
EBX
|
Number
|
|
|
ECX
|
Error code: 00H - No error 36H - E_BadDomain
|
Invalid handle
|
As with other functions, you can pass a null domain handle to imply "the current domain."
See Also: X_PTerm, X_PCreate, Z_PHandleListGet
|
Register
|
Value
|
|---|---|
|
CX
|
2104H
|
|
EDX
|
Domain handle (0=current domain)
|
|
Register
|
Value
|
Meaning
|
|---|---|---|
|
EBX
|
Process Handle Error code: 00H - No error 36H - E_BadDomain
|
|
|
ECX
|
Invalid handle
|
As with other functions, you can pass a null domain handle to imply "the current domain."
See Also: X_PCreate, X_DomNProcessesGet
|
Register
|
Value
|
|---|---|
|
CX
|
1304H
|
|
EDX
|
Domain handle
|
|
Register
|
Value
|
Meaning
|
|---|---|---|
|
ECX
|
Error code: 00H - No error 36H - E_BadDomain
|
Invalid handle
|
See Also: X_PSuspend, Z_DomUnsuspend
Z_DomTerm (1604H)
Function
Terminate all processes in the specified domain. Entry Parameters
|
Register
|
Value
|
|---|---|
|
CX
|
1604H
|
|
EDX
|
Domain handle
|
|
Register
|
Value
|
Meaning
|
|---|---|---|
|
ECX
|
Error code: 00H - No error 36H - E_BadDomain
|
Invalid handle
|
See Also: X_PTerm
|
Register
|
Value
|
|---|---|
|
CX
|
1404H
|
|
EDX
|
Domain handle (0=current domain)
|
|
Register
|
Value
|
Meaning
|
|---|---|---|
|
ECX
|
Error code: 00H - No error 36H - E_BadDomain
|
Invalid handle
|
See Also: Z_DomSuspend, X_PSuspend
|
Register
|
Value
|
|---|---|
|
CX
|
1D04H
|
|
EDX
|
Interrupt being cleared (0 to 0FH)
|
|
Register
|
Value
|
|
|---|---|---|
|
ECX
|
Error code: 00H - No error
|
|
See Also: Z_HandlerHWInt
|
Register
|
Value
|
|---|---|
|
CX
|
1C02H
|
|
Register
|
Value
|
Meaning
|
|---|---|---|
|
EBX
|
Flag number
|
|
|
ECX
|
Error code: 00H - No error 2DH - E_NoFlag
|
All flags allocated
|
There is a very limited number of flags available (normally 256), so use them sparingly.
When you no longer need a flag, you can free it by calling Z_FlagFree.
See Also: Z_FlagFree, X_FlagsMaxGet, Z_FlagSet, Z_FlagStatusGet, Z_FlagWait
|
Register
|
Value
|
|---|---|
|
CX
|
1D02H
|
|
EDX
|
Flag number
|
|
Register
|
Value
|
Meaning
|
|---|---|---|
|
EBX
|
Flag number
|
|
|
ECX
|
Error code: 00H - No error 04H - E_BadFlag 2EH - E_FlagBusy
|
No such flag Flag in use
|
Z_FlagFree will not free a flag that is set, or on which a process is waiting. You can call Z_FlagStatusGet to determine the flag's current status.
See Also: Z_FlagAlloc, X_FlagsMaxGet, Z_FlagSet, Z_FlagStatusGet, Z_FlagWait
|
Register
|
Value
|
|---|---|
|
CX
|
0302H
|
|
EDX
|
Flag number
|
|
Register
|
Value
|
Meaning
|
|---|---|---|
|
EBX
|
Flag number
|
|
|
ECX
|
Error code: 00H - No error 04H - E_BadFlag 05H - E_FlagOverrun
|
Invalid flag number Overrun detected
|
If the flag was already set, the overrun counter is incremented and the error code E_FlagOverrun is returned to the ISR. The same code will be returned to the process that eventually calls Z_FlagWait.
See Also: Z_FlagStatusGet, Z_FlagWait, Z_FlagWWTO
|
Register
|
Value
|
|---|---|
|
CX
|
1902H
|
|
EDX
|
Flag number
|
|
Register
|
Value
|
Meaning
|
|---|---|---|
|
EBX
|
Status: 00H - Unused 01H - Flag_Off 02H - Flag_On >2 - Process handle
|
Unallocated Unset Set Unset, process waiting
|
|
ECX
|
Error code: 00H - No error 04H - E_BadFlag
|
Flag number too big
|
See Also: Z_FlagAlloc, Z_FlagFree, X_FlagsMaxGet, Z_FlagSet, Z_FlagWait
|
Register
|
Value
|
|---|---|
|
CX
|
0202H
|
|
EDX
|
Flag number
|
|
Register
|
Value
|
Meaning
|
|---|---|---|
|
ECX
|
Error code: 00H - No error 04H - E_BadFlag 05H - E_FlagOverrun 06H - E_FlagUnderrun
|
Flag number too big Flag has been set twice Someone else is waiting
|
If, at the time of this call, the flag has been set two or more times, the error code E_FlagOverrun is returned. If another process is waiting on the flag, the code E_FlagUnderrun is returned.
The act of calling Z_FlagWait or Z_FlagWWTO resets the flag or decrements the overrun counter. If overrun has occurred, you must call Z_FlagWait or Z_FlagWWTO once for each Z_FlagSet there has been.
See Also: Z_FlagSet, Z_FlagWWTO
|
Register
|
Value
|
|---|---|
|
EBX
|
Timeout count in ticks
|
|
CX
|
2002H
|
|
EDX
|
Flag number
|
If, at the time of this call, the flag has been set two or more times, the error code E_FlagOverrun is returned. If another process is waiting on the flag, the code E_FlagUnderrun is returned.
See Also: Z_FlagSet, Z_FlagWait
|
Register
|
Value
|
|---|---|
|
CX
|
1E02H
|
|
Register
|
Value
|
Meaning
|
|---|---|---|
|
EBX
|
Number of flags
|
|
|
ECX
|
Error code: 00H - No error
|
No error is possible
|
See Also: Z_FlagAlloc, Z_FlagFree, Z_FlagStatusGet
|
Register
|
Value
|
|---|---|
|
CX
|
0801H
|
|
Register
|
Value
|
Meaning
|
|---|---|---|
|
EBX
|
00H xxH
|
Background Foreground
|
|
ECX
|
Error code: 00H - No error
|
No error is possible
|
The user tells the task manager which task to bring to the foreground. The task manager in turn commands the VM and DOM modules to switch the selected domain into the foreground.
While running in the background, applications can read and write video memory and controllers (up to VGA resolution only), but the user will see nothing until they switch your application into the foreground.
If you wait for a keypress or mouse activity while in background, your application will be suspended until it is in the foreground again.
If, while running in the background, you urgently need to display a message to the user, you can call VM functions to do so. You cannot force your domain to the foreground, but you could ask the user to do so by pressing the appropriate task manager hot key combination.
See Also: X_ForeGet
|
Register
|
Value
|
|---|---|
|
CX
|
0B05H
|
|
Register
|
Value
|
Meaning
|
|---|---|---|
|
EBX
|
Handle
|
Domain handle of console owner
|
|
ECX
|
Error code: 00H - No error
|
|
See Also: X_ForeCheck
|
Register
|
Value
|
|---|---|
|
CX
|
2F03H
|
|
DS:EDX
|
Pointer to a Gate Parameter Block; see "Explanation"
|
|
Register
|
Value
|
Meaning
|
|---|---|---|
|
EBX
|
=GATE_PB_GATE
|
Gate selector
|
|
ECX
|
Error code: 00H - No error 31H - E_BadDesc 32H - E_NoDesc
|
Invalid parameters No free descriptors
|
|
DS:[EDX]
|
GATE_PB_GATE
|
Gate selector
|
The parameter block is defined in STRUCS.DEF as follows:
|
GATE_PBLK
|
struc
|
|
|
GATE_PB_SEL
|
dw
|
?
|
|
GATE_PB_COUNT
|
dw
|
?
|
|
GATE_PB_OFFSET
|
dd
|
?
|
|
GATE_PB_GATE
|
dw
|
?
|
|
unused
|
db
|
?
|
|
GATE_PB_SINFO
|
db
|
?
|
|
GATE_PBLK
|
ends
|
|
Before you call Z_GateAlloc, you must initialize all fields in GATE_PBLK except GATE_PB_GATE, which will be filled with the selector of the allocated gate when the function returns successfully.
|
Bit
|
Reset
|
Set
|
|---|---|---|
|
5, 6
|
Privilege level
|
Privilege level
|
Note that this function creates a call gate, not a task, interrupt or trap gate. Call Z_GateFree to deallocate the gate when it is no longer needed.
Z_GateFree (3003H)
Function
Release a call gate. Entry Parameters
|
Register
|
Value
|
|---|---|
|
CX
|
3003H
|
|
DS:EDX
|
Pointer to a Gate Parameter Block; see "Z_GateAlloc (2F03H)" on page 2-50
|
|
Register
|
Value
|
Meaning
|
|---|---|---|
|
ECX
|
Error code: 00H - No error 31H - E_BadDesc
|
Invalid selector
|
See Also: Z_GateAlloc
|
Register
|
Value
|
|---|---|
|
CX
|
0704H
|
|
DS:EDX
|
Pointer to Handler Parameter Block; see "Explanantion"
|
|
Register
|
Value
|
Meaning
|
|---|---|---|
|
ECX
|
Error code: 00H - No error
|
|
|
DS:[EDX]
|
Modified
|
See "Explanation"
|
Z_HandlerHWInt
Z_HandlerHWIntDflt
Z_HandlerIOEx
Z_HandlerPageFault
Z_HandlerSWInt
Z_HandlerVHWInt
Z_HandlerVHWIntDflt
Differences between the functions are explained in the individual function descriptions.
Handlers are themselves level zero protected mode code functions. Before you install a handler, you must obtain a code descriptor and selector for its code segment.
In each case, the function to install the handler takes as a parameter a pointer to the following Handler Parameter Block:
|
HPB
|
struc
|
|
|
|
dw
|
0FFFFH
|
|
|
dw
|
0
|
|
HPB_EIP
|
dd
|
?
|
|
HPB_CS
|
dd
|
?
|
|
|
dd
|
4 dup (?)
|
|
HPB
|
ends
|
|
Before you call the function to install the handler, you must supply the HPB_EIP and HPB_CS fields, which should point to the handler itself.
Handler Interface
All handlers are called with the same stack frame, and handler-specific information in the registers. This information is detailed in the sections describing each handler installation function.
|
EXCEP
|
struc
|
|
|
EX_EDI
|
dd
|
?
|
|
EX_ESI
|
dd
|
?
|
|
EX_EBP
|
dd
|
?
|
|
EX_OPCODE
|
db
|
?,0,0,0
|
|
EX_EBX
|
dd
|
?
|
|
EX_EDX
|
dd
|
?
|
|
EX_ECX
|
dd
|
?
|
|
EX_EAX
|
dd
|
?
|
|
EX_ERROR
|
dd
|
?
|
|
EX_EIP
|
dd
|
?
|
|
EX_CS
|
dw
|
?
|
|
EX_OSINFO
|
dw
|
?
|
|
EX_EFLAGS
|
dd
|
?
|
|
EX_ESP
|
dd
|
?
|
|
EX_SS
|
dw
|
?,?
|
|
EX_ES
|
dw
|
?,?
|
|
EX_DS
|
dw
|
?,?
|
|
EX_FS
|
dw
|
?,?
|
|
EX_GS
|
dw
|
?,?
|
|
EXCEP
|
ends
|
|
EX_OSINFO contains the 386 exception number in its low byte, and flags in its high byte.
|
Bit
|
Use if set:
|
|---|---|
|
0-7
|
386 exception number
|
|
8
|
Processor exception
|
|
9
|
Hardware interrupt
|
|
10
|
Software interrupt
|
The system disables interrupts before calling the handler and restores the previous interrupt state after the handler returns.
General Exception Handler Entry Parameters
General exception handlers are passed the following information in registers:
|
Register
|
Value
|
|---|---|
|
DS:EBX
|
Pointer to Handler Parameter Block
|
|
DL
|
Exception number
|
Return from the Handler
Handlers must return to the address on the stack by executing a
32-bit RETF. If the handler's code segment is 16-bit, it can execute a 32-bit RETF by placing an operand override byte (66H) in front of the RETF instruction. General Exception Handler Exit Codes
General exception handlers must return the following in register AX if they have handled the exception (CF clear):
|
Register
|
Value
|
Meaning
|
|---|---|---|
|
AX
|
0 0FFFEH 0FFFFH
|
Success: return to user Suspend user Terminate user
|
The default General Exception handler reflects exceptions 0 to 5 and 7 to real mode, and terminates the user process for other exceptions.
Z_HandlerHWInt (0804H)
Function
Install a level 0 hardware interrupt handler. Entry Parameters
|
Register
|
Value
|
|---|---|
|
CX
|
0804H
|
|
DS:EDX
|
Pointer to Handler Parameter Block; see "Z_HandlerGenEx (0704H)" on page 2-53
|
|
Register
|
Value
|
Meaning
|
|---|---|---|
|
ECX
|
Error code: 00H - No error
|
|
|
DS:[EDX]
|
Modified
|
As for Z_HandlerGenEx
|
Most details are the same as for Z_HandlerGenEx (see page 2-53) except for the following details of the handler's entry and exit conditions.
|
Register
|
Value
|
|---|---|
|
DS:EBX
|
Pointer to Handler Parameter Block
|
|
DL
|
Interrupt number (must be preserved)
|
|
DH
|
EX_OSINFO (Must be preserved)
|
If a level 0 hardware interrupt handler needs to signal End of Interrupt (EOI) by clearing the PIC's In-Service bit, it must inform the system of this by calling Z_EndOfInterrupt.
Z_HandlerHWIntDflt (1804H)
Function
Install a substitute for the default level 0 hardware interrupt handler. Entry Parameters
|
Register
|
Value
|
|---|---|
|
ECX
|
1804H
|
|
DS:[EDX]
|
Pointer to Handler Parameter Block; see "Z_HandlerGenEx (0704H)" on page 2-53
|
|
Register
|
Value
|
Meaning
|
|---|---|---|
|
CX
|
Error code: 00H - No error
|
|
|
[EDX]
|
Modified
|
As for Z_HandlerGenEx
|
Details are the same as for Z_HandlerHWInt (see page 2-59), except that the last level 0 hardware interrupt handler must not pass the interrupt on; it must clear CF to return to the system.
See Also: Z_EndOfInterrupt, Z_HandlerGenEx, Z_HandlerHWInt, Z_HandlerUnlink
Z_HandlerIOEx (0604H)
Function
Install an I/O exception handler. Entry Parameters
|
Register
|
Value
|
|---|---|
|
CX
|
0604H
|
|
DS:EDX
|
Pointer to Handler Parameter Block; see "Z_HandlerGenEx (0704H)" on page 2-53
|
|
Register
|
Value
|
Meaning
|
|---|---|---|
|
ECX
|
Error code: 00H - No error
|
|
|
DS:[EDX]
|
Modified
|
As for Z_HandlerGenEx
|
|
Register
|
Value
|
|---|---|
|
AL
|
Value to be output, if OUT <port>,AL instruction
|
|
AH
|
Access type. See below
|
|
DS:EBX
|
Pointer to Handler Parameter Block
|
|
DX
|
Port number
|
AL contains the value to be output only if the instruction is a simple 8-bit OUT instruction. For all other OUT and OUTS instructions you must determine the value(s) to be output from the image of the application's registers in the stack frame. The stack frame is described under Z_HandlerGenEx.
AH contains the Access Type flags (which are similar to, but not identical to, the EX_OPCODE field in the stack frame). STRUCS.DEF provides equates for all the used bits.
To test for a string operation, you should use IO_EX_STRING (70H) as a mask and treat any non-zero value as a string operation, although any value other than 70H would indicate a segment override prefix. String operations use EDI/ESI if IO_EX_ADDR is set, otherwise DI/SI. The values for these registers can be read from the stack frame (for example EX_EDI[ebp]), as can the segment registers to be used. The segment register values in the stack frame are protected mode selectors that point to the actual application's segments.
Handler Exit
If the exception has not been handled, set the carry flag to pass it on, otherwise clear it and return the following:
|
Register
|
Value
|
Meaning
|
|---|---|---|
|
AX
|
0 to 0FFH 0FFFEH 0FFFFH
|
Success: see below Suspend user Terminate user
|
If the faulting instruction was an IN AL,DX or IN AL,imm8 return the input value in AL. For all other IN instructions write the input value into the stack frame (EX_AX or EX_EAX) or into memory at ES:(E)DI for INS.
Z_HandlerPCreate (1F04H)
Function
Install a process create handler. Entry Parameters
|
Register
|
Value
|
|---|---|
|
CX
|
1F04H
|
|
DS:EDX
|
Pointer to Handler Parameter Block; see "Z_HandlerGenEx (0704H)" on page 2-53
|
|
Register
|
Value
|
|
|---|---|---|
|
ECX
|
Error code: 00H - No error
|
|
Handlers are level zero protected mode code functions. Before you install a handler, you must obtain a code descriptor and selector for its code segment.
Handler Interface
Handlers are called with the stack frame shown below, and with DS:EBX set to the address of the Handler Parameter Block passed when this handler was installed. Note that the memory above or below this HPB can be used to store data that may be useful to the handler.
Process Create handlers are passed the following information in registers:
|
Register
|
Value
|
|---|---|
|
DS:EBX
|
Pointer to Handler Parameter Block
|
|
CX
|
Create phase: 0 - First phase (initialize) 1 - Second phase (startup)
|
|
SS:EBP
|
Pointer to PCREATE_PBLK
|
The handler is called in the context of the new process' domain. You can check if it is the first process in a new domain by calling X_DomNProcessesGet.
Return from the Handler
Handlers must pass control to the next handler in the chain by setting the CY flag and executing a 32-bit RETF. Z_HandlerPTerm (2004H)
Function
Install a process termination handler. Entry Parameters
|
Register
|
Value
|
|---|---|
|
CX
|
2004H
|
|
DS:EDX
|
Pointer to Handler Parameter Block; see "Z_HandlerGenEx (0704H)" on page 2-53
|
|
Register
|
Value
|
.
|
|---|---|---|
|
ECX
|
Error code: 00H - No error
|
|
Handlers are level zero protected mode code functions. Before you install a handler, you must obtain a code descriptor and selector for its code segment.
Handler Interface
Handlers are called with DS:EBX set to the address of the Handler Parameter Block passed when this handler was installed. Note that the memory above or below this HPB can be used to store data that may be useful to the handler.
|
Register
|
Value
|
|---|---|
|
DS:EBX
|
Pointer to Handler Parameter Block
|
|
CX
|
Termination phase: 0 - First phase (stop) 1 - Second phase (remove)
|
The handler is called in the context of the process being terminated. You can check if it is the last process in a domain by calling X_DomNProcessesGet.
See Also: Z_HandlerGenEx, Z_HandlerPCreate, Z_HandlerUnlink
|
Register
|
Value
|
|---|---|
|
CX
|
0504H
|
|
DS:EDX
|
Pointer to Handler Parameter Block; see "Z_HandlerGenEx (0704H)" on page 2-53
|
|
Register
|
Value
|
Meaning
|
|---|---|---|
|
ECX
|
Error code: 00H - No error
|
|
|
DS:[EDX]
|
Modified
|
As for Z_HandlerGenEx
|
|
Register
|
Value
|
|---|---|
|
CR2
|
Faulting address
|
|
DS:EBX
|
Pointer to Handler Parameter Block
|
|
Register
|
Value
|
Meaning
|
|---|---|---|
|
AX
|
0 0FFFEH 0FFFFH
|
Success: return to user Suspend user Terminate user
|
If the exception is to be passed on, preserve CR2 and return with interrupts disabled.
Z_HandlerSWInt (0404H)
Function
Install a software interrupt handler. Entry Parameters
|
Register
|
Value
|
|---|---|
|
CX
|
0404H
|
|
DS:EDX
|
Pointer to Handler Parameter Block; see "Z_HandlerGenEx (0704H)" on page 2-53
|
|
Register
|
Value
|
Meaning
|
|---|---|---|
|
ECX
|
Error code: 00H - No error
|
|
|
DS:[EDX]
|
Modified
|
As for Z_HandlerGenEx
|
|
Register
|
Value
|
|---|---|
|
DL
|
Interrupt number
|
|
DS:EBX
|
Pointer to Handler Parameter Block
|
|
Register
|
Value
|
Meaning
|
|---|---|---|
|
AX
|
0
|
Return from interrupt
|
If the interrupt is to be reflected to real mode, pass it on. The default handler will do the reflection.
Z_HandlerSwapIn (1B04H)
Function
Install a dispatcher swap-in handler. Entry Parameters
|
Register
|
Value
|
|---|---|
|
CX
|
1B04H
|
|
DS:EDX
|
Pointer to Handler Parameter Block; see "Z_HandlerGenEx (0704H)" on page 2-53
|
|
Register
|
Value
|
Meaning
|
|---|---|---|
|
ECX
|
Error code: 00H - No error
|
|
|
DS:[EDX]
|
Modified
|
As for Z_HandlerGenEx
|
Handlers are themselves protected mode code functions. Before you install a handler, you must obtain a code descriptor and selector for its code segment.
Handler Interface
Swap-in handlers are passed the following information in registers:
|
Register
|
Value
|
|---|---|
|
DS:EBX
|
Pointer to Handler Parameter Block
|
Note that the memory above or below this HPB can be used to store data that may be useful to the handler.
Return from the Handler
Handlers must pass control to the next handler in the chain by setting the carry flag and executing a 32-bit RETF. Z_HandlerSwapOut (1C04H)
Function
Install a dispatcher swap-out handler. Entry Parameters
|
Register
|
Value
|
|---|---|
|
CX
|
1C04H
|
|
DS:EDX
|
Pointer to Handler Parameter Block; see "Z_HandlerGenEx (0704H)" on page 2-53
|
|
Register
|
Value
|
Meaning
|
|---|---|---|
|
ECX
|
Error code: 00H - No error
|
|
|
DS:[EDX]
|
Modified
|
As for Z_HandlerGenEx
|
Handlers are themselves protected mode code functions. Before you install a handler, you must obtain a code descriptor and selector for its code segment.
Handler Interface
Swap Out handlers are passed the following information in registers:
|
Register
|
Value
|
|---|---|
|
DS:EBX
|
Pointer to Handler Parameter Block
|
Note that the memory above or below this HPB can be used to store data that may be useful to the handler.
Return from the Handler
Handlers must pass control to the next handler in the chain by setting the carry flag and executing a 32-bit RETF. Z_HandlerUnlink (1704H)
Function
Uninstall a dispatch, exception, interrupt or process creation handler. Entry Parameters
|
Register
|
Value
|
|---|---|
|
CX
|
1704H
|
|
DS:EDX
|
Pointer to Handler Parameter Block; see "Z_HandlerGenEx (0704H)" on page 2-53
|
|
Register
|
Value
|
Meaning
|
|---|---|---|
|
ECX
|
Error code: 00H - No error 31H - E_BadDesc
|
No PREV handler in chain
|
See Also: Z_HandlerGenEx, Z_HandlerPCreate, Z_HandlerSwapIn
|
Register
|
Value
|
|---|---|
|
CX
|
1904H
|
|
DS:EDX
|
Pointer to Handler Parameter Block; see "Z_HandlerGenEx (0704H)" on page 2-53
|
|
Register
|
Value
|
Meaning
|
|---|---|---|
|
ECX
|
Error code: 00H - No error
|
|
|
DS:[EDX]
|
Modified
|
As for Z_HandlerGenEx
|
Details are the same as for Z_HandlerGenEx (see page 2-53), except for the following details of the handler entry and exit conditions.
|
Register
|
Value
|
|---|---|
|
DS:EBX
|
Pointer to Handler Parameter Block
|
|
DL
|
Interrupt number (must be preserved)
|
|
DH
|
EX_OSINFO (Must be preserved)
|
|
Register
|
Value
|
Meaning
|
|---|---|---|
|
CF
|
Clear
|
Interrupt handled
|
|
AL
|
0 1
|
Return from interrupt Reflect to real mode
|
|
AH
|
0 to 0FH 0FFH
|
Interrupt level Interrupt completed
|
|
DX
|
Unchanged
|
|
See Also: Z_EndOfInterrupt, Z_HandlerGenEx, Z_HandlerUnlink
Z_HandlerVHWIntDflt (1A04H)
Function
Install a substitute for the default virtual hardware interrupt handler. Entry Parameters
|
Register
|
Value
|
|---|---|
|
CX
|
1A04H
|
|
DS:EDX
|
Pointer to Handler Parameter Block; see "Z_HandlerGenEx (0704H)" on page 2-53
|
|
Register
|
Value
|
Meaning
|
|---|---|---|
|
ECX
|
Error code: 00H - No error
|
|
|
DS:[EDX]
|
Modified
|
As for Z_HandlerGenEx
|
Most details are the same as for Z_HandlerGenEx (see page 2-53), except for the following details of the handler's entry and exit conditions.
|
Register
|
Value
|
|---|---|
|
DS:EBX
|
Pointer to Handler Parameter Block
|
|
DL
|
Interrupt number
|
|
DH
|
EX_OSINFO (Must be preserved)
|
|
Register
|
Value
|
Meaning
|
|---|---|---|
|
CF
|
Clear
|
Interrupt handled
|
|
AL
|
0 1
|
Return from interrupt Reflect to real mode
|
|
AH
|
0 to 0FH 0FFH
|
Interrupt level Interrupt completed
|
|
DX
|
Unchanged
|
|
See Also: Z_EndOfInterrupt, Z_HandlerGenEx, Z_HandlerUnlink
Z_IOBitmapDomGet (0B04H)
Function
Read I/O bitmap of a specified domain. Entry Parameters
|
Register
|
Value
|
|---|---|
|
CX
|
0B04H
|
|
DS:EDX
|
Pointer to a BANKIOMAP_PBLK; see "Explanation"
|
|
Register
|
Value
|
Meaning
|
|---|---|---|
|
EBX
|
0 1
|
Bitmap bit reset Bitmap bit set
|
|
ECX
|
Error code: 00H - No error
|
|
The parameter block is defined as follows:
|
BANKIOMAP_PBLK
|
struc
|
|
|
BANKIO_PB_DOMAIN
|
dd
|
?
|
|
BANKIO_PB_PORT
|
dw
|
?
|
|
BANKIO_PB_BITVAL
|
dw
|
?
|
|
BANKIOMAP_PBLK
|
ends
|
|
You must supply the BANKIO_PB_DOMAIN and BANKIO_PB_PORT values.
Z_IOBitmapDomSet (0C04H)
Function
Set or reset a bit in the I/O bitmap of a specified domain. Entry Parameters
|
Register
|
Value
|
|---|---|
|
EBX
|
0 - reset 1 - set
|
|
CX
|
0C04H
|
|
DS:EDX
|
Pointer to a BANKIOMAP_PBLK; see "Explanation"
|
|
Register
|
Value
|
Meaning
|
|---|---|---|
|
EBX
|
0 1
|
Bitmap bit was reset Bitmap bit was set
|
|
ECX
|
Error code: 00H - No error
|
|
Input from or output to a port whose bit is set will cause an I/O exception that can be trapped by a handler you install by calling Z_HandlerIOEx.
The parameter is a pointer to a BANKIOMAP_PBLK, as described under Z_IOBitmapDomGet. You must supply all three fields before calling Z_IOBitmapDomSet.
The previous value of the bit is returned in BX and BANKIO_PB_BITVAL. If the port number is illegally high, BX=1 is returned.
See Also: Z_HandlerIOEx, Z_IOBitmapGet, Z_IOBitmapDomSet
|
Register
|
Value
|
|---|---|
|
CX
|
0904H
|
|
EDX
|
Port number
|
|
Register
|
Value
|
Meaning
|
|---|---|---|
|
EBX
|
0 1
|
Bitmap bit reset Bitmap bit set
|
|
ECX
|
Error code: 00H - No error
|
|
See Also: Z_IOBitmapSet, Z_IOBitmapDomGet
|
Register
|
Value
|
|---|---|
|
EBX
|
0 - reset 1 - set
|
|
CX
|
0A04H
|
|
EDX
|
Port number
|
|
Register
|
Value
|
Meaning
|
|---|---|---|
|
EBX
|
0 1
|
Bitmap bit was reset Bitmap bit was set
|
|
ECX
|
Error code: 00H - No error
|
|
Input from, or output to, a port whose bit is set will cause an I/O exception that can be trapped by a handler you install by calling Z_HandlerIOEx.The previous value of the bit is returned in BX. If the port number is illegally high, BX=1 is returned.
See Also: Z_HandlerIOEx, Z_IOBitmapDomSet, Z_IOBitmapGet
|
Register
|
Value
|
|---|---|
|
CX
|
1104H
|
|
DS:EDX
|
Pointer to an INSTANCE_REGISTRATION structure; see "Explanation"
|
|
Register
|
Value
|
Meaning
|
|---|---|---|
|
ECX
|
Error code: 00H - No error 03H - E_NoMemory
|
Not enough memory
|
The parameter is a pointer to an INSTANCE_REGISTRATION structure, which is defined in STRUCS.DEF as follows
|
INSTANCE_REGISTRATION
|
struc
|
|
|
IR_PAGES
|
dw
|
64 dup (?)
|
|
IR_GLOBAL
|
dd
|
?
|
|
IR_INSTANCE
|
dd
|
?
|
|
INSTANCE_REGISTRATION
|
ends
|
|
IR_PAGES is a bitmap of 1024 bits, where each bit represents the state of a 4 KB page within the first 4 MB of the linear address space. Bit 0 of the first byte corresponds to page 0. A bit is set if the corresponding page is instanced. A page should be instanced if significantly more than half of its 4 KB address space is instanced. Any spaces within it that are global must then be specified in SWAPLISTs in the IR_GLOBAL list described below.
IR_GLOBALand IR_INSTANCE are pointers to arrays of contiguous SWAPLISTs. Each SWAPLIST specifies a single block of memory addresses as being global or instanced respectively. The two arrays of SWAPLISTs are each terminated by a SWAPLIST with an SL_COUNT field of zero.
The SWAPLIST structure is defined in STRUCS.DEF as follows
|
SWAPLIST
|
struc
|
|
|
SL_COUNT
|
dw
|
?
|
|
SL_BASE
|
dd
|
?
|
|
SWAPLIST
|
ends
|
|
SL_COUNT is the number of contiguous bytes in the item.
|
Register
|
Value
|
Meaning
|
|---|---|---|
|
CX
|
3702H
|
|
|
EDX
|
Flags: 00H - No flags 02H - QF_KEEP 04H - QF_HIDE
|
Disallow deletion For system use only
|
|
Register
|
Value
|
Meaning
|
|---|---|---|
|
EBX
|
Mutex handle
|
|
|
ECX
|
Error code: 00H - No error 07H - E_NoQHandle
|
No unused queue handles
|
You can set the QF_KEEP amd QF_HIDE flag bits in DX. If set, QF_KEEP stops subsequent X_MXDelete calls from deleting the mutex. QF_HIDE makes the mutex hidden from applications. Only system processes can use it.
Any process in any domain on the same computer can use the handle to enter the mutex zone. You can easily communicate the handle to processes in the same domain. The easiest way to give it to processes in other domains is to create a queue with a known name and to send the mutex handle in a message to the queue.
Mutexes are a special kind of RTM queue, and you can therefore use the RTM queue inquiry functions to get the name and the handle of the first process waiting to enter a mutex that is in use.
X_MXCreate returns an error code if the system cannot allocate any more mutexes.
See Also: X_MXEnter, X_MXDelete, Z_QReaderGet, Z_QNameGet
|
Register
|
Value
|
|---|---|
|
CX
|
3802H
|
|
EDX
|
Mutex handle
|
|
Register
|
Value
|
Meaning
|
|---|---|---|
|
ECX
|
Error code: 00H - No error 09H - E_NoQueue 0AH - E_QInUse
|
No queue of this handle exists Queue is in use
|
Do not call X_MXDelete until you are sure no process might still try to enter the mutex. It would be possible for another mutex to be allocated the same handle for an entirely different purpose.
If the mutex has the QF_KEEP flag set it cannot be deleted by X_MXDelete.
X_MXDelete returns an error code if the handle is invalid or the mutex is in use.
See Also: X_MXCreate
|
Register
|
Value
|
|---|---|
|
CX
|
3902H
|
|
EDX
|
Mutex handle
|
|
Register
|
Value
|
Meaning
|
|---|---|---|
|
ECX
|
Error code: 00H - No error 09H - E_NoQueue
|
No queue of this handle exists
|
If some other process is in the mutex zone, you will be suspended until that process exits from it. Tasks suspended on a mutex are held in a FIFO list. If you do not want to be suspended, you may call X_MXEnterC instead of X_MXEnter. It immediately returns if the mutex is busy.
If your own process has already entered the same mutex, the effect of reentering is merely to increment a counter. Only when you have exited the same number of times as you entered will the mutex become available to another process. This allows you to be fairly liberal in using X_MXEnter so long as you are careful to call X_MXExit the same number of times.
X_MXEnter does not inhibit the dispatcher. If you need to ensure that the dispatcher does not run while you are in some critical region, you should use X_CritEnter and X_CritExit respectively.
X_MXEnter returns an error code if the handle is invalid.
See Also: X_MXEnterC, X_MXExit, X_PDispatch
|
Register
|
Value
|
|---|---|
|
CX
|
3A02H
|
|
EDX
|
Mutex handle
|
|
Register
|
Value
|
|
|---|---|---|
|
ECX
|
Error code: 00H - No error 0AH - E_QInUse
|
Zone entered successfully Another process is in the zone
|
You must be sure to test the value in CX on exit, because you may or may not be in the mutex zone. If you are not, you must not call X_MXExit.
See Also: X_MXEnter, X_MXExit
|
Register
|
Value
|
|---|---|
|
CX
|
3B02H
|
|
EDX
|
Mutex handle
|
|
Register
|
Value
|
Meaning
|
|---|---|---|
|
ECX
|
Error code: 00H - No error 09H - E_NoQueue 0AH - E_QInUse
|
Handle is invalid Another process is in the zone
|
Code a call to X_MXExit after every X_MXEnter and every successful X_MXEnterC.
X_MXExit returns the error code E_NoQueue if the handle is invalid, or E_QInUse if this process does not currently own the zone.
See Also: X_MXEnter, X_MXEnterC
|
Register
|
Value
|
|---|---|
|
CX
|
0C03H
|
|
DS:EDX
|
Pointer to a Descriptor Parameter Block; see "Explanation"
|
|
Register
|
Value
|
Meaning
|
|---|---|---|
|
EBX
|
Limit of largest available block if E_NoMemory
|
|
|
ECX
|
Error code: 00H - No error 03H - E_NoMemory
|
No free memory
|
In order to address the memory, you will need to call Z_DescAlloc or Z_DescSet.
Like Z_MemDescAlloc, you must supply valid flags in DESC_PB_MINFO. These are self-explanatory except, perhaps, for bit 5 which, if set, causes page tables to be created with the Present bit reset, so the linear memory space exists but no physical memory is mapped to it. If bit 5 is reset, physical memory is allocated and page tables set to point to it.
You can free up the memory by calling Z_MemFree.
See Also: Z_DescAlloc, Z_DescGet, Z_MemDescFree, Z_MemDescResize, Z_DescSet
|
Register
|
Value
|
|---|---|
|
CX
|
1403H
|
|
DS:EDX
|
Pointer to a Descriptor Parameter Block; see "Explanation"
|
|
Register
|
Value
|
Meaning
|
|---|---|---|
|
EBX
|
Selector
|
|
|
ECX
|
Error code: 00H - No error 03H - E_NoMemory 31H - E_BadDesc 32H - E_NoDesc
|
No free memory Invalid DESC_PB_SINFO No free descriptors
|
Unlike Z_DescAlloc, you must supply valid flags in DESC_PB_MINFO. These are self-explanatory except, perhaps, for bit 5 which, if set, causes page tables to be created with the Present bit reset, so the linear memory space exists but no physical memory is mapped to it. If bit 5 is reset, physical memory is allocated and page tables set to point to it.
You can free both the memory and the descriptor by calling Z_MemDescFree.
See Also: Z_DescAlloc, Z_DescGet, Z_MemDescFree, Z_MemDescResize, Z_DescSet
|
Register
|
Value
|
|---|---|
|
CX
|
1503H
|
|
DS:EDX
|
Pointer to a Descriptor Parameter Block; see "Z_DescAlloc (1003H)" on page 2-18
|
|
Register
|
Value
|
Meaning
|
|---|---|---|
|
ECX
|
Error code: 00H - No error 31H - E_BadDesc
|
Invalid selector
|
Note that freeing a descriptor renders its selector invalid. The selector must not be loaded into a segment register when the descriptor is freed, or subsequently reloaded.
See Also: Z_DescAlloc, Z_DescGet, Z_MemDescAlloc, Z_DescSet
|
Register
|
Value
|
|---|---|
|
CX
|
1703H
|
|
DS:EDX
|
Pointer to a Descriptor Parameter Block; see "Z_DescAlloc (1003H)" on page 2-18
|
|
Register
|
Value
|
Meaning
|
|---|---|---|
|
EBX
|
Selector if no error, else limit of largest available block
|
|
|
ECX
|
Error code: 00H - No error 03H - E_NoMemory 31H - E_BadDesc
|
No free memory Invalid selector
|
On return, if successful, the parameter block's DESC_PB_BASE field will contain the base of the (possibly relocated) memory. The selector is unchanged. If the call is unsuccessful, the limit of the largest available block is returned in EBX.
See Also: Z_DescAlloc, Z_DescGet, Z_MemDescAlloc, Z_DescSet
|
Register
|
Value
|
|---|---|
|
CX
|
1603H
|
|
DS:EDX
|
Pointer to a Descriptor Parameter Block; see "Z_DescAlloc (1003H)" on page 2-18
|
|
Register
|
Value
|
Meaning
|
|---|---|---|
|
ECX
|
Error code: 00H - No error 31H - E_BadDesc
|
Invalid selector
|
On return, if successful, the parameter block's DESC_PB_BASE, DESC_PB_LIMIT and DESC_PB_MINFO fields will contain the base, limit and flags of the memory block.
See Also: Z_MemAlloc, Z_MemDescAlloc, Z_MemDescResize
|
Register
|
Value
|
|---|---|
|
CX
|
0D03H
|
|
DS:EDX
|
Pointer to a Descriptor Parameter Block; see "Z_DescAlloc (1003H)" on page 2-18
|
|
Register
|
Value
|
Meaning
|
|---|---|---|
|
ECX
|
Error code: 00H - No error 1BH - E_BadMHandle
|
Invalid base address
|
See Also: Z_DescAlloc, Z_DescGet, Z_MemDescAlloc, Z_DescSet
|
Register
|
Value
|
|---|---|
|
CX
|
3103H
|
|
Register
|
Value
|
|
|---|---|---|
|
EBX
|
Free memory
|
|
|
ECX
|
Error code: 00H - No error
|
|
See Also: X_MemDomFreeGet
|
Register
|
Value
|
|---|---|
|
CX
|
0F03H
|
|
DS:EDX
|
Pointer to a Descriptor Parameter Block; see "Z_DescAlloc (1003H)" on page 2-18
|
|
Register
|
Value
|
Meaning
|
|---|---|---|
|
EBX
|
Limit of largest available block if E_NoMemory
|
|
|
ECX
|
Error code: 00H - No error 03H - E_NoMemory
|
No free memory
|
On return, if successful, the block's MINFO flags are written into DESC_PB_MINFO. If unsuccessful, the limit of the largest available block is returned in EBX.
See Also: Z_DescAlloc, Z_MemAlloc, Z_MemSizeGet
|
Register
|
Value
|
|---|---|
|
CX
|
0E03H
|
|
DS:EDX
|
Pointer to a Descriptor Parameter Block; see "Z_DescAlloc (1003H)" on page 2-18
|
|
Register
|
Value
|
Meaning
|
|---|---|---|
|
EBX
|
Selector if no error, else limit of largest available block
|
|
|
ECX
|
Error code: 00H - No error 1BH - E_BadMHandle
|
Invalid block base
|
On return, if successful, the parameter block's DESC_PB_LIMIT and DESC_PB_MINFO fields will contain the limit and flags of the memory block.
See Also: Z_MemAlloc, Z_MemDescAlloc, Z_MemResize
|
Register
|
Value
|
|---|---|
|
CX
|
3203H
|
|
Register
|
Value
|
|
|---|---|---|
|
EBX
|
Top address
|
|
|
ECX
|
Error code: 00H - No error
|
|
See Also: X_MemTotalGet
|
Register
|
Value
|
|---|---|
|
CX
|
3303H
|
|
Register
|
Value
|
|
|---|---|---|
|
EBX
|
Total memory
|
|
|
ECX
|
Error code: 00H - No error
|
|
See Also: X_MemTopGet
|
Register
|
Value
|
|---|---|
|
EBX
|
Module number
|
|
CX
|
0201H
|
|
DS:EDX
|
Pointer to a Module Descriptor; see "Explanation"
|
|
Register
|
Value
|
Meaning
|
|---|---|---|
|
ECX
|
Error code: 00H - No error 30H - E_BadModule
|
Bad module number or 32-bit offset
|
|
DESC_PB_BASE
|
dd
|
?
|
|
DESC_PB_LIMIT
|
dd
|
?
|
|
DESC_PB_SEL
|
dw
|
?
|
|
DESC_PB_MINFO
|
db
|
?
|
|
DESC_PB_SINFO
|
db
|
?
|
|
MODULE_OFFSET
|
dd
|
?
|
Z_MoveReal (0501H)
Function
Relocate a segment into extended memory. Entry Parameters
|
Register
|
Value
|
|---|---|
|
CX
|
0501H
|
|
DS:EDX
|
Pointer to a Descriptor Parameter Block
|
|
Register
|
Value
|
Meaning
|
|---|---|---|
|
ECX
|
Error code: 00H - No error 03H - E_NoMemory 31H - E_BadDesc 32H - E_NoDesc
|
No free memory Invalid DESC_PB_SINFO No free descriptors
|
|
DS:[EDX]
|
|
Parameter block filled in
|
On return, memory and a descriptor will have been allocated, and the data moved from real to extended memory. In the DPB, DESC_PB_BASE will contain the base of the relocated segment, and DESC_PB_SEL its selector.
X_MsgDomEnter (1505H)
Function
Enter Domain Message Mode. Entry Parameters
|
Register
|
Value
|
|---|---|
|
CX
|
1505H
|
|
DS:EDX
|
Segment:Offset pointer to a CALL_PBLK
|
|
Register
|
Value
|
Meaning
|
|---|---|---|
|
ECX
|
Error code: 00H - No error 56FFH - E_MsgDomEnter
|
Already in Domain Message Mode
|
If the caller's domain is currently in the background, X_MsgDomEnter immediately returns to the caller without calling the message display routine. When the domain is brought to the foreground, VM puts the screen into text mode and calls your message display routine. It can now use INT 10 or direct screen writes to display on the screen, but can use only page 0 and font 0, because that is all that has been saved. As the domain is in the foreground, it has the use of the keyboard and mouse.
X_MsgDomDisplay (1605H)
Function
Enter Domain Message Mode and display a message. Entry Parameters
|
Register
|
Value
|
|---|---|
|
CX
|
1605H
|
|
DS:EDX
|
Pointer to a message ASCIIZ string (maximum of 512 characters)
|
|
Register
|
Value
|
Meaning
|
|---|---|---|
|
ECX
|
Error code: 00H - No error 56FFH - E_MsgDomEnter
|
Already in Domain Message Mode
|
If the caller's domain is currently in the background, X_MsgDomDisplay immediately returns to the caller without displaying the message. When the domain is brought to the foreground, VM puts the screen into text mode, blanks it and displays your message, which must not exceed 512 characters.
The message may contain bell (07H), BS (08H), LF (0AH) and CR (0DH) to position the cursor.
The task manager is not disabled, so the user could switch you back into the background. If this happens, VM will display your message each time your domain is again brought to the foreground. Eventually, your program must call X_MsgDomExit, which ends Domain Message Mode.
E_MsgDomEnter is returned if the system is already in Domain Message Mode.
See Also: X_MsgGlobalEnter, X_MsgDomEnter, X_MsgDomExit
|
Register
|
Value
|
|---|---|
|
CX
|
1705H
|
|
Register
|
Value
|
Meaning
|
|---|---|---|
|
ECX
|
Error code: 00H - No error 57FFH - E_MsgDomExit
|
System not in Domain Message Mode
|
E_MsgDomExit is returned if the system is not in Domain Message Mode.
See Also: X_MsgDomDisplay, X_MsgDomEnter
|
Register
|
Value
|
|---|---|
|
CX
|
1805H
|
|
DS:EDX
|
Segment:Offset pointer to your message, which is an ASCIIZ string
|
|
Register
|
Value
|
Meaning
|
|---|---|---|
|
ECX
|
Error code: 00H - No error 41FFH - E_NoContext 42FFH - E_DomNotExist 43FFH - E_DomNotCreated 44FFH - E_DomDeleted
|
See Appendix A, "Error Codes"
|
The various possible error codes should never be seen by applications.
See Also: X_MsgGlobalDisplay, X_MsgGlobalEnter, X_MsgGlobalExit, X_MsgDomDisplay
|
Register
|
Value
|
|---|---|
|
CX
|
1305H
|
|
DS:EDX
|
Segment:Offset pointer to your message, which is an ASCIIZ string
|
|
Register
|
Value
|
Meaning
|
|---|---|---|
|
ECX
|
Error code: 00H - No error 41FFH - E_NoContext 54FFH - E_MsgGlobalEnter
|
See "Explanation"
|
Your message may contain bell (07H), BS (08H), LF (0AH) and CR (0DH) to position the cursor.
E_MsgGlobalEnter is returned if the system is already in Global Message Mode.
E_NoContext should never be seen by applications.
You must call X_MsgGlobalExit to return to normal operation when the user has responded to your message.
See Also: X_MsgGlobalEnter, X_MsgGlobalExit, X_MsgDomDisplay
|
Register
|
Value
|
|---|---|
|
CX
|
1205H
|
|
Register
|
Value
|
Meaning
|
|---|---|---|
|
ECX
|
Error code: 00H - No error 41FFH - E_NoContext 42FFH - E_DomNotExist 43FFH - E_DomNotCreated 44FFH - E_DomDeleted 54FFH - E_MsgGlobalEnter
|
See Appendix A, "Error Codes"
|
E_MsgGlobalEnter is returned if the system is already in Global Message Mode.
The other possible error codes should never be seen by applications.
See Also: X_MsgGlobalDisplay, X_MsgGlobalExit, X_MsgDomEnter
|
Register
|
Value
|
|---|---|
|
CX
|
1405H
|
|
Register
|
Value
|
Meaning
|
|---|---|---|
|
ECX
|
Error code: 00H - No error 42FFH - E_DomNotExist 43FFH - E_DomNotCreated 44FFH - E_DomDeleted 55FFH - E_MsgGlobalExit
|
See Appendix A, "Error Codes"
|
E_MsgGlobalExit is returned if the system is not in Global Message Mode.
The other possible error codes should never be seen by applications.
See Also: X_MsgGlobalDisplay, X_MsgGlobalEnter
|
Register
|
Value
|
|---|---|
|
CX
|
0102H
|
|
EDX
|
Process handle
|
|
Register
|
Value
|
Meaning
|
|---|---|---|
|
EBX
|
TickCount
|
|
|
ECX
|
Error code: 00H - No error 0BH - E_BadPHandle
|
Handle is invalid
|
See Also: X_PCreate, X_PTerm, X_PHandleGet, X_PUnsuspend, Z_TicksSet, X_TickGet
|
Register
|
Value
|
|---|---|
|
CX
|
0E02H
|
|
DS:EDX
|
Pointer to the PCREATE_PBLK of the new process
|
The parameter to the call is a pointer to a PCREATE_PBLK structure that specifies the initial values of all the registers with which the child will run. It also contains a name, the initial priority, and the state of the child process' flags. All of these are explained later in this section.
The format of a PCREATE_PBLK is defined in the supplied assembly language include file STRUCS.DEF. You must initialize the structure before calling X_PCreate.
The definition of PCREATE_PBLK is
|
PCREATE_PBLK
|
struc
|
|
|
PCREATE_PB_CALLBLK
|
CALL_PBLK
|
|
|
PCREATE_PB_NAME
|
db
|
8 dup (?)
|
|
PCREATE_PB_PRIOR
|
db
|
?
|
|
PCREATE_PB_FLAG
|
dw
|
?
|
|
|
db
|
?
|
|
PCREATE_PBLK
|
ends
|
|
where CALL_PBLK is another structure defined as
|
CALL_PBLK
|
struc
|
|
|
CALL_PB_EDI
|
dd
|
?
|
|
CALL_PB_ESI
|
dd
|
?
|
|
CALL_PB_EBP
|
dd
|
?
|
| Reserved | dd | ? |
|
CALL_PB_EBX
|
dd
|
?
|
|
CALL_PB_EDX
|
dd
|
?
|
|
CALL_PB_ECX
|
dd
|
?
|
|
CALL_PB_EAX
|
dd
|
?
|
|
CALL_PB_EIP
|
dd
|
?
|
|
CALL_PB_CS
|
dw
|
?
|
| Interrupt | dw | ? |
|
CALL_PB_EFLAGS
|
dd
|
?
|
|
CALL_PB_ESP
|
dd
|
?
|
|
CALL_PB_SS
|
dw
|
?,?
|
|
CALL_PB_ES
|
dw
|
?,?
|
|
CALL_PB_DS
|
dw
|
?,?
|
|
CALL_PB_FS
|
dw
|
?,?
|
|
CALL_PB_GS
|
dw
|
?,?
|
|
CALL_PBLK
|
ends
|
|
The layout of CALL_PBLK allows the child process's registers to be restored by pointing SS:ESP at the CALL_PBLK and executing POPAD followed by IRETD (for virtual 8086 mode processes). This is indeed how the dispatcher starts up virtual 8086 mode processes.
u bit 1: PF_KEEP identifies processes that must not be terminated.
u bits 2 to 15: reserved. Set them to zero.
On return from this call, check CX for an error code. The codes listed are the most likely, but the list should not be taken as exhaustive. If the child's priority is at least as high as the parent's, it will start executing before the return to the parent.
X_PCreate returns the child process' 32-bit handle. This is a number that you can use to refer to the child process in subsequent calls.
See Also: Z_DomFork, Z_PPriorSet
|
Register
|
Value
|
|---|---|
|
CX
|
0B02H
|
|
EDX
|
Number of ticks
|
|
Register
|
Value
|
Meaning
|
|---|---|---|
|
ECX
|
Error code: 00H - No error
|
No error is possible
|
You can determine the clock tick period (usually about 55 milliseconds / 18 ticks per second) by calling X_TickGet.
See Also: X_PDispatch, X_TickGet
|
Register
|
Value
|
|---|---|
|
CX
|
0C02H
|
|
Register
|
Value
|
Meaning
|
|---|---|---|
|
ECX
|
Error code: 00H - No error
|
No error is possible
|
X_PDispatch is not portable to other multitasking and task switching DOS environments, and you may therefore prefer to call the equivalent standard function INT 2FH with AX=1680H, which returns AL=00H to indicate success.
The converse of X_PDispatch is to tell the system that the dispatcher must not run while you perform some sequence of operations. This can be done by calling X_CritEnter.
See Also: X_CritEnter, X_PDelay
|
Register
|
Value
|
|---|---|
|
CX
|
1002H
|
|
Register
|
Value
|
Meaning
|
|---|---|---|
|
EBX
|
Handle
|
The handle of this process
|
|
ECX
|
Error code: 00H - No error
|
No error is possible
|
There are calls to get the name, priority, status and domain of a process, given its handle. Calls that require a process handle allow the value of 0 to imply the calling process.
See Also: Z_PPriorGet, X_PTerm, Z_DomHandleGet, Z_PNameGet, Z_PStatusGet, X_PSuspend, X_PUnsuspend
|
Register
|
Value
|
|---|---|
|
CX
|
2802H
|
|
DS:EDX
|
Pointer to a Handle List (HL) parameter block with valid HL_MAX
|
|
Register
|
Value
|
Meaning
|
|---|---|---|
|
ECX
|
Error code: 00H - No error
|
No error is possible
|
|
DS:[EDX]
|
HL_ACTUAL HL_BUF
|
Number of processes Process handles
|
|
HL_MAX
|
dw
|
BUFCNT
|
|
HL_ACTUAL
|
dw
|
?
|
|
HL_BUF
|
dd
|
BUFCNT dup (?)
|
Before calling Z_PHandleListGet, you must set the HL_MAX field to the number of handles the buffer will hold, which can be any number you choose. Z_PHandleListGet fills the buffer and puts the actual count in the HL_ACTUAL field. If there are more than HL_MAX processes, it returns as many as fit in the buffer.
Z_PNameGet (2902H)
Function
Obtain the name of a process. Entry Parameters
|
Register
|
Value
|
|---|---|
|
CX
|
2902H
|
|
DS:EDX
|
Pointer to a parameter block
|
|
Register
|
Value
|
Meaning
|
|---|---|---|
|
ECX
|
Error code: 00H - No error 0BH - E_BadPHandle
|
Handle is invalid
|
|
|
PD_NAME
|
Process name
|
|
PD_HANDLE
|
dd
|
?
|
|
PD_NAME
|
db
|
9 dup (?)
|
Before you call Z_PNameGet, you must set the PD_HANDLE field to the handle of the process whose name you are seeking. A process can obtain its own handle by calling X_PHandleGet, and can get a list of all processes by calling Z_PHandleListGet.
Z_PPriorGet (2C02H)
Function
Get the priority of a process. Entry Parameters
|
Register
|
Value
|
Meaning
|
|---|---|---|
|
CX
|
2C02H
|
|
|
EDX
|
0 Process handle
|
The calling process Another process
|
|
Register
|
Value
|
Meaning
|
|---|---|---|
|
EBX
|
Priority
|
|
|
ECX
|
Error code: 00H - No error 0BH - E_BadPHandle
|
Non-zero DX
|
See Also: Z_PPriorSet
|
Register
|
Value
|
Meaning
|
|---|---|---|
|
EBX
|
Priority
|
|
|
CX
|
0F02H
|
|
|
EDX
|
0 Process handle
|
The calling process Another process
|
|
Register
|
Value
|
Meaning
|
|---|---|---|
|
ECX
|
Error code: 00H - No error
|
No error is possible
|
Although this call returns no error code, it is not protected against an application that sets its priority to a very high level. Interrupt latency and system throughput depend on your cooperation.
See Also: Z_PPriorGet
|
Register
|
Value
|
|---|---|
|
CX
|
2A02H
|
|
EDX
|
Process handle
|
|
Register
|
Value
|
Meaning
|
|---|---|---|
|
BL
|
Status
|
|
|
ECX
|
Error code: 00H - No error 0BH - E_BadPHandle
|
Handle is invalid
|
The values of the status byte are equated to symbolic names in the supplied assembly language include file STRUCS.DEF. The possible values are
The state of the calling process must be PS_RUN, since it is running.
X_PSuspend (2302H)
Function
Suspend a process. Entry Parameters
|
Register
|
Value
|
Meaning
|
|---|---|---|
|
CX
|
2302H
|
|
|
EDX
|
0 Process handle
|
Suspend the calling process Suspend another process
|
|
Register
|
Value
|
Meaning
|
|---|---|---|
|
ECX
|
Error code: 00H - No error 0BH - E_BadPHandle 37H - E_AlreadyFrozen
|
Handle in EDX is invalid
|
You pass X_PSuspend the process handle of the process to be suspended. The parent of the process was told the handle when it created the process. A process can inquire its own handle by calling X_PHandleGet, but it can suspend itself by passing a handle of 0.
You cannot suspend processes with the PF_SYS or PF_KEEP flags set, but attempting to do so does not return an error.
See Also: X_PCreate, X_PTerm, X_PHandleGet, X_PUnsuspend
|
Register
|
Value
|
|---|---|
|
EBX
|
00000000H
|
|
CX
|
1102H
|
|
EDX
|
Process handle
|
|
Register
|
Value
|
Meaning
|
|---|---|---|
|
ECX
|
Error code: 00H - No error 0BH - E_BadPHandle 23H - E_PNotTerminated
|
Handle in EDX is invalid PF_KEEP or PF_SYS set
|
If the terminated process is in any mutex zones, it is made to exit from them, so that they become available to other processes.
You pass X_PTerm the process handle of the process to be terminated. The parent of the process was told the handle when it created the process. A process can inquire its own handle by calling X_PHandleGet.
The call will fail if the process you try to terminate has either its PF_KEEP or PF_SYS flags set. Applications do not normally have either of these set. Processes can temporarily protect themselves against being terminated by calling X_PTermOff. The process that calls X_PTerm sees no error, and the target process will be terminated when it calls X_PTermOK.
See Also: Z_DomTerm, X_PCreate, X_PTermOff, X_PTermOK
|
Register
|
Value
|
Meaning
|
|---|---|---|
|
CX
|
1702H
|
|
|
EDX
|
0 Process handle
|
Disable termination of calling process Disable termination of another process
|
|
Register
|
Value
|
Meaning
|
|---|---|---|
|
ECX
|
Error code: 00H - No error 0BH - E_BadPHandle
|
Handle in EDX is invalid
|
See Also: X_PCreate, X_PTermOff, X_PTerm
|
Register
|
Value
|
Meaning
|
|---|---|---|
|
CX
|
1802H
|
|
|
EDX
|
0 Process handle
|
Reenable termination of calling process Reenable termination of another process
|
|
Register
|
Value
|
Meaning
|
|---|---|---|
|
ECX
|
Error code: 00H - No error 0BH - E_BadPHandle
|
Handle in EDX is invalid
|
If someone calls X_PTerm while this process is protected, it will be terminated when it calls X_PTermOK.
See Also: X_PCreate, X_PTermOff, X_PTerm
|
Register
|
Value
|
|---|---|
|
CX
|
2402H
|
|
EDX
|
Process handle
|
|
Register
|
Value
|
Meaning
|
|---|---|---|
|
ECX
|
Error code: 00H - No error 0BH - E_BadPHandle 37H - E_NotFrozen
|
Handle in DX is invalid Process is not suspended
|
You pass X_PUnsuspend the process handle of the process to be released.
See Also: X_PSuspend
|
Register
|
Value
|
|---|---|
|
CX
|
0303H
|
|
EDX
|
Physical page number
|
|
Register
|
Value
|
Meaning
|
|---|---|---|
|
ECX
|
Error code: 00H - No error 3BH - E_PageAllocate
|
Page already allocated
|
See Also: Z_PageFree, Z_PageLock, Z_PagesAlloc
|
Register
|
Value
|
|---|---|
|
EBX
|
Domain handle
|
|
CX
|
2903H
|
|
EDX
|
Linear page number
|
|
Register
|
Value
|
Meaning
|
|---|---|---|
|
EBX
|
Page table entry
|
|
|
ECX
|
Error code: 00H - No error 33H - E_BadLock 36H - E_BadDomain
|
Already locked or No such page Invalid domain handle
|
The page table entry is returned in EBX. The page table entry contains the base address of the page in physical memory and the Dirty, Accessed, User, R/W and Present flag bits, as defined by Intel Corporation.
See Also: Z_PageDomLockAny, Z_PageDomLockNone, Z_PageLock
|
Register
|
Value
|
|---|---|
|
EBX
|
Domain handle
|
|
CX
|
2B03H
|
|
EDX
|
Linear page number
|
|
Register
|
Value
|
Meaning
|
|---|---|---|
|
EBX
|
Page table entry
|
|
|
ECX
|
Error code: 00H - No error 33H - E_BadLock 36H - E_BadDomain
|
Already locked or No such page Invalid domain handle
|
The page table entry is returned in EBX. The page table entry contains the base address of the page in physical memory and the Dirty, Accessed, User, R/W and Present flag bits, as defined by Intel Corporation.
See Also: Z_PageDomLock, Z_PageDomLockNone, Z_PageUnlock
|
Register
|
Value
|
|---|---|
|
EBX
|
Domain handle
|
|
CX
|
2D03H
|
|
EDX
|
Linear page number
|
|
Register
|
Value
|
Meaning
|
|---|---|---|
|
EBX
|
Page table entry
|
|
|
ECX
|
Error code: 00H - No error 33H - E_BadLock 36H - E_BadDomain
|
Already locked or No such page Invalid domain handle
|
See Also: Z_PageDomLock, Z_PageDomLockAny, Z_PageUnlock
|
Register
|
Value
|
|---|---|
|
EBX
|
Domain handle
|
|
CX
|
2A03H
|
|
EDX
|
Linear page number
|
|
Register
|
Value
|
Meaning
|
|---|---|---|
|
ECX
|
Error code: 00H - No error 33H - E_BadLock 36H - E_BadDomain
|
Already unlocked or No such page Invalid domain handle
|
See Also: Z_PageDomLock, Z_PageDomUnlockNone, Z_PageDomUnlockReuse
|
Register
|
Value
|
|---|---|
|
EBX
|
Domain handle
|
|
CX
|
2E03H
|
|
EDX
|
Linear page number
|
|
Register
|
Value
|
Meaning
|
|---|---|---|
|
ECX
|
Error code: 00H - No error 33H - E_BadLock 36H - E_BadDomain
|
Already unlocked or no such page Invalid domain handle
|
See Also: Z_PageDomLock, Z_PageDomUnlock, Z_PageDomUnlockReuse, Z_PageUnlockNone
|
Register
|
Value
|
|---|---|
|
EBX
|
Domain handle
|
|
CX
|
2C03H
|
|
EDX
|
Linear page number
|
|
Register
|
Value
|
Meaning
|
|---|---|---|
|
ECX
|
Error code: 00H - No error 33H - E_BadLock 36H - E_BadDomain
|
Already unlocked or no such page Invalid domain handle
|
See Also: Z_PageDomLock, Z_PageDomUnlock, Z_PageDomUnlockNone
|
Register
|
Value
|
|---|---|
|
CX
|
0B03H
|
|
EDX
|
Physical page number
|
|
Register
|
Value
|
Meaning
|
|---|---|---|
|
EBX
|
Starting page number
|
|
|
ECX
|
Error code: 00H - No error 34H - E_BadPage 3AH - E_PageFree
|
Bad page number Page already free
|
See Also: Z_PagesAlloc
|
Register
|
Value
|
|---|---|
|
CX
|
1803H
|
|
EDX
|
Linear page number
|
|
Register
|
Value
|
Meaning
|
|---|---|---|
|
EBX
|
Page table entry
|
|
|
ECX
|
Error code: 00H - No error 33H - E_BadLock
|
Already locked or no such page
|
The page table entry is returned in EBX. The page table entry contains the base address of the page in physical memory and the Dirty, Accessed, User, R/W and Present flag bits, as defined by Intel Corporation.
See Also: Z_PageLockAny, Z_PageLockNone, Z_PageUnlock
|
Register
|
Value
|
|---|---|
|
CX
|
1A03H
|
|
EDX
|
Linear page number
|
|
Register
|
Value
|
Meaning
|
|---|---|---|
|
EBX
|
Page table entry
|
|
|
ECX
|
Error code: 00H - No error 33H - E_BadLock
|
Already locked or no such page
|
The page table entry is returned in EBX. The page table entry contains the base address of the page in physical memory and the Dirty, Accessed, User, R/W and Present flag bits, as defined by Intel Corporation.
See Also: Z_PageLock, Z_PageLockNone, Z_PageUnlock
|
Register
|
Value
|
|---|---|
|
CX
|
1C03H
|
|
EDX
|
Linear page number
|
|
Register
|
Value
|
Meaning
|
|---|---|---|
|
EBX
|
Page table entry
|
|
|
ECX
|
Error code: 00H - No error 33H - E_BadLock
|
Already locked or no such page
|
See Also: Z_PageLock, Z_PageLockAny, Z_PageUnlock
|
Register
|
Value
|
|---|---|
|
CX
|
1903H
|
|
EDX
|
Linear page number
|
|
Register
|
Value
|
Meaning
|
|---|---|---|
|
ECX
|
Error code: 00H - No error 33H - E_BadLock
|
Already unlocked or no such page
|
See Also: Z_PageLock, Z_PageDomUnlock, Z_PageUnlockNone, Z_PageUnlockReuse
|
Register
|
Value
|
|---|---|
|
CX
|
1D03H
|
|
EDX
|
Linear page number
|
|
Register
|
Value
|
Meaning
|
|---|---|---|
|
ECX
|
Error code: 00H - No error 33H - E_BadLock
|
Already unlocked or no such page
|
See Also: Z_PageDomUnlock, Z_PageLock, Z_PageUnlock, Z_PageUnlockReuse
|
Register
|
Value
|
|---|---|
|
CX
|
1B03H
|
|
EDX
|
Linear page number
|
|
Register
|
Value
|
Meaning
|
|---|---|---|
|
ECX
|
Error code: 00H - No error 33H - E_BadLock
|
Already unlocked or no such page
|
See Also: Z_PageDomUnlockReuse, Z_PageLock, Z_PageUnlock, Z_PageUnlockNone
|
Register
|
Value
|
|---|---|
|
CX
|
0A03H
|
|
EDX
|
Number of pages required (1 page=4 KB)
|
|
Register
|
Value
|
Meaning
|
|---|---|---|
|
EBX
|
Starting page number
|
|
|
ECX
|
Error code: 00H - No error E_NoPage
|
Not enough free memory
|
Z_PagesAlloc gives you consecutive pages, which you can map to linear memory as required. When you no longer need the memory, you should free it by calling Z_PageFree.
See Also: Z_PageAlloc, Z_PageFree
|
Register
|
Value
|
|---|---|
|
EBX
|
Port number (0 to 2)
|
|
CX
|
1A05H
|
|
DX
|
Port Base Address
|
|
Register
|
Value
|
|---|---|
|
ECX
|
Error code: 00H - No error 5CFFH - E_LPTSet
|
Z_ParallelBaseSet returns an error if the port number was outside the range 0 to 2, or if another process is setting the same port's configuration at exactly the same time. Note that LPT1 corresponds to port 0, LPT2 to port 1, and so on.
One base address value has a special meaning: 0 disables this port.
See Also: Z_ParallelIRQSet, Z_ParallelTimeoutSet, Z_SerialBaseSet
|
Register
|
Value
|
|---|---|
|
EBX
|
Port number (0 to 2)
|
|
CX
|
1C05H
|
|
DL
|
IRQ number (0 to 15)
|
|
Register
|
Value
|
|---|---|
|
ECX
|
Error code: 00H - No error 5BFFH - E_LPTSet
|
Z_ParallelIRQSet returns an error if the port number was outside the range 0 to 2, or if another process is setting the same port's configuration at exactly the same time. Note that LPT1 corresponds to port 0, LPT2 to port 1, and so on.
See Also: Z_ParallelBaseSet, Z_ParallelTimeoutSet, Z_SerialIRQSet
|
Register
|
Value
|
|---|---|
|
EBX
|
Port number (0 to 2)
|
|
CX
|
2305H
|
|
Register
|
Value
|
|
|---|---|---|
|
EBX
|
Domain handle
|
|
See Also: Z_ParallelBaseSet, Z_ParallelIRQSet, Z_ParallelTimeoutGet, Z_ParallelTimeoutSet
|
Register
|
Value
|
|---|---|
|
EBX
|
Port number (0 to 2)
|
|
CX
|
2405H
|
|
Register
|
Value
|
|---|---|
|
EBX
|
Timeout in milliseconds
|
|
Register
|
Value
|
|---|---|
|
EBX
|
Port number (0 to 2)
|
|
CX
|
0F05H
|
|
EDX
|
Timeout in milliseconds
|
|
Register
|
Value
|
|---|---|
|
ECX
|
Error code: 00H - No error 5CFFH - E_LPTSet
|
Z_ParallelTimeoutSet returns an error if the port number was outside the range 0 to 2, or if another process is setting the same port's configuration at exactly the same time. Note that LPT1 corresponds to port 0, LPT2 to port 1, and so on.
|
Register
|
Value
|
|---|---|
|
CX
|
0F04H
|
|
DS:EDX
|
Pointer to a parameter block; see "Explanation"
|
|
Register
|
Value
|
Meaning
|
|---|---|---|
|
ECX
|
Error code: 00H - No error 34H - E_BadPage 36H - E_BadDomain
|
Invalid page number Invalid domain handle
|
The parameter block is defined as:
|
BANKPTBL_PBLK
|
struc
|
|
|
BANKP_PB_DOMAIN
|
dd
|
?
|
|
BANKP_PB_ENTRY
|
dd
|
?
|
|
BANKP_PB_VALUE
|
dd
|
?
|
|
BANKPTBL_PBLK
|
ends
|
|
Before you call Z_PtblDomGet, you must fill in the domain handle (BANKP_PB_DOMAIN) and page number (BANKP_PB_ENTRY) fields.
Z_PtblDomSet (1004H)
Function
Set the page table entry of a specified domain. Entry Parameters
|
Register
|
Value
|
|---|---|
|
CX
|
1004H
|
|
DS:EDX
|
Pointer to a parameter block; see "Z_PtblDomGet (0F04H)" on page 2-167
|
|
Register
|
Value
|
Meaning
|
|---|---|---|
|
EBX
|
Page table entry
|
|
|
ECX
|
Error code: 00H - No error 34H - E_BadPage 36H - E_BadDomain
|
Invalid page number Invalid domain handle
|
The parameter block is as defined under Z_PtblDomGet. Before you call Z_PtblDomGet you must fill in all three fields.
On return, the previous contents of the page table entry will have been copied into BANKP_PB_VALUE. The page table entry contains the base address of the page in physical memory and the Dirty, Accessed, User, R/W and Present flag bits, as defined by Intel Corporation.
See Also: Z_PtblDomSet, Z_PtblGet, Z_PtblSet
|
Register
|
Value
|
|---|---|
|
CX
|
0803H
|
|
EDX
|
Linear page number
|
|
Register
|
Value
|
Meaning
|
|---|---|---|
|
EBX
|
Page table entry
|
|
|
ECX
|
Error code: 00H - No error 34H - E_BadPage
|
Invalid page number
|
See Also: Z_PtblSet
|
Register
|
Value
|
|---|---|
|
EBX
|
Value to be set
|
|
CX
|
0903H
|
|
EDX
|
Linear page number
|
|
Register
|
Value
|
Meaning
|
|---|---|---|
|
EBX
|
Old page table entry
|
|
|
ECX
|
Error code: 00H - No error 34H - E_BadPage
|
Invalid page number
|
The page table entry contains the base address of the page in physical memory and the Dirty, Accessed, User, R/W and Present flag bits, as defined by Intel Corporation. All of these are set by this call. The previous values are returned in EBX.
See Also: Z_PageLock, Z_PtblGet
|
Register
|
Value
|
|---|---|
|
CX
|
3F02H
|
|
EDX
|
Queue handle
|
|
Register
|
Value
|
Meaning
|
|---|---|---|
|
ECX
|
Error code: 00H - No error 09H - E_NoQueue 0DH - E_QProtected
|
No queue of this name exists Queue for system use only
|
See Also: X_QCreate, X_QDelete, X_QOpen
|
Register
|
Value
|
|---|---|
|
CX
|
0402H
|
|
DS:EDX
|
Pointer to a QD (Queue Descriptor Block); see "Explanation"
|
The only Q_FLAGS flag you can specify is QF_KEEP (02H). If you do not set QF_KEEP, the queue may be deleted by someone calling X_QDelete. If QF_KEEP is set, the queue will not be deleted until the system is rebooted. All other flag bits should be zero.
|
Field
|
Minimum
|
Maximum
|
|---|---|---|
|
Q_NAME
|
Any 8 bytes
|
Any 8 bytes
|
|
Q_FLAGS
|
0
|
QF_KEEP
|
|
Q_MSGLEN
|
0
|
65535 (bytes)
|
|
Q_NMSGS
|
1
|
65535 (messages)
|
If the call is successful, it creates the queue and allocates the buffer in the system data area. Other processes may open the queue by reference to its name, and then read from and write to it. The act of creating the queue opens it for the process that created it; this process need not, therefore, call X_QOpen, but should call X_QClose when it no longer needs to use the queue.
|
MyQD
|
QD
|
<`Example1',MYQFLAGS,128,100>
|
The definition in STRUCS.DEF is
|
QD
|
struc
|
|
|
Q_NAME
|
ds
|
8
|
|
Q_FLAGS
|
dd
|
?
|
|
Q_MSGLEN
|
dd
|
?
|
|
Q_NMSGS
|
dd
|
?
|
|
QD
|
ends
|
|
On return, check that CX is 0. If not, the queue has not been created because there was no memory available, or the Q_NMSGS was set to 0, or the queue already exists. The name must be unique across the system.
X_QDelete (0602H)
Function
Delete a queue. Entry Parameters
|
Register
|
Value
|
|---|---|
|
CX
|
0602H
|
|
DS:EDX
|
Pointer to an 8 byte ASCII name
|
|
Register
|
Value
|
Meaning
|
|---|---|---|
|
ECX
|
Error code: 00H - No error 09H - E_NoQueue 0AH - E_QInUse 0DH - E_QProtected
|
No queue of this name exists Queue is in use Queue for system use only
|
X_QDelete can fail if the name is invalid, the queue is in use or is a system queue. A queue is in use if its buffer is not empty or any processes are waiting to read from it. If other processes have opened the queue but are not currently waiting on it, the deletion will take place. Opening a queue does not protect it against being deleted.
See the description of X_QCreate for details of the Queue name.
See Also: X_QCreate, X_QOpen
|
Register
|
Value
|
|---|---|
|
CX
|
3402H
|
|
EDX
|
Queue handle
|
|
Register
|
Value
|
Meaning
|
|---|---|---|
|
EBX
|
FLAGS
|
|
|
ECX
|
Error code: 00H - No error 09H - E_NoQueue
|
No queue of this handle exists
|
|
Bit
|
Name
|
Meaning if set
|
|
0
|
QF_MX
|
mutex
|
|
1
|
QF_KEEP
|
do not allow X_QDelete
|
|
2
|
QF_HIDE
|
for system use only
|
See Also: X_QOpen, Z_QHandleListGet, Z_QReaderGet, Z_QWriterGet
|
Register
|
Value
|
|---|---|
|
EBX
|
FLAGS
|
|
CX
|
4502H
|
|
EDX
|
Queue handle
|
|
Register
|
Value
|
Meaning
|
|---|---|---|
|
ECX
|
Error code: 00H - No error 09H - E_NoQueue
|
No queue of this handle exists
|
|
Register
|
Value
|
|---|---|
|
CX
|
2D02H
|
|
DS:EDX
|
Pointer to a Handle List (HL) parameter block with a valid HL_MAX
|
|
Register
|
Value
|
Meaning
|
|---|---|---|
|
ECX
|
Error codes: 00H - No error
|
No error is possible
|
|
DS:[EDX]
|
HL_ACTUAL HL_BUF
|
Actual number of processes Process handles
|
|
HL_MAX
|
dw
|
BUFCNT
|
|
HL_ACTUAL
|
dw
|
?
|
|
HL_BUF
|
dd
|
BUFCNT dup (?)
|
Before you call Z_QHandleListGet, you must set the HL_MAX field to the number of handles the buffer will hold, which can be any number you choose. Z_QHandleListGet fills the buffer and puts the actual count in the HL_ACTUAL field. If there are more than HL_MAX queues, it returns as many as fit in the buffer. The order of entries in the buffer is the order in which the queues were created, with the youngest first.
X_QMsgLenGet (2F02H)
Function
Obtain the message length of a queue. Entry Parameters
|
Register
|
Value
|
|---|---|
|
CX
|
2F02H
|
|
EDX
|
Queue handle
|
|
Register
|
Value
|
Meaning
|
|---|---|---|
|
EBX
|
Q_MSGLEN
|
Message length in bytes
|
|
ECX
|
Error code: 00H - No error 09H - E_NoQueue
|
No queue of this handle exists
|
You must call X_QOpen or Z_QHandleListGet to obtain the queue's handle before you call X_QMsgLenGet.
See Also: X_QOpen, X_QMsgMaxGet, X_QMsgNumGet
|
Register
|
Value
|
|---|---|
|
CX
|
3002H
|
|
EDX
|
Queue handle
|
|
Register
|
Value
|
Meaning
|
|---|---|---|
|
EBX
|
Q_NMSGS
|
Number of messages the buffer can hold
|
|
ECX
|
Error code: 00H - No error 09H - E_NoQueue
|
No queue of this handle exists
|
You must call X_QOpen or Z_QHandleListGet to obtain the queue's handle before you call X_QMsgMaxGet.
See Also: X_QOpen, X_QMsgLenGet, X_QMsgNumGet
|
Register
|
Value
|
|---|---|
|
CX
|
3302H
|
|
EDX
|
Queue handle
|
|
Register
|
Value
|
Meaning
|
|---|---|---|
|
EBX
|
Q_MSGCNT
|
Number of messages in the queue
|
|
ECX
|
Error code: 00H - No error 09H - E_NoQueue
|
No queue of this handle exists
|
You must call X_QOpen to obtain the queue's handle before you call X_QMsgNumGet.
See Also: X_QOpen, X_QMsgMaxGet, X_QMsgLenGet
|
Register
|
Value
|
|---|---|
|
CX
|
2E02H
|
|
DS:EDX
|
Pointer to a parameter block
|
|
Register
|
Value
|
Meaning
|
|---|---|---|
|
CX
|
Error code: 00H - No error 09H - E_NoQueue
|
Handle is invalid
|
|
DS:[EDX]
|
QD_NAME
|
Mutex or Queue name
|
|
QD_HANDLE
|
dd
|
?
|
|
QD_NAME
|
db
|
9 dup (?)
|
Before you call Z_QNameGet, you must set the QD_HANDLE field to the handle of the queue whose name you are seeking. X_MXCreate and X_QCreate return the queue's handle, and you can get a list of all queues by calling Z_QHandleListGet.
X_QOpen (0502H)
Function
Open a queue for reading, writing and/or deleting. Entry Parameters
|
Register
|
Value
|
|---|---|
|
CX
|
0502H
|
|
DS:EDX
|
Pointer to an 8 byte ASCII name
|
|
Register
|
Value
|
Meaning
|
|---|---|---|
|
EBX
|
Queue handle
|
|
|
ECX
|
Error code: 00H - No error 09H - E_NoQueue 0DH - E_QProtected
|
No queue of this name exists Queue for system use only
|
On return, if successful, EBX will contain the handle of the queue. The handle can then be used in calls to read, write or close the queue.
This call can fail if called from an application with the name of a system queue, or if no queue of that name exists.
See Also: X_QClose, X_QCreate, X_QDelete, X_QRead, X_QWrite
|
Register
|
Value
|
|---|---|
|
DS:EBX
|
Pointer to a buffer
|
|
CX
|
0702H
|
|
EDX
|
Queue handle
|
|
Register
|
Value
|
Meaning
|
|---|---|---|
|
ECX
|
Error code: 00H - No error 09H - E_NoQueue
|
No queue of this handle exists
|
You must call X_QOpen to obtain the queue's handle before you call X_QRead.
If the given handle is valid, this call will be successful, though you might have to wait a long time for a message. The related calls X_QReadC and X_QReadNDC allow you to get a message, if there is one, or to continue without if not. X_QRead and X_QReadC remove the message from the queue when they read it, whereas X_QReadNDC does not.
If you do not know the message length for this queue, you can enquire about it by calling X_QMsgLenGet (2F02).
See Also: X_QReadC, X_QMsgLenGet, X_QMsgNumGet, X_QOpen, X_QReadNDC, X_QWrite
|
Register
|
Value
|
|---|---|
|
DS:EBX
|
Pointer to a buffer
|
|
CX
|
0802H
|
|
EDX
|
Queue handle
|
|
Register
|
Value
|
Meaning
|
|---|---|---|
|
ECX
|
Error code: 00H - No error 09H - E_NoQueue 0EH - E_QEmpty
|
No queue of this handle exists Queue is empty
|
The related call X_QReadNDC is similar, but whereas X_QReadC removes the message from the queue, X_QReadNDC does not.
You must call X_QOpen to obtain the queue's handle before you call X_QReadC.
See Also: X_QRead, X_QReadNDC, X_QWrite, X_QWriteC
|
Register
|
Value
|
|---|---|
|
DS:EBX
|
Pointer to a buffer
|
|
CX
|
1E02H
|
|
EDX
|
Queue handle
|
|
Register
|
Value
|
Meaning
|
|---|---|---|
|
ECX
|
Error code: 00H - No error 09H - E_NoQueue 0EH - E_QEmpty
|
No queue of this handle exists Queue is empty
|
The related call X_QReadC is similar, but whereas X_QReadC removes the message from the queue, X_QReadNDC does not.
You must call X_QOpen to obtain the queue's handle before you call X_QReadNDC.
See Also: X_QOpen, X_QRead, X_QReadC, X_QWrite, X_QWriteC
|
Register
|
Value
|
|---|---|
|
CX
|
3202H
|
|
EDX
|
Mutex or Queue handle
|
|
Register
|
Value
|
Meaning
|
|---|---|---|
|
EBX
|
00H Non-zero
|
No processes waiting Handle of first process
|
|
ECX
|
Error code: 00H - No error 09H - E_NoQueue
|
No queue of this handle exists
|
For queues, you must call X_QOpen or Z_QHandleListGet to obtain the queue's handle before calling Z_QReaderGet. Mutex handles are returned by X_MXCreate.
See Also: Z_QFlagsGet, Z_QHandleListGet, X_QOpen, Z_QWriterGet
|
Register
|
Value
|
|---|---|
|
DS:EBX
|
Pointer to a buffer
|
|
CX
|
0902H
|
|
EDX
|
Queue handle
|
|
Register
|
Value
|
Meaning
|
|---|---|---|
|
ECX
|
Error code: 00H - No error 09H - E_NoQueue
|
No queue of this handle exists
|
You must call X_QOpen to obtain the queue's handle before you call X_QWrite.
If the given handle is valid, this call will be successful, though you might have to wait a long time if the buffer is full. The related call X_QWriteC allows you to write a message if the buffer is not full, or to continue without writing if it is full.
If you do not know the message length for this queue, you can obtain it by calling X_QMsgLenGet (2F02).
See Also: X_QRead, X_QOpen, X_QMsgLenGet, X_QMsgNumGet, X_QWriteC
|
Register
|
Value
|
|---|---|
|
DS:EBX
|
Pointer to a buffer
|
|
CX
|
0A02H
|
|
EDX
|
Queue handle
|
|
Register
|
Value
|
Meaning
|
|---|---|---|
|
ECX
|
Error code: 00H - No error 09H - E_NoQueue 0FH - E_QFull
|
No queue of this handle exists Queue is full
|
You must call X_QOpen to obtain the queue's handle before you call X_QWriteC.
If you do not know the message length for this queue, you can find out by calling X_QMsgLenGet.
See Also: X_QRead, X_QOpen, X_QMsgLenGet, X_QMsgMaxGet, X_QMsgNumGet
|
Register
|
Value
|
|---|---|
|
CX
|
3102H
|
|
EDX
|
Queue handle
|
|
Register
|
Value
|
Meaning
|
|---|---|---|
|
EBX
|
00H non-zero
|
No processes waiting Handle of the first process
|
|
ECX
|
Error code: 00H - No error 09H - E_NoQueue
|
No queue of this handle exists
|
You must call X_QOpen or Z_QHandleListGet to obtain the queue's handle before you call X_QWriterGet.
See Also: X_QOpen, Z_QHandleListGet, Z_QReaderGet, Z_QFlagsGet
|
Register
|
Value
|
|---|---|
|
CX
|
0601H
|
|
Register
|
Value
|
|
|---|---|---|
|
EBX
|
Total memory
|
|
|
ECX
|
Error code: 00H - No error
|
|
See Also: Z_MsgFatalDisplay
|
Register
|
Value
|
|---|---|
|
EBX
|
Port number (0 to 3)
|
|
CX
|
1905H
|
|
EDX
|
Port Base Address
|
|
Register
|
Value
|
|---|---|
|
ECX
|
Error code: 00H - No error 5BFFH - E_COMSet
|
Z_SerialBaseSet returns an error if the port number was outside the range 0 to 3, or if another process is setting the same port's configuration at exactly the same time.
One base value has a special meaning: 0 disables this port.
See Also: Z_ParallelBaseSet, Z_SerialIRQSet, Z_SerialTimeoutSet
|
Register
|
Value
|
|---|---|
|
EBX
|
Port number (0 to 3)
|
|
CX
|
1B05H
|
|
DL
|
IRQ number (0 to 15)
|
|
Register
|
Value
|
|---|---|
|
ECX
|
Error code: 00H - No error 5BFFH - E_COMSet
|
Z_SerialIRQSet returns an error if the port number was outside the range 0 to 3, or if another process is setting the same port's configuration at exactly the same time.
See Also: Z_ParallelIRQSet, Z_SerialBaseSet, Z_SerialTimeoutSet
|
Register
|
Value
|
|---|---|
|
EBX
|
Port number (0 to 3)
|
|
CX
|
2105H
|
|
Register
|
Value
|
|---|---|
|
EBX
|
Domain handle
|
See Also: Z_ParallelTimeoutSet, Z_SerialBaseSet, Z_SerialIRQSet, Z_SerialTimeoutGet, Z_SerialTimeoutSet
|
Register
|
Value
|
|---|---|
|
EBX
|
Port number (0 to 3)
|
|
CX
|
2205H
|
|
Register
|
Value
|
|---|---|
|
EBX
|
Timeout in milliseconds
|
|
Register
|
Value
|
|---|---|
|
EBX
|
Port number (0 to 3)
|
|
CX
|
0E05H
|
|
EDX
|
Timeout in milliseconds
|
|
Register
|
Value
|
|---|---|
|
ECX
|
Error code: 00H - No error 5BFFH - E_COMSet
|
Z_SerialTimeoutSet returns an error if the port number was outside the range 0 to 3, or if another process is setting the same port's configuration at exactly the same time.
|
Register
|
Value
|
|---|---|
|
CX
|
0A05H
|
|
Register
|
Value
|
|
|---|---|---|
|
ECX
|
Error code: 00H - No error
|
|
See Also: Z_TMHotKeyEnable, Z_TMInit
|
Register
|
Value
|
|---|---|
|
CX
|
0905H
|
|
Register
|
Value
|
|
|---|---|---|
|
ECX
|
Error code: 00H - No error
|
|
See Also: Z_TMHotKeyDisable, Z_TMInit
|
Register
|
Value
|
|---|---|
|
CX
|
0805H
|
|
DS:EDX
|
Segment:Offset pointer to a GETKEY_PBLK parameter block; see below
|
|
Register
|
Value
|
|---|---|
|
CX
|
Error code: 00H - No error
|
You need to call this function only if you are writing a replacement task manager.
The parameter block is defined as follows:
|
GETKEY_PBLK
|
struc
|
|
|
GETKEY_KEYTYPE
|
dw
|
?
|
|
GETKEY_HOTKEY
|
dw
|
?
|
|
GETKEY_PBLK
|
ends
|
|
On return, if GETKEY_KEYTYPE contains 1, the key was found in the hot key table, and GETKEY_HOTKEY will contain the index into the hot key table of the keys actually pressed. If GETKEY_KEYTYPE does not contain 1, the task manager flag has been set but not in response to a valid hot key combination.
Z_TMInit (0705H)
Function
Tell VM the task manager hot key list. Entry Parameters
|
Register
|
Value
|
|---|---|
|
CX
|
0705H
|
|
DS:EDX
|
Segment:Offset pointer to a TMDATA_STRUC parameter block; see "Explanation"
|
|
Register
|
Value
|
|---|---|
|
ECX
|
Error code: 00H - No error
|
You need to call this function only if you are writing a replacement task manager.
The parameter block is defined as follows:
|
TMDATA_STRUC
|
struc
|
|
|
TM_KEY_FLAG
|
dw
|
?
|
|
TM_HOTKEY_TBL
|
dw
|
24 dup (?)
|
|
TMDATA_STRUC
|
ends
|
|
where each TM_HOTKEY_TBL entry has the scan code in the high byte and the ROM BIOS keyboard control shift bits in the low byte.
Z_TMLoad (0105H)
Function
Tell VM the task manager is loading. Entry Parameters
|
Register
|
Value
|
|---|---|
|
CX
|
0105H
|
|
Register
|
Value
|
Meaning
|
|---|---|---|
|
ECX
|
Error code: 00H - No error 46FFH - E_TMLoaded
|
Task manager already loaded
|
Z_TMLoad fails if a task manager is already loaded.
You need to call this function only if you are writing a replacement task manager.
See Also: Z_TMInit, Z_TMUnload
|
Register
|
Value
|
|---|---|
|
CX
|
0205H
|
|
Register
|
Value
|
|
|---|---|---|
|
ECX
|
Error code: 00H - No error 45FFH - E_TMBusy 47FFH - E_TMNotLoaded
|
Task manager busy Task manager not loaded
|
Z_TMUnload fails if there are more than one tasks running, or if the task manager is not loaded.
You need to call this function only if you are writing a replacement task manager.
See Also: Z_TMInit, Z_TMLoad
|
Register
|
Value
|
|---|---|
|
CX
|
3D02H
|
|
Register
|
Value
|
|---|---|
|
EBX
|
Tick length in microseconds
|
|
ECX
|
Error code: 00H - No error possible
|
See Also: X_ForeCheck, Z_TicksSet, Z_PCountGet
|
Register
|
Value
|
|---|---|
|
CX
|
3C02H
|
|
EDX
|
Slices
|
|
Register
|
Value
|
|---|---|
|
EBX
|
Previous value
|
|
ECX
|
Error code: 00H - No error possible
|
This round robin scheduling applies only to processes of equal priority, and only when more than one is ready to run. No process of lower priority will run as long as there is at least one higher priority process ready.
Calling with EDX=0 allows examination of the current value without changing it.
See Also: X_ForeCheck, X_TickGet
|
Register
|
Value
|
|---|---|
|
CX
|
0305H
|
Z_VMBackSet fails if the current domain is invalid, if no task manager is loaded, if a switch is already taking place, or if Global Message Mode is active.
See Also: Z_VMForeSet, Z_VMSaveDisable
|
Register
|
Value
|
|---|---|
|
CX
|
0405H
|
|
EDX
|
Domain handle
|
|
Register
|
Value
|
|---|---|
|
ECX
|
Error codes as for "Z_VMBackSet (0305H)" on page 2-215
|
Z_VMForeSet restores the virtual console of the specified domain (unless saving has been disabled by Z_VMSaveDisable) and connects the keyboard and mouse to it.
Z_VMForeSet must be called after Z_VMBackSet. Z_VMForeSet can fail for the same reasons as Z_VMBackSet.
See Also: Z_VMBackSet, Z_VMSaveDisable
|
Register
|
Value
|
|---|---|
|
CX
|
0605H
|
|
EDX
|
Domain handle
|
|
Register
|
Value
|
|---|---|
|
ECX
|
Error code as for "Z_VMBackSet (0305H)" on page 2-215
|
Z_VMSaveDisable affects only the domain specified in EDX.
Z_VMSaveDisable fails if the task manager is not loaded, if a switch is taking place, or if Global Message Mode is currently active. See Z_VMBackSet for a list of error codes.
See Also: Z_VMBackSet, Z_VMSaveEnable
|
Register
|
Value
|
|---|---|
|
CX
|
0505H
|
|
EDX
|
Domain handle
|
|
Register
|
Value
|
|---|---|
|
ECX
|
Error code as for "Z_VMBackSet (0305H)" on page 2-215
|
Z_VMSaveEnable affects only the domain specified in EDX.
Z_VMSaveEnable fails if the task manager is not loaded, if a switch is taking place, or if Global Message Mode is currently active. See Z_VMBackSet for a list of error codes.
See Also: Z_VMBackSet, Z_VMSaveDisable