INT 21 U - Headroom - API(Application Program[ming] Interface) The defined set of calls which a program may make to interact with or request services of the operating system or environment under which it is running. Because the inputs and outputs of the calls are well-defined, a program using the API can continue using the identical calls even if the internal organization of the program providing the API changes. AX = 5758h BL = function 00h ??? 01h get Headroom location Return: CF clear if installed AX = PSPsee Program Segment Prefix segment of Headroom TSR(Terminate and Stay Resident) A program which remains in memory after terminating in order to provide services to other programs or the user. The name comes from the name of the DOS function call used to remain in memory after termination. BX = paragraphs of memory used by Headroom CF set if not (normal DOS return) Note: this function is also used as an installation check 02h get INT 21 handler Return: CF clear ES:BX -> Headroom's INT 21 handler Note: also sets unknown flag 03h launch application??? DS:SI -> 233-byte application record Return: ??? 04h ??? ??? Return: CF clear 05h get swap directory Return: CF clear DX:AX -> ASCIZA NUL-terminated ASCII string. The ASCIZ string "ABC" consists of the four bytes 41h, 42h, 43h, and 00h. Unless otherwise specified, maximum lengths given in the interrupt list do not include the terminating NUL. swap directory name 06h ??? DX = ??? Return: CF clear 07h ??? 08h ??? 09h get current application Return: BX = application number 0Ah ??? DX = application number DS:SI = ??? Return: ??? 0Bh ??? 0Ch ??? DX = application number ??? Return: ??? 0Dh ??? DX = application number ??? Return: ??? 0Eh get ??? Return: CF clear AX = ??? 0Fh set ??? flag 10h clear ??? flag 11h find application by name DS:SI -> ASCIZA NUL-terminated ASCII string. The ASCIZ string "ABC" consists of the four bytes 41h, 42h, 43h, and 00h. Unless otherwise specified, maximum lengths given in the interrupt list do not include the terminating NUL. application name Return: CF clear AX = application number or FFFFh if not loaded 12h ??? DX = application number Return: CF clear ??? 13h ??? Return: CF clear 14h ??? same as function 13h 15h set ??? DX = ??? 16h get ??? Return: AX = ??? set by function 15h 17h get ??? Return: BX = ??? CX = ??? (may be pointer in BX:CX) 18h BUG: branches incorrectly due to fencepost error Program: Headroom is a TSR(Terminate and Stay Resident) A program which remains in memory after terminating in order to provide services to other programs or the user. The name comes from the name of the DOS function call used to remain in memory after termination./task switcher by Helix Software SeeAlso: AX=4C57h,AX=5757h,INT 2F/AX=5758h