OS/2 Versions And History

From DisNCord Community Wiki
Revision as of 16:52, 10 January 2023 by Waterpear (talk | contribs) (→‎Installation: confirm 86Box compatibility, mention how to fix "bad or missing command interpreter")
Jump to navigation Jump to search

This is a list, chronologically sorted, of OS/2 versions, related products, and historic dates.

IBM PC DOS 3.1 (1984)

Multitasking DOS 4

DOS 4.0 running several processes.

Officially called just MS-DOS 4.00, Multitasking DOS 4 was the intended successor of DOS 2.x and later 3.x, initially developed between January 1983[1] and November 1985. It has many features later appearing in both OS/2 and Windows, including:

  • the New Executable format
  • an OS/2-style per-task data area (PTDA) replacing the MS-DOS program segment prefix (PSP)
  • system calls using dynamically linked functions in a built-in module named DOSCALLS
  • the concept of processes along with related system calls
  • the use of a higher-level language (C) for writing parts of the operating system.

However, unlike any version of OS/2 released to the public (TODO: check for 1986 ADOS 5.0), both earlier MS-DOS COM and MZ executables and MS-DOS interrupts are supported on Multitasking DOS 4, and there are even improvements to these APIs (some of which break compatibility with older DOS versions). New apps use both the legacy (int 21h) and new dynamically linked APIs, perhaps suggesting the old API was deprecated or in the process of being replaced.

It was originally called DOS 3.0, which is referenced by older binaries checking for DOS 3.0 to 4.0; later the release number was pushed to 4.0 with the release of 3.0.

This version of DOS supports pre-emptive multitasking, but its usability is limited by the 640kB memory limit, with no swapping because of lack of necessary hardware support. For this reason, it was only released to certain OEMs, opting to wait with the public release for its protected mode successor[2].

Preserved Copies

There are two versions of Multitasking DOS 4 that were preserved. The first one is a two-floppy set, originally uploaded to the now defunct JSMachines.net website. It does not contain any branding and its kernel (IBMDOS.COM) identifies itself as internal revision 6.7, 85/11/26, which is consistent with the creation date of the files. The internal revision identification is cut off with an end of string sign, possibly indicating it was manually edited after the build; together with the fact IBM branding is used, it hints that this is actually a pre-release version. Floppy 1 contains the operating system and a few basic utilities, including FDISK and FORMAT; floppy 2 contains additional utilities, commands, a copy of the 8086 New Executable linker (LINK4.EXE), a PIF editor (PIFEDIT.EXE), and EDLIN.

The second version is an OEM release by SMT Goupil, a French company, for their Goupil G4 computer, featuring an 80186 clocked at 8 MHz. It was originally a two-floppy set, but the only preserved version is a single 720kB floppy. Based on timestamps, it was built on 15 May 1986, and possibly assembled into a single floppy on 20 March 1997. The kernel is renamed to MSDOS.SYS and IO.SYS, like it is common on MS-DOS (strings inside IO.SYS reveal the source was still named IBMBIO.ASM), and the internal revision string is not present. In addition to what is the first version, it contains a Unix-like PS.EXE utility, revealing some internals about the OS, a kernel debugger (DEBUGDD.SYS), a networking driver (NET.SYS), and DOSSIZE.EXE, an utility printing used and available memory. Strangely, the session manager (SM.EXE) is missing[3].

Installation

For the media, WinWorld has a copy of the Microsoft version, and OS/2 museum has a copy of the Goupil version. VirtualBox is confirmed to be compatible with Multitasking DOS 4. 86Box is also compatible, though 3½ inch floppy drives do not seem to work (this means you have to use the Microsoft release). For best results, try the Phoenix AT clone (under 80286 CPU).

To get Multitasking DOS 4 up and running, create a VM with a floppy drive and an IDE hard drive no larger than 32 MB. Boot from floppy 1, run FDISK and do the usual procedure of partitioning the hard drive. After reboot, run FORMAT C: /S to format the hard drive and install DOS, then you can reboot into the base system. (If you get the "bad or missing command interpreter" trying to boot from hard drive at this point, then boot from the first floppy and run these steps from there.)

There is no installation program, hence to complete the installation process, the files from the floppy have to be manually copied to the hard drive:

C:
COPY A:*.*
MD BIN
CD BIN
COPY A:\BIN\*.*

If installing the Goupil version, the file copying is over now. If installing the Microsoft version, swap to the second floppy, stay in the BIN directory, and run again:

COPY A:*.*

Before rebooting, AUTOEXEC.BAT and CONFIG.SYS have to be modified to point to the hard drive instead of the floppy. Failure to do this will result in a "bad or missing command interpreter" error on boot. EDLIN.EXE is shipped with the system and can be used to do the necessary changes:

EDLIN C:\AUTOEXEC.BAT
*5
      5:*PATH C:\BIN
*E
EDLIN C:\CONFIG.SYS
*3
      3:*C:\BIN\SM.EXE C:\COMMAND.COM
*E

Then you can remove your boot floppy and reboot into the full Multitasking DOS 4.0 system, now running from a hard drive:

Command v. 4.00
Copyright (C) 1981,1985 Microsoft Corp.

[4.0 C:\]

Tips and Tricks

The Alt key starts the Session Manager menu, from which you can create a new session and switch between existing sessions. Each session has a memory limit that can be viewed by the MEMSET command (default is 128kB). Keep in mind that legacy DOS applications (i.e. non-New Executable ones) take the entire space up to the limit, so you probably don't want to set it to maximum. For legacy applications switching between several programs, like Microsoft C 4.0's CL.EXE (calling C1.EXE), the right amount has to be fine-tuned in order to allow both binaries to run (in the case of MSC 4.0, 200kB works, 128kB is too little for C1.EXE to load, 640kB causes CL.EXE to take all the space, leaving none to C1.EXE).

If you installed the Microsoft version, it is recommended to install DOSSIZE.EXE and PS.EXE tools from the Goupil version; if you installed the Goupil version and want the Session Manager (for switching between processes), you have to copy SM.EXE over from the Microsoft version.

Development

Native New Executable Hello world application built using MASM and LINK4 on Multitasking DOS 4.0

No toolchain directly targeting Multitasking DOS 4 was preserved, however, the aforementioned distributions contain an New Executable linker (LINK4.EXE), which can be used together with a suitable assembler or compiler to create NE binaries that will run on Multitasking DOS 4.

MASM 4.0 can be used to assemble a simple program on Multitasking DOS 4. In order to be successfully linked with LINK4.EXE, the program must contain a DGROUP declaration, which is also called Automatic Data Segment in the NE specification. Here's an example implementation of Hello world:

data segment public 'DATA'
assume ds:data
hello db "Hello world$"
db 512 dup(0)
data ends

dgroup group DATA

code segment public 'CODE'
assume cs:code
start:
mov ax, DATA
mov ds, ax
mov dx, offset HELLO
mov ah, 09h
int 21h
mov ah, 4ch
int 21h
code ends
end start

stack segment public 'STACK'
stack ends

Note the 512 zeroes in the data section, without these, the program doesn't work for some currently unknown reasons. This quirk is not shared by Windows 1.0, which runs the Hello world program fine without the zeroes.

An effort to get Microsoft C working is happening on DisNCord. There are two challenges: the lack of a C runtime for Multitasking DOS 4, and Microsoft C compilers being prone to running out of memory on Multitasking DOS 4.

OS/2 Pre-Betas

These need to be sorted by date

IBM OS/2 1.0

MS OS/2 1.0

IBM OS/2 1.1

MSOS/2 1.2

References