From f9bed7ee018666792592cb60c5662d66ad4fdcd6 Mon Sep 17 00:00:00 2001 From: "E. C. Masloch" Date: Wed, 29 Apr 2026 19:17:30 +0200 Subject: [PATCH 1/7] update SDA in 21.5D0B with some details from MS-DOS v4.00 --- ... internal GET DOS SWAPPABLE DATA AREAS.txt | 20 +++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/source/Interrupt List/INT 21 DOS Function Calls/INT 215D0B DOS 4x only internal GET DOS SWAPPABLE DATA AREAS.txt b/source/Interrupt List/INT 21 DOS Function Calls/INT 215D0B DOS 4x only internal GET DOS SWAPPABLE DATA AREAS.txt index 93c7f001..355a4f55 100644 --- a/source/Interrupt List/INT 21 DOS Function Calls/INT 215D0B DOS 4x only internal GET DOS SWAPPABLE DATA AREAS.txt +++ b/source/Interrupt List/INT 21 DOS Function Calls/INT 215D0B DOS 4x only internal GET DOS SWAPPABLE DATA AREAS.txt @@ -37,8 +37,11 @@ SeeAlso: #01690 Format of DOS 4.0-6.0 swappable data area: Offset Size Description (Table 01690) -34 BYTE printer echo flag (00h off, FFh active) + -33 BYTE verify flag + -32 BYTE CharCo (counts 0..63 for STATCHK call during text output) -31 BYTE current switch character (ignored by DOS 5+) -30 BYTE current memory allocation strategy (see AH=58h) + -29 BYTE fShare (set by SHARE?) -28 BYTE incremented on each INT 21/AX=5E01h call -27 16 BYTEs machine name set by INT 21/AX=5E01h -11 5 WORDs zero-terminated list of offsets which need to be patched to @@ -74,7 +77,8 @@ Notes: the above data is not actually part of the SDA, and is much more likely ---remainder need only be swapped if in DOS--- 1Ah WORD value of AX on call to INT 21 Note: does not contain correct value on functions 00h-0Ch, - 50h, 51h, 59h, or 62h + 50h, 51h, 59h, or 62h. possibly also true of the + functions 33h, 64h, 25h, 35h (user stack functions) 1Ch WORD PSP segment for sharing/network (0000h = local) 1Eh WORD network machine number for sharing/network (0000h = local) 20h WORD first usable memory block found when allocating memory @@ -91,8 +95,8 @@ Notes: the above data is not actually part of the SDA, and is much more likely 2Fh BYTE padding (unused) 30h BYTE day of month 31h BYTE month - 32h WORD year - 1980 - 34h WORD number of days since 01jan1980 + 32h WORD year minus 1980 + 34h WORD number of days since 1980-01-01 36h BYTE day of week (0 = Sunday) 37h BYTE flag: console swapped during read from device 38h BYTE flag: safe to call INT 28 if nonzero @@ -125,7 +129,7 @@ Notes: the above data is not actually part of the SDA, and is much more likely 237h 11 BYTEs wildcard destination specification for rename (FCB format) 242h BYTE terminating NUL for above filespec 243h BYTE padding??? -244h WORD destination starting sector (cluster???) +244h WORD DESTSTART, REN destination start dir cluster (init from 2A2h) 246h 5 BYTEs extra space to allow a directory entry to be stored starting at offset 22Bh 24Bh BYTE extended FCB file attributes @@ -153,7 +157,7 @@ Notes: the above data is not actually part of the SDA, and is much more likely 260h DWORD pointer to Drive Parameter Block for critical error invocation 264h DWORD pointer to stack frame containing user registers on INT 21 268h WORD stores SP across INT 24 -26Ah DWORD pointer to DOS Drive Parameter Block for ??? +26Ah DWORD pointer to current DOS Drive Parameter Block (see #01395) 26Eh WORD segment of disk buffer 270h DWORD saving partial cluster number 274h WORD "sda_PREREAD" 00h if preread, 01h if optional @@ -175,7 +179,7 @@ Notes: the above data is not actually part of the SDA, and is much more likely 29Ah WORD last relative cluster within file being accessed 29Ch WORD temp: absolute cluster number being accessed 29Eh DWORD directory sector number -2A2h WORD directory cluster number +2A2h WORD DIRSTART, directory cluster number 2A4h DWORD current relative sector number within file 2A8h DWORD current sector number (number of previously written sectors) 2ACh WORD current byte offset within sector @@ -188,7 +192,7 @@ Notes: the above data is not actually part of the SDA, and is much more likely 2BCh WORD next file cluster number 2BEh DWORD number of bytes appended to file 2C2h DWORD pointer to current work disk buffer -2C6h DWORD pointer to working SFT +2C6h DWORD pointer to working SFT "SFT of console swapped guy" 2CAh WORD used by INT 21 dispatcher to store caller's BX 2CCh WORD used by INT 21 dispatcher to store caller's DS 2CEh WORD temporary storage while saving/restoring caller's registers @@ -211,7 +215,7 @@ Notes: the above data is not actually part of the SDA, and is much more likely 2ECh WORD stores DS during call to [List-of-Lists + 37h] 2EEh WORD temporary storage (various uses) 2F0h BYTE storage for drive error -2F1h WORD DOS 3.4 (European MS-DOS 4.00) bit flags +2F1h WORD MS-DOS v3.40 (development branch that led to v4.00) bit flags 2F3h DWORD pointer to user-supplied filename 2F7h DWORD pointer to user-supplied rename destination filename 2FBh WORD stores SS during call to [List-of-Lists + 37h] and INT 25,26 From 4343164a2a13ea8ab8f8405a64710f353d5bbcc4 Mon Sep 17 00:00:00 2001 From: "E. C. Masloch" Date: Wed, 29 Apr 2026 19:17:57 +0200 Subject: [PATCH 2/7] add some sort-as IDs to 2B, 2C --- .../INT 2B DOS 2 RESERVED/INT 2B IBM ROMDOS v40.txt | 4 ++-- .../INT 2C Cloaking CALL PROTECTEDMODE PASSALONG CHAIN.txt | 4 ++-- ...0 CLOAKING RESERVED FOR CLOAKED BIOS USE UNDER WINDOWS.txt | 4 ++-- .../INT 2C STARLITE architecture KERNEL API.txt | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/source/Interrupt List/INT 2B DOS 2 RESERVED/INT 2B IBM ROMDOS v40.txt b/source/Interrupt List/INT 2B DOS 2 RESERVED/INT 2B IBM ROMDOS v40.txt index ae6208cc..fd547cd3 100644 --- a/source/Interrupt List/INT 2B DOS 2 RESERVED/INT 2B IBM ROMDOS v40.txt +++ b/source/Interrupt List/INT 2B DOS 2 RESERVED/INT 2B IBM ROMDOS v40.txt @@ -1,5 +1,5 @@ ---------------------------------------------------------------------------- - Unique ID: 2B + Unique ID: 2B-sort-as-2BIBMROM-DOS Category: D DOS kernel Flag: n/a ---------------------------------------------------------------------------- @@ -18,4 +18,4 @@ INT 2B - IBM ROM-DOS v4.0 - ??? Notes: function 03h is called by ROMSHELL.COM; if BX != 0, then the ES:DI from INT 2F/AX=1982h points at valid data SeeAlso: INT 2F/AX=1982h - + diff --git a/source/Interrupt List/INT 2C DOS 2 RESERVED/INT 2C Cloaking CALL PROTECTEDMODE PASSALONG CHAIN.txt b/source/Interrupt List/INT 2C DOS 2 RESERVED/INT 2C Cloaking CALL PROTECTEDMODE PASSALONG CHAIN.txt index 87b39a1f..fe34d554 100644 --- a/source/Interrupt List/INT 2C DOS 2 RESERVED/INT 2C Cloaking CALL PROTECTEDMODE PASSALONG CHAIN.txt +++ b/source/Interrupt List/INT 2C DOS 2 RESERVED/INT 2C Cloaking CALL PROTECTEDMODE PASSALONG CHAIN.txt @@ -1,5 +1,5 @@ ---------------------------------------------------------------------------- - Unique ID: 2C + Unique ID: 2C-sort-as-2CCloaking Category: m memory management Flag: R available only in real or V86 mode ---------------------------------------------------------------------------- @@ -18,4 +18,4 @@ Notes: when this interrupt is invoked in V86 mode, RM386 will invoke the first this function was first introduced with RM386 (RAM-MAN/386) v6.00, the memory manager included in Helix Software's Netroom SeeAlso: INT 2C/AX=0009h,INT 2F/AX=4310h"Cloaking" - + diff --git a/source/Interrupt List/INT 2C DOS 2 RESERVED/INT 2C RM386 v600 CLOAKING RESERVED FOR CLOAKED BIOS USE UNDER WINDOWS.txt b/source/Interrupt List/INT 2C DOS 2 RESERVED/INT 2C RM386 v600 CLOAKING RESERVED FOR CLOAKED BIOS USE UNDER WINDOWS.txt index e08c51fd..d0e8f303 100644 --- a/source/Interrupt List/INT 2C DOS 2 RESERVED/INT 2C RM386 v600 CLOAKING RESERVED FOR CLOAKED BIOS USE UNDER WINDOWS.txt +++ b/source/Interrupt List/INT 2C DOS 2 RESERVED/INT 2C RM386 v600 CLOAKING RESERVED FOR CLOAKED BIOS USE UNDER WINDOWS.txt @@ -1,9 +1,9 @@ ---------------------------------------------------------------------------- - Unique ID: 2C + Unique ID: 2C-sort-as-2CRM386 Category: m memory management Flag: P available only in protected mode ---------------------------------------------------------------------------- INT 2C P - RM386 v6.00 - CLOAKING - RESERVED FOR CLOAKED BIOS USE UNDER WINDOWS AX = function (000Ch-001Fh) - + diff --git a/source/Interrupt List/INT 2C DOS 2 RESERVED/INT 2C STARLITE architecture KERNEL API.txt b/source/Interrupt List/INT 2C DOS 2 RESERVED/INT 2C STARLITE architecture KERNEL API.txt index 8bf3667c..5e793838 100644 --- a/source/Interrupt List/INT 2C DOS 2 RESERVED/INT 2C STARLITE architecture KERNEL API.txt +++ b/source/Interrupt List/INT 2C DOS 2 RESERVED/INT 2C STARLITE architecture KERNEL API.txt @@ -1,5 +1,5 @@ ---------------------------------------------------------------------------- - Unique ID: 2C + Unique ID: 2C-sort-as-2CSTARLITE Category: O other operating systems Flag: n/a ---------------------------------------------------------------------------- @@ -9,4 +9,4 @@ Notes: STARLITE is an architecture by General Software for a series of MS-DOS compatible operating systems (OEM DOS, NETWORK DOS, and SMP DOS) to be released in 1991. The interrupt number is subject to change before the actual release. - + From 91537fc0bc87a55995fbc93e6010c0b3448f8099 Mon Sep 17 00:00:00 2001 From: "E. C. Masloch" Date: Wed, 29 Apr 2026 20:34:03 +0200 Subject: [PATCH 3/7] 21.30: add link to .33FF, label .33FC, re-order and clean up v4 notes --- .../INT 2130 DOS 2 GET DOS VERSION.txt | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/source/Interrupt List/INT 21 DOS Function Calls/INT 2130 DOS 2 GET DOS VERSION.txt b/source/Interrupt List/INT 21 DOS Function Calls/INT 2130 DOS 2 GET DOS VERSION.txt index 3423f54a..102020c0 100644 --- a/source/Interrupt List/INT 21 DOS Function Calls/INT 2130 DOS 2 GET DOS VERSION.txt +++ b/source/Interrupt List/INT 21 DOS Function Calls/INT 2130 DOS 2 GET DOS VERSION.txt @@ -25,14 +25,14 @@ Notes: the OS/2 v1.x Compatibility Box returns major version 0Ah (10) OS/2 Warp 3.0 Virtual DOS Machines report v20.30; Warp 4 VDMs report v20.40. the Windows NT NTVDM DOS returns version 5.00, subject to SETVER - DOS 4.01 and 4.02 identify themselves as version 4.00; use - INT 21/AH=87h to distinguish between the original European MS-DOS 4.0 - and the later PC-DOS 4.0x and MS-DOS 4.0x + MS-DOS 4.01 and 4.02 identify themselves as version 4.00 The MS-DOS v4.01 command.com displays the version as v4.01 by adding one to the minor version as returned from this function. MS-DOS v4.00 was originally developed as v3.40, some references to this version number remained. The default contents of the special program list of MS-DOS v4.00 all are set up as returning v3.40 + use INT 21/AH=87h to distinguish between multitasking/European MS-DOS + 4.00 and the v3.40 based developments PC-DOS 4.0x and MS-DOS 4.0x IBM DOS 6.1 reports its version as 6.00; use the OEM number to distinguish between MS-DOS 6.00 and IBM DOS 6.1 (there was never an IBM DOS 6.0) @@ -122,8 +122,7 @@ Notes: the OS/2 v1.x Compatibility Box returns major version 0Ah (10) BUGS: FreeDOS sources note that "32RTM won't like non-zero values" in CX SeeAlso: AX=3000h/BX=3000h,AX=3306h"DOS",AX=4452h,AH=87h,INT 15/AX=4900h SeeAlso: AH=20h"S/DOS",INT 2F/AX=122Fh,INT 2F/AX=4010h,INT 2F/AX=4A33h -SeeAlso: INT 2F/AX=E002h -SeeAlso: AX=33FCh +SeeAlso: INT 2F/AX=E002h,AX=33FCh"FreeDOS",AX=33FFh (Table 01394) Values for DOS OEM number: @@ -194,4 +193,3 @@ Notes: '*' indicates an OEM release of MS-DOS, while '-' indicates an OEM Zenith DOS 2.x (uses Zenith disk mechanism, extra drives at G:) Zenith DOS 3.x (can be configured for Zenith or MS-DOS mechanism) Zenith DOS 3.3 PLUS (>32MB partitions similar to MS-DOS 4+) - From 87abd1c2fd58a657ff9c957c1373acefc9bd1ece Mon Sep 17 00:00:00 2001 From: "E. C. Masloch" Date: Wed, 29 Apr 2026 20:34:46 +0200 Subject: [PATCH 4/7] 21.00: describe MS-DOS v1 implementation --- .../INT 2100 DOS 1 TERMINATE PROGRAM.txt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/source/Interrupt List/INT 21 DOS Function Calls/INT 2100 DOS 1 TERMINATE PROGRAM.txt b/source/Interrupt List/INT 21 DOS Function Calls/INT 2100 DOS 1 TERMINATE PROGRAM.txt index 746088c4..8b2472d9 100644 --- a/source/Interrupt List/INT 21 DOS Function Calls/INT 2100 DOS 1 TERMINATE PROGRAM.txt +++ b/source/Interrupt List/INT 21 DOS Function Calls/INT 2100 DOS 1 TERMINATE PROGRAM.txt @@ -13,6 +13,12 @@ Notes: Microsoft recommends using INT 21/AH=4Ch for DOS 2+ whatever cleanup it needs to do (restoring the INT 22,INT 23,INT 24 vectors from the PSP assumed to be located at offset 0000h in the segment indicated by the stack copy of CS, etc.) + on MS-DOS v1 dirty FATs are written, the two or three INT vectors are + copied to the IVT, and the resulting INT 22 vector is used along + with the original (child / process that's terminating) user stack + to return to the parent. the CS:IP and FL on the stack are not + popped and the live FL contains IF=1 DF=0 and arithmetic status + flags from XOR AX,AX (including ZF=1 CF=0). if the PSP is its own parent, the process's memory is not freed; if INT 22 additionally points into the terminating program, the process is effectively NOT terminated From ccef862b91ce9a6261947d19086fd283f1257a91 Mon Sep 17 00:00:00 2001 From: "E. C. Masloch" Date: Wed, 29 Apr 2026 20:36:18 +0200 Subject: [PATCH 5/7] 21.2B, .2D: add references to ROM-BIOS timer tick things --- .../INT 212B DOS 1 SET SYSTEM DATE.txt | 4 ++-- .../INT 212D DOS 1 SET SYSTEM TIME.txt | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/source/Interrupt List/INT 21 DOS Function Calls/INT 212B DOS 1 SET SYSTEM DATE.txt b/source/Interrupt List/INT 21 DOS Function Calls/INT 212B DOS 1 SET SYSTEM DATE.txt index 2403e5fc..ec684e28 100644 --- a/source/Interrupt List/INT 21 DOS Function Calls/INT 212B DOS 1 SET SYSTEM DATE.txt +++ b/source/Interrupt List/INT 21 DOS Function Calls/INT 212B DOS 1 SET SYSTEM DATE.txt @@ -15,6 +15,6 @@ Return: AL = status Notes: DOS 3.3+ also sets CMOS clock; due to the limitations of the CLOCK$ driver interface, the CMOS time is also updated to the current DOS time (which is the BIOS time-of-day clock with the default - CLOCK$ driver) + CLOCK$ driver, see MEM 0040h:006Ch and INT 08"IRQ0", INT 1C) SeeAlso: AH=2Ah,AH=2Dh,INT 1A/AH=05h - + diff --git a/source/Interrupt List/INT 21 DOS Function Calls/INT 212D DOS 1 SET SYSTEM TIME.txt b/source/Interrupt List/INT 21 DOS Function Calls/INT 212D DOS 1 SET SYSTEM TIME.txt index e24a01cd..e3287c9b 100644 --- a/source/Interrupt List/INT 21 DOS Function Calls/INT 212D DOS 1 SET SYSTEM TIME.txt +++ b/source/Interrupt List/INT 21 DOS Function Calls/INT 212D DOS 1 SET SYSTEM TIME.txt @@ -17,4 +17,4 @@ Notes: DOS 3.3+ also sets CMOS clock; due to the limitations of the CLOCK$ driver interface, the CMOS date is also updated to the current DOS date SeeAlso: AH=2Bh"DOS",AH=2Ch,INT 1A/AH=01h,INT 1A/AH=03h,INT 1A/AH=FFh"AT&T" - +SeeAlso: INT 08"IRQ0",INT 1C,MEM 0040h:006Ch From 6ec9dfc424917bd5ad9253e76a5d6191dc24bf63 Mon Sep 17 00:00:00 2001 From: "E. C. Masloch" Date: Wed, 29 Apr 2026 20:37:57 +0200 Subject: [PATCH 6/7] 21.26: MS-DOS v5 bug to BUGS, FreeCOM bug, parent is DOS 2+, INT 31 --- ...T 2126 DOS 1 CREATE NEW PROGRAM SEGMENT PREFIX.txt | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/source/Interrupt List/INT 21 DOS Function Calls/INT 2126 DOS 1 CREATE NEW PROGRAM SEGMENT PREFIX.txt b/source/Interrupt List/INT 21 DOS Function Calls/INT 2126 DOS 1 CREATE NEW PROGRAM SEGMENT PREFIX.txt index 207d469d..8f382e6e 100644 --- a/source/Interrupt List/INT 21 DOS Function Calls/INT 2126 DOS 1 CREATE NEW PROGRAM SEGMENT PREFIX.txt +++ b/source/Interrupt List/INT 21 DOS Function Calls/INT 2126 DOS 1 CREATE NEW PROGRAM SEGMENT PREFIX.txt @@ -38,7 +38,7 @@ Offset Size Description (Table 01378) 0Ah DWORD stored INT 22 termination address (Parent Return Address) 0Eh DWORD stored INT 23 control-Break handler address 12h DWORD DOS 1.1+ stored INT 24 critical error handler address - 16h WORD segment of parent PSP (can be this PSP itself) + 16h WORD (presumed DOS 2+) parent PSP segment (can be this PSP itself) 18h 20 BYTEs DOS 2+ Job File Table, one byte per file handle, FFh = closed (the JFT is known as Process Handle Table for lDOS) 2Ch WORD DOS 2+ segment of environment for process (see #01379) @@ -88,9 +88,6 @@ Notes: in DOS v3+, the limit on simultaneously open files may be increased by Novell NetWare also uses values from FEh down to 80h or one more than FILES= (whichever is greater) to indicate remote files (except on OS/2, where is uses CFh down to 80h) - MS-DOS 5.00 incorrectly fills the FCB fields when loading a program - high; the first FCB is empty and the second contains the first - parameter some DOS extenders place protected-mode values in various PSP fields such as the "parent" field, which can confuse PSP walkers. Always check either for the CDh 20h signature or that the suspected PSP is @@ -122,12 +119,16 @@ Notes: in DOS v3+, the limit on simultaneously open files may be increased by vector, which may be relocated during processing of dconfig.sys or ldos.ini. FreeDOS happens to put the DOSDATA segment in this spot as well, but does not support relocating DOSDATA. (see also - INT 2F/AX=1203h on DOSDATA segment details.) + INT 31 on its use and INT 2F/AX=1203h on DOSDATA segment details.) BUGS: When shelling out from the Borland Pascal 7.00 IDE, overly-long command lines will not be delimited by a 0Dh character, and the length byte is set to 80h! A workaround is to always patch in a 0Dh at the last position of the command line buffer before scanning the command line. + MS-DOS 5.00 incorrectly fills the FCB fields when loading a program + high; the first FCB is empty and the second contains the first + parameter + FreeDOS FreeCOM reportedly corrupts the second FCB (FreeCOM bug #185) Format of environment block: Offset Size Description (Table 01379) From 9f44659898d557e08942d1f18590d7197bf2115e Mon Sep 17 00:00:00 2001 From: "E. C. Masloch" Date: Wed, 29 Apr 2026 20:47:55 +0200 Subject: [PATCH 7/7] 21.3305: expand boot drive notes --- .../INT 213305 DOS 40 GET BOOT DRIVE.txt | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/source/Interrupt List/INT 21 DOS Function Calls/INT 213305 DOS 40 GET BOOT DRIVE.txt b/source/Interrupt List/INT 21 DOS Function Calls/INT 213305 DOS 40 GET BOOT DRIVE.txt index 5eaddd0b..e8a7121e 100644 --- a/source/Interrupt List/INT 21 DOS Function Calls/INT 213305 DOS 40 GET BOOT DRIVE.txt +++ b/source/Interrupt List/INT 21 DOS Function Calls/INT 213305 DOS 40 GET BOOT DRIVE.txt @@ -14,4 +14,12 @@ Notes: This function does not use any of the DOS-internal stacks and may drive letters sequentially to the other drives in the system this call is supported by OS/2 Warp 3.0, but not earlier versions of OS/2; it is also supported by Novell DOS 7 + the boot drive is the default drive during config processing + Enhanced DR-DOS and lDOS may set the boot drive to correspond to any + on-disk file system/partition if their kernels are loaded from a + given file system. if no exact partition match is found, then the + first partition logged in on the same unit may be used. + other DOS versions reportedly only support using drive A: or C: (or + possibly B:) as the boot drive; loading from an INT 13 unit >= 80h + will then select drive C: as boot drive. SeeAlso: AX=335Fh