MSDOS 4.0 (Announce)
> Also I noticed that this has things like DosWrite().
> This is basically an early incarnation of OS/2 - and
> one that looks better to me - ie it doesn't use the
> ULONG etc.
Just to expand - Microsoft *did* create a C-callable
interface to MSDOS - ie DosWrite() etc. This is apart
from anything they included in their C compiler
(write() or whatever - not sure what they provided).
And if you accept the legitimacy of the DosWrite()
call interface (used - albeit barely - by Microsoft's
own utilities), like:
v4.0/src/CMD/RESTORE/RTFILE.C
/*************************************************************/
/* write to dest file */
/*************************************************************/
retcode =
DOSWRITE
(dest_file_handle,
(char far *)&buf_pointer[0],
(unsigned) numread,
(unsigned far *) &numwrite
);
Then the definition of "32-bit MSDOS" would be:
v4.0/src/H/DOSCALLS.H
extern unsigned far pascal DOSWRITE (
unsigned,
char far *,
unsigned,
unsigned far * );
but those 16-bit unsigned parameters now naturally
morph into 32-bit (exactly what should happen for
a transition to 32-bit), and the pointers remain
as 32-bit, but obviously the "far" keyword is no
longer applicable, and they are flat pointers.
Since a recompilation is being done regardless, the
"pascal" calling convention could be dropped in
favor of cdecl.
And given the naming convention, you end up with
something similar to OS/2.
OS/2 in actuality went with:
USHORT APIENTRY DosWrite(USHORT hfile, void *ptr,
USHORT towrite, USHORT *tempWritten);
for 16-bit
and:
ULONG APIENTRY DosWrite(ULONG hfile, void *ptr,
ULONG towrite, ULONG *tempWritten);
ie the source code is not compatible.
In actuality you can simply ignore the official OS/2
documentation and use the MSDOS 4.0 definitions and
source, and it will happen to work with both 16-bit
and 32-bit OS/2.
So I would suggest that this (MSDOS 4.0) should be
adopted as the official standard to use instead of
POSIX or Windows or OS/2 (I don't like any of them
except the OS/2 function names), and provide existing
use (MSDOS 4.0, OS/2 1.x, Windows up to 2000, OS/2 2.0+).
The existing header file - doscalls.h - could be used too.
And the nature of the beast means that a thin wrapper
could be written to translate that into Win32 equivalents
so that everything from Win 95 to Win 11 is also covered.
Any thoughts?
BFN. Paul.
Complete thread:
- MSDOS 4.0 - kerravon, 26.04.2024, 04:43 (Announce)
- MSDOS 4.0 - Guti, 26.04.2024, 14:06
- MSDOS 4.0 - Oso2k, 26.04.2024, 15:38
- MSDOS 4.0 - roytam, 26.04.2024, 17:05
- MSDOS 4.0 - Japheth, 26.04.2024, 17:34
- MSDOS 4.0 - RayeR, 27.04.2024, 03:05
- MSDOS 4.0 - Ringding, 01.05.2024, 13:34
- MSDOS 4.0 - rr, 01.05.2024, 14:37
- MSDOS 4.0 - kerravon, 29.04.2025, 06:34
- MSDOS 4.0 - kerravon, 29.04.2025, 08:14
- MSDOS 4.0 - kerravon, 29.04.2025, 08:47
- MSDOS 4.0 - ecm, 29.04.2025, 09:50
- MSDOS 4.0 - kerravon, 29.04.2025, 10:40
- MSDOS 4.0 - ecm, 29.04.2025, 11:07
- MSDOS 4.0 - kerravon, 29.04.2025, 11:50
- MSDOS 4.0 -- MASM as standard - Rugxulo, 29.04.2025, 20:40
- MSDOS 4.0 -- MASM as standard - kerravon, 29.04.2025, 21:43
- MSDOS 4.0 -- MASM as standard - Rugxulo, 30.04.2025, 10:55
- MSDOS 4.0 -- MASM as standard - kerravon, 30.04.2025, 16:17
- MSDOS 4.0 -- MASM as standard - Rugxulo, 30.04.2025, 10:55
- MASM as standard, fixmem example - ecm, 01.05.2025, 12:24
- MASM as standard, fixmem example - Japheth, 02.05.2025, 16:10
- MASM as standard, fixmem example - bretjohn, 02.05.2025, 17:09
- MASM as standard, fixmem example - Rugxulo, 07.05.2025, 03:23
- MASM as standard, fixmem example - Rugxulo, 07.05.2025, 03:05
- MASM as standard, fixmem example - bretjohn, 02.05.2025, 17:09
- MASM as standard, fixmem example - Japheth, 02.05.2025, 16:10
- MSDOS 4.0 -- MASM as standard - kerravon, 29.04.2025, 21:43
- MSDOS 4.0 -- MASM as standard - Rugxulo, 29.04.2025, 20:40
- MSDOS 4.0 - kerravon, 29.04.2025, 11:50
- MSDOS 4.0 - ecm, 29.04.2025, 11:07
- MSDOS 4.0 - kerravon, 29.04.2025, 10:40
- MSDOS 4.0 - ecm, 29.04.2025, 09:50
- MSDOS 4.0 - kerravon, 29.04.2025, 08:47
- MSDOS 4.0 - kerravon, 29.04.2025, 08:14
- MSDOS 4.0 - kerravon, 29.04.2025, 06:34
- MSDOS 4.0 - rr, 01.05.2024, 14:37
- MSDOS 4.0 - Japheth, 26.04.2024, 17:34
- MSDOS 4.0 - rr, 26.04.2024, 22:00
- MSDOS 4.0 - usotsuki, 30.04.2024, 17:41
- MSDOS 4.0 - boeckmann, 30.04.2024, 21:03