Interrupt 2Fh Multiplex Interrupt Interrupt 2Fh is the multiplex interrupt. A general interface is defined between two processes. It is up to the specific application using interrupt 2Fh to define specific functions and parameters. This interrupt is becoming more commonly used as the availible Int\21 functions are getting to be in short supply. Int 2Fh doesn't require any support from DOS itself for it to be used in application programs. It's not handled by DOS, but by the programs themselves. Every multiplex interrupt handler is assigned a specific multiplex number. The multiplex number is specified in the AH register; the AH value tells which program your request is directed toward. The specific function that the handler is to perform is placed in the AL register. Other parameters are places in the other registers as needed. The handlers are chained into the 2Fh interrupt vector and the multiplex number is checked to see if any other application is using the same multiplex number. There is no predefined method for assigning a multiplex number to a handler. You must just pick one. To avoid a conflict if two applications choose the same multiplex number, the multiplex numbers used by an application should be patchable. In order to check for a previous installation of the current application, you can search memory for a unique string included in your program. If the value you wanted in AH is taken but you don't find the string, then another application has grabbed that location. Int 2Fh was not documented under DOS 2.x. There is no reason not to use int 2Fh as the multiplex interrupt in DOS 2.x. The only problem is that DOS 2.x does not initialize the int 2Fh vector, so when you try to chain to it like you are supposed to, it will crash. If your program checks the vector for being zero and initializes it itself or doesn't chain in that case, it will work for you n 2.x just the same as 3.x. Function 01h PRINT.COM Register AH identifies which program is to handle the interrupt. Values 00h-7Fh are reserved for DOS, not that anyone cares much. Values 0C0h-0FFh are reserved for applications. Register AL contains the function code if used entry AH 01h AL 00h PRINT Get Installed State This call must be defined by all int 2Fh handlers. It is used by the caller of the handler to determine if the handler is present. On entry, AL=0. On return, AL contains the installed state as follows: return AL 0FFh installed 01h not installed, not OK to install 00h not installed, OK to install 01h PRINT Submit File DS:DX pointer to submit packet format byte level dword pointer to ASCIIZ filename return CF set if error AX error code note 1) A submit packet contains the level (BYTE) and a pointer to the ASCIIZ string (DWORD in offset:segment form). The ASCIIZ string must contain the drive, path, and filename of the file you want to print. The filename cannot contain global filename characters. return CF set if error AX error code 02h PRINT Cancel File On entry, AL=2 and DS:DX points to the ASCIIZ string for the print file you want to cancel. Global filename characters are allowed in the filename. DS:DX pointer to ASCIIZ file name to cancel (wildcards OK) return CF set if error AX error code 03h PRINT remove all files return CF set if error AX error code 04h PRINT hold queue/get status This call holds the jobs in the print queue so that you can scan the queue. Issuing any other code releases the jobs. On entry, AL=4. On return, DX contains the error count. DS:SI points to the print queue. The print queue consists of a series of filename entries. Each entry is 64 bytes long. The first entry in the queue is the file currently being printed. The end of the queue is marked by the entry having a null as the first character. return DX error count DS:SI pointer to print queue (null-string terminated list of 64-byte ASCIIZ filenames) CF set if error AX error code 01h function invalid 02h file not found 03h path not found 04h too many open files 05h access denied 08h queue full 09h spooler busy 0Ch name too long 0Fh drive invalid 05h PRINT restart queue return CF set if error AX error code Function 05h DOS 3.x critical error handler entry AH 05h AL 00h installation check return AL 00h not installed, OK to install 01h not installed, can't install 0FFh installed note This set of functions allows a user program to partially or completely override the default critical error handler in COMMAND.COM AL 01h handle error - nonzero error code in AL return CF clear ES:DI pointer to ASCIIZ error message CF set use default error handler AL (?) Function 06h ASSIGN entry AH 06h 00h installation check return AH 0 if installed 01h get memory segment return ES segment of ASSIGN work area Function 10h SHARE entry AH 10h AL 00h installation check return AL 00h not installed, OK to install 01h not installed, not OK to install 0FFh installed Function 11h Multiplex - network redirection entry AH 11h AL 00h installation check return AL 00h not installed, OK to install 01h not installed, not OK to install 0FFh installed 01h-05h unknown 06h close remote file 07h-09h unknown 0Ah unknown stack word (?) return CF set on error 0Bh unknown stack word (?) return CF set on error(?) 0Ch unknown 0Dh unknown 0Eh unknown stack word (?) return (?) 0Fh-16h unknown 17h unknown stack word (?) return (?) 18h unknown stack word (?) return (?) 19h-1Dh unknown 1Eh do redirection stack word function to execute return CF set on error 1Fh printer setup stack word function(?) return CF set on error(?) 20h-25h unknown stack word (?) 26h unknown Function 12h multiplex, DOS 3.x internal services entry AH 12h AL 00h installation check return AL 0FFh for compatibility with other int 2Fh functions 01h close file (?) stack word value - unknown return BX unknown CX unknown ES:DI pointer to unknown value note Can be called only from within DOS 02h get interrupt address stack word vector number return ES:BX pointer to interrupt vector stack unchanged 03h get DOS data segment return DS segment of IBMDOS.COM file 04h normalize path separator stack word character to normalize return AL normalized character (forward slash turned to backslash) stack unchanged 05h output character stack word character to output return stack unchanged note Can be called only from within DOS 06h invoke critical error return AL 0-3 for Abort, Retry, Ignore, Fail note Can be called only from within DOS 07h move disk buffer (?) DS:DI pointer to disk buffer return buffer moved to end of buffer list note Can be called only from within DOS 08h decrement word ES:DI pointer to word to decrement return AX new value of word note Word pointed to by ES:DI decremented, skipping zero 09h unknown DS:DI pointer to disk buffer(?) return (?) note Can be called only from within DOS 0Ah unknown note Can be called only from within DOS 0Bh unknown ES:DI pointer to system file table entry(?) return AX (?) note Can be called only from within DOS 0Ch unknown note Can be called only from within DOS 0Dh get date and time return AX current date in packed format DX current time in packed format note Can be called only from within DOS 0Eh do something to all disk buffers (?) return DS:DI pointer to first disk buffer note can be called only from within DOS 0Fh unknown DS:DI pointer to (?) return DS:DI pointer to (?) note 1) Can be called only from within DOS 2) Calls on function 1207h 10h find dirty/clean(?) buffer DS:DI pointer to first disk buffer return DS:DI pointer to first disk buffer which has (?) flag clear ZF clear if found set if not found 11h normalize ASCIIZ filename DS:SI pointer to ASCIIZ filename to normalize ES:DI pointer to buffer for normalized filename return destination buffer filled with uppercase filename, with slashes turned to backslashes 12h get length of ASCIIZ string ES:DI pointer to ASCIIZ string return CX length of string 13h uppercase character stack word character to convert to uppercase return AL uppercase character stack unchanged 14h compare far pointers DS:SI first pointer ES:DI second pointer return ZF set if pointers are equal ZF clear if not equal 15h unknown DS:DI pointer to disk buffer stack word (?) return stack unchanged note Can be called only from within DOS 16h get address of system FCB BX system file table entry number return ES:DI pointer to system file table entry 17h set default drive (?) stack word drive (0=A:, 1=B:, etc) return DS:SI pointer to drive data block for specified drive stack unchanged note Can be called only from within DOS 18h get something (?) return DS:SI pointer to (?) 19h unknown stack word drive (0=default, 1=A:, etc) return (?) stack unchanged note 1) Can be called only from within DOS 2) Calls function 1217h 1Ah get file's drive DS:SI pointer to filename return AL drive (0=default, 1=A:, etc, 0FFh=invalid) 1Bh set something (?) CL unknown return AL (?) note Can be called only from within DOS 1Ch checksum memory DS:SI pointer to start of memory to checksum CX number of bytes DX initial checksum return DX checksum note Can be called only from within DOS 1Dh unknown DS:SI pointer to (?) CX (?) DX (?) return AX (?) CX (?) DX (?) 1Eh compare filenames DS:SI pointer to first ASCIIZ filename ES:DI pointer to second ASCIIZ filename return ZF set if filenames equivalent clear if not 1Fh build drive info block stack word drive letter return ES:DI pointer to drive info block (will be overwritten by next call) stack unchanged note Can be called only from within DOS 20h get system file table number BX file handle return CF set on error, error code in AL AL 06h (invalid file handle) CF clear if successful byte ES:[DI] = system file table entry number for file handle 21h unknown DS:SI pointer to (?) return (?) note Can be called only from within DOS 22h unknown SS:SI pointer to (?) return nothing(?) note Can be called only from within DOS 23h check if character device (?) return DS:SI pointer to device\drivers with same name as (?) note Can be called only from within DOS 24h delay return after delay of (?) ms note Can be called only from within DOS 25h get length of ASCIIZ string DS:SI pointer to ASCIIZ string return CX length of string Function 43h Microsoft Extended Memory Specification (XMS) Function 5453h TesSeRact Standard for Ram-Resident Program Communication Function 64h SCRNSAV2.COM entry AH 64h AL 00h installation check return AL 00h not installed 0FFh installed note SCRNSAV2.COM is a screen saver for PS/2's with VGA by Alan Ballard Function 7Ah Novell NetWare entry AH 7Ah AL 00h installation check note 1) Returns address of entry point for IPX and SPX 2) Parameters are listed under Int\21 Function 087h APPEND entry AH 087h AL 00h APPEND installation check return AH 0 if installed 01h APPEND - unknown 02h APPEND - version check Function 088h Microsoft Networks entry AH 088h AL 00h network program installation check return AH 0 if installed BX installed component flags (test in this order!) bit 6 server bit 2 messenger bit 7 receiver bit 3 redirector 01h unknown 02h unknown 03h get current POST address return ES:BX POST address 04h set new POST address ES:BX new POST address 09h network version check Function 0AAh VIDCLOCK.COM entry AH 0AAh AL 00h installation check return AL 00h not installed 0FFh installed note VIDCLOCK.COM is a memory-resident clock by Thomas G. Hanlin III Function 0B8h Network Function 0BBh Network Functions entry AH 0BBh AL 00h net command installation check 01h, 02h unknown 03h get server POST address 04h get server POST address Function 0F7h AUTOPARK.COM (PD TSR hard disk parking utility) entry AH 0F7h AL 00h installation check return AL 00h not installed 0FFh installed note AUTOPARK is a TSR HD parker by Alan D. Jones 01h set parking delay BX:CX 32 bit count of 55ms timer ticks MSDOS 2Fh functions 01h (PRINT), 02h (ASSIGN), 10h (SHARE): return AX Error Codes Description 01h invalid function number 02h file not found 03h path not found 04h too many open files 05h access denied 06h invalid handle 08h queue full 09h busy 0Ch name too long 0Fh invalid drive was specified CF clear (0) if OK set (1) if error - error returned in AX note 1) The multiplex numbers AH=0h through AH=7Fh are reserved for DOS. Applications should use multiplex numbers 80h through 0FFh. 2) When in the chain for int 2Fh, if your code calls DOS or if you execute with interrupts enabled, your code must be reentrant/recursive. 3) Important! In versions of DOS prior to 3.0, the int 2Fh vector was initialized to zero rather than being pointed into the DOS service area. You must initialize this vector manually under DOS 2.x.
file: /Techref/int/2f.htm, 15KB, , updated: 2004/5/27 15:32, local time: 2024/12/30 13:49,
18.217.10.152:LOG IN
|
©2024 These pages are served without commercial sponsorship. (No popup ads, etc...).Bandwidth abuse increases hosting cost forcing sponsorship or shutdown. This server aggressively defends against automated copying for any reason including offline viewing, duplication, etc... Please respect this requirement and DO NOT RIP THIS SITE. Questions? <A HREF="http://techref.massmind.org/techref/int/2f.htm"> int 2f</A> |
Did you find what you needed? |
Welcome to massmind.org! |
Welcome to techref.massmind.org! |
.