Ci-dessous, les différences entre deux révisions de la page.
Prochaine révision | Révision précédente | ||
back2root:ibm-pc-ms-dos:interrupts:int_21:int_21_4b [2023/01/10 11:55] – supprimée - modification externe (Unknown date) 127.0.0.1 | back2root:ibm-pc-ms-dos:interrupts:int_21:int_21_4b [2024/08/13 11:17] (Version actuelle) – frater | ||
---|---|---|---|
Ligne 1: | Ligne 1: | ||
+ | ====== INT 0x21 - 0x4b - " | ||
+ | |||
+ | ===== Request/ | ||
+ | |||
+ | {{tablelayout? | ||
+ | ^ reg ^ value ^ descr ^ | ||
+ | | AH | ||
+ | | AL | ||
+ | | DS:DX | | ASCIIz program name (must include extentsion) | ||
+ | | ES:BX | | parameter block (see below) | ||
+ | |||
+ | ==== Structures format ==== | ||
+ | |||
+ | == Format of EXEC parameter block for AL=00h, | ||
+ | {{tablelayout? | ||
+ | ^ Offset | ||
+ | | 0x00 | WORD | segment of environment to copy for child process (copy caller' | ||
+ | | 0x02 | DWORD | pointer to command tail to be copied into child' | ||
+ | | 0x06 | DWORD | pointer to first [[back2root: | ||
+ | | 0x0A | DWORD | pointer to second [[back2root: | ||
+ | | 0x0E | DWORD | (AL=01h) will hold subprogram' | ||
+ | | 0x12 | DWORD | (AL=01h) will hold entry point (CS:IP) on return | ||
+ | |||
+ | == Format of EXEC parameter block for AL=03h: == | ||
+ | {{tablelayout? | ||
+ | ^ Offset | ||
+ | | 0x00 | WORD | segment at which to load overlay | ||
+ | | 0x02 | WORD | relocation factor to apply to overlay if in .EXE format | ||
+ | |||
+ | ===== Return: ===== | ||
+ | **CL cleared if successfull** | ||
+ | |||
+ | * BX, DX are destroyed | ||
+ | * if sub function 0x01 is called, process ID set to new program' | ||
+ | |||
+ | **CL is set on error** | ||
+ | |||
+ | * AX = error code (0x01, 0x02, 0x05, 0x08, 0x0a, 0x0b) see [[back2root: | ||
+ | |||
+ | |||
+ | ===== Notes & Comments ===== | ||
+ | |||
+ | <WRAP round box> | ||
+ | * DOS 2.x destroys all registers, including SS:SP | ||
+ | * for function 00h and 01h, the calling process must ensure that there is enough unallocated memory available; if necessary, by releasing memory with AH=49h or AH=4Ah | ||
+ | * for function 01h, the value to be passed to the child program is put on top of the child' | ||
+ | * for function 03h, DOS assumes that the overlay is being loaded into memory allocated by the caller | ||
+ | * function 01h has been documented for DOS 5+, but was undocumented in prior versions | ||
+ | |||
+ | * some versions (such as DR-DOS 6.0) check the parameters and parameter block and return an error if an invalid value (such as an offset of FFFFh) is found | ||
+ | </ | ||
+ | |||
+ | <WRAP round important> | ||
+ | BUG: DOS 2.00 assumes that DS points at the current program' | ||
+ | </ | ||
+ | |||
+ | [[start|Back]] | ||