As you can read right now It’s running a simple OpenWatcom 16bit hello world based program. The 16bit OS/2 and 32bit OS/2 API’s ended up having different calling sizes, among other issues which had complicated the bridge program. However Ryan’s newer use of scripts to generate the required glue for the API’s at least mean that adding the 16bit/32bit calling conventions & required bridges/glue is at least now automated.

This is super cool, as this will eventually open the door to Watcom C/Fortran, Zortec C, Microsoft Basic/C/Cobol/Fortran and of course many other languages that burst out into the initial OS/2 scene before the eventual weight of the SDK & associated costs doomed OS/2 to failure.

Seriously, for those among us who love OS/2 and have like $5 to spare, send some encouragement to Ryan… 🙂

So this is really super cool! Ryan C. Gordon has written a Wine like program to run OS/2 programs!

Using 32bit Linux, and some native libraries, 2ine can load up an LX (32bit) executable and try to run it under Linux, much in the same way that Wine can run Windows programs. And yes it’ll run EMX built stuff. Although keep in mind the original Microsoft based languages, programs and tools is all 16bit. After the whole Windows 3.0 thing and the split of Microsoft from the OS/2 project all their tools are either 16 bit, or 32bit LE format, which IBM had dumped for the LX format once OS/2 2.0 had shipped.

You can read about his incredible progress, and all the trials and tribulations of running OS/2 programs, along with the craziness that is thunking back and forth to the 16bit space for the old VIO calls that had never were updated to 32bit in that transition phase where a good chunk of OS/2 never was updated from 16bit, over on his patreon page here.

At End Of Road Score: 36/0
Welcome to Adventure! Do you need instructions? (y/n) >n

ADVENTURE
A Modern Classic
Based on Adventure by Willie Crowther and Don Woods (1977)
And prior adaptations by David M. Baggett (1993), Graham Nelson (1994), and
others
Adapted once more by Jesse McGrew (2015)
Release 1 / Serial number 151001 / ZILF 0.7 lib J3

At End Of Road
You are standing at the end of a road before a small brick building. Around you
is a forest. A small stream flows out of the building and down a gully.

At End Of Road Score: 36/0
>

Again it’s works so well it’s amazing!

You can find the 2ine source over on icculus.org here. I had to tweek the heck out of the CmakeList.txt to get it to build, and since I was interested in the command line, I ended up disabling all the SDL / PM stuff, and make sure I had the ‘wide/unicode’ version of ncurses installed.

I don’t think there really was any killer 32 bit OS/2 applications, but with clean room versions of:

doscalls.dll

kbdcalls.dll

msg.dll

nls.dll

quecalls.dll

sesmgr.dll

tcpip32.dll

viocalls.dll

Not to mention being able to call into Linux DLL’s and using ‘clean’ OS/2 DLL’s would let you embrace and extend OS/2.. Or maybe even let you build the proverbial fantasy of both RISC & 64 bit OS/2. …..

I don’t know why I did it, as honestly I didn’t like it on CGA back when it was a thing. Also, thankfully the hard disk speed on PCem is way faster than the real thing. And I’m not complaining.

Installing

Text mode is all the same setup wise, but on reboot the installer goes forward in glorious CGA ‘high res’ mode. Which is pretty terrible.

Welcome to OS/2!

Yuck. I guess at the time I just felt lucky that I could at least run it. Although once I got lucky enough to score an EGA card + monitor. Anyways let’s continue the horror!

Command prompt

Yep, there is the desktop! .. barely. The desktop constantly want’s to jump around which is annoying, just as command prompt’s cant decide if they should be black or white. And the font’s get truncated. It’s almost as if nobody cared about actually supporting CGA. Which honestly I’m more surprised that it even made the cut.

Word and the fox

Sure, I could have changed the default font, but why should I? I know Word 1.1 is very primitive but wow.

To be fair, Windows in CGA is pretty terrible as well.

Could they make the title bar any larger?

Not to mention solitaire on both is nearly impossible between the lack of colour, and the lack of any high resolution. I suppose the Wyse 700 display ought to be much nicer, if only they had gone through the hell of making OS/2 device drivers.

Nothing like a little vintage advertising to try to re-capture the feel. But don’t let the colorful lizard fool you, this certainly was a dark time for Citrix. Firs they had tooled a product around the future of the PC market, OS/2 to only have Microsoft pull out of active development just as they were launching Multiuser 1.0. And to be fair it wasn’t just Citrix, the whole industry including Microsoft was in turmoil as people were pulling away from IBM and selecting Windows on MS-DOS of all things!

Citrix, like a lot of vars were caught in this lurch between OS/2 and the forthcoming NT OS/2 3.0, which of course ended up becoming Windows NT. During this time even Microsoft had to keep selling it’s SQL server on OS/2, along with it’s LanManager file & print server. Although they had a solution for the end user in the form of Windows they didn’t have any server platform. That left Citrix chasing the tail end of the application wave again as although they could now finally use OS/2 2.0, with it’s 32bit/16bit hybrid kernel, there remote user solution was still terminal based.

IBM OS/2 ad

As IBM & Microsoft had split up the direction of the OS/2 project, IBM was running with version 2 as a platform for running DOS & Windows applications. Which ultimately lead to the major problem that OS/2 ran Windows apps better than native Windows thanks to it’s ability to run isolated Windows VM’s using paravirutalized graphic drivers. It wasn’t until Windows NT 3.5 could Microsoft meet this feat with it’s new platform. Suddenly Citrix had access to tonnes of MS-DOS based applications, much to my surprise there is even a DPMI driver on the disks I have, meaning that Windows 3.0 standard mode can run, along with DooM! But for Citrix this would be another one of those ‘not good enough’ moments where PC Servers were just high end workstations that could easily be maxed by one user, commodity multiprocessor machines were years off, and of course everyone was jumping to Windows 3.0.

But this did at least you run MS-DOS applications remotely, over dialup.

Citrix multiuser 2.0 boot

Installing Citrix Multiuser 2.00 starts looking very much like one of the 1.x versions of OS/2 with a far more busier screen featuring the Citrix tree. However from this point onward it feels a LOT more like IBM OS/2 2.00. Citrix interestingly enough has two disk 1’s, one that features newer LADDR drivers, and another with the older 1.x drivers. Although under bochs, the older driver disk crashes out. The entire OS fits on 8 high density 5 1/4″ diskettes. As teased before this post, I saw this on eBay, ordered it immediately to only discover that I don’t have the needed drive, and had to order one from pc-rath_de, and I wanted to give a shout out, as he made sure that I had the proper floppy ribbon cable, so I could go ahead with this fun project.

Although I had been expecting this to be inline with the never released Microsoft OS/2 2.00, it clearly has a lot of IBM vestige, even though the OS/2 source code license agreement was between Citrix and Microsoft.

So this make the BOS (Base Operating System in IBM speak) newer than the OS/2 LA (Limited Availability) kernel, however quite a few revisions behind the GA (General Availability). This of course means that Citrix Multiuser 2.0 is basically incompatible with any 32bit OS/2 software. I was unable to run anything EMX based, nor could I run the vast majority of the 32bit TCP/IP stack for OS/2 2.00. The best I could do was have it load the drivers, to where I could setup and ping the loopback, but the route command crashes the system, and any of the commands simply refuse to run. Not being able to run 32bit OS/2 applications greatly reduces the usability of the system, and falls further to the OS/2 trap that it really just excels at running MS-DOS apps.

It was a bit of a surprise to find out that even though Citrix had their source license through Microsoft, the 2.0 components turned out to be the upstream components from IBM. Just as the included Qbasic is the IBM version, along with the other components. The terminal support is naturally more robust than version 1, although I think the larger problem I had trying to run OS/2 programs it that many terminals are hard coded for 24 lines, and I don’t think you can change that in Citrix. And it does mention that if you do try to run on a 24 line terminal that DOS won’t run.

Much like 1.0, all the administration is done via text tools. It feels weird at first as even on the console there doesn’t seem to be any mouse integration, although the installer does ask if you do have a mouse on the system.

And like 1.0 there is no Presentation Manager, so no graphics on the console. HOWEVER you can run MS-DOS graphical stuff on the console. Although today I have no real need for it, but I went ahead and setup the included Windows support.

Windows for OS/2

What is interesting is that you are expected to supply your own retail version of Windows 3.00, and Citrix has some updated drivers, along with OS2K286.EXE, and updated program manager, control panel, and print manager. While IBM included a full copy of Windows 3.00 at this point, this feels like the beginning of OS/2 for Windows – AKA the Borg.

Going Multiuser

First I just setup a COM port on Bochs to Listen on port 8880. Unfortunately this isn’t resilient, as Bochs will wait for a connect before actually starting, and if you drop off, it won’t let you connect back in.

com1: enabled=1, mode=socket-server, dev=localhost:8880

And then it’s a matter of running CFGTERM, and adding in the Async module.

Citrix add in Async

With the module added you then just have to assign a port.

ICA profile

I didnt’ do anything special other than telling Citrix that there is no modem, it’s a direct connect, and to use the ICA terminal profile.

Using the Citrix MultiLink program, and DOSBox I was able to add an ICA terminal. On DOSBox I had to specify a modem with an IRQ in the config like this:

serial2=modem irq3 listenport:5001

CML modem settings

In the modem settings I had to set this to Forced connect, otherwise it’ll never see the server.

CML dialup profile

And here is how I ‘called’ the Bochs VM. And then after ‘dialing’ in Bochs will start up the Citrix VM, and then you’ll get the simple Login prompt. Login and you’ll get pselect.

Logging in to Pselect

Pselect the the text based UI tool to get around your OS/2 sessions. It’s a little cumbersome at first, but once you get used to it, it’s just like OS/2 1.0 … Or Multiuser 1.0 for that matter, nothing really changed, except you can start MS-DOS Sessions now.

MS-DOS over the serial port

And yes, you can run Qbasic. But you can’t do anything graphical. Not even DooM. Although after loading the VDPMI device driver, DooM v1.1 will run, but then it’ll give you this fun error:

I think this is the proverbial OS/2 holy grail, a shipped copy of Microsoft OS/2 2.0

From a press release:

Coral Springs, Florida based Citrix Systems Inc has a new release of its multiuser implementation of MS-DOS. Multiuser 2.0 is designed to run any combination of MS-DOS, Microsoft Windows and OS/2 applications concurrently, and to provide all key features of commercial-grade operating systems multiuser, multitasking operation with terminal support, security, resource management, remote access and administration utilities. It is claimed to be a 32-bit operating system for Intel Corp iAPX86 machines from the 80386SX up. It is claimed to be compatible with Novell Inc NetWare, Microsoft LAN Manager, IBM LAN Server, and Banyan Vines networks, enabling it to function as a low-cost network extender. The ability to run graphical applications at the console will be available next month, with support of graphics at the terminal level will be added in April as a no charge upgrade. Citrix Multiuser 2.0 is $1,000 for a five-user package; doubling the number of users is $500, regardless of how many there were originally. An unlimited user licence is $2,000 once you’ve bought the five user licence. Out next month.

Looking at the copy I have, it’s strictly for OS/2 and MS-DOS programs. There isn’t any hint of it supporting 32-bit OS/2 programs, so I have the suspicion that this is like the OS/2 FOOTBALL beta, which was the 1.0 kernel with 386 based paging (virtual memory) and v86 mode support for multitasking MS-DOS. The manuals also state that there is no support for Presentation Manager either at the console or remotely. So it appears that like Citrix Multiuser version 1.0 it is strictly text mode based.

EMX on Win32

I know it’s utterly pointless… But yeah GCC 2.8.1 + EMX 0.9d, hosted (running) on Win32. The main reason is that I wanted to be able use use my substantially faster Win64 machines to build stuff for OS/2. And since I have a 4 core (+4 hyper thread), I want to be able to use make with the -j 16 flag, and say compile QuakeWorld/2 in under two seconds.

I was able to get the binutils 2.6 derived stuff to compile, along with the ‘ancient’ binutils which is notably the linker that EMX depends on. I would imagine this ought to be able to compile PDOS, although my own simple attempt at InfoTaskForce met with spectacular failure. While it does compile fine using an older EMX 0.8h based release.

Over at pcjs.org, this interesting prototype version of OS/2 has been unearthed. What this means is that not only was there prototypes of a 386 aware version of OS/2 in 1986, but by 1987 the base of cruiser AKA OS/2 2.0 was already in place. With this now somewhat made public, it really is clear that IBM’s meddling in OS/2 prevented it from being a success.

Check out the design document below:
The following text is from an email titled “3xBox Design Document” sent to the football alias on Saturday, February 28, 1987, at 5:02pm.

Overview

The goal for this research project was to demonstrate the feasability of supporting multiple virtual DOS 3.x machines on a 286DOS-based kernel running on an 386 personal computer. Each “3xBox” would have its own virtual screen, keyboard, interrupt vectors, and address space. Furthermore, well- behaved DOS 3.x applications that do text (as opposed to graphic) screen output would run in the background.

In order to acheive this goal in a reasonable amount of time, we started from the 286DOS “sizzle” kernel and made the minimum amount of changes necessary, both in code and fundamental design. The resulting DOS will be referred to as “386DOS” in this paper.

386DOS provides up to four 3xBoxes, depending upon the available RAM. More 3xBoxes could be supported if a slight change is made to the method of allocating page tables.

Well-behaved DOS 3.x applications (i.e., MS-Multiplan, MS-Word, Lotus 1-2-3) can run in the background, multi-tasking against one another and against the foreground screen group. Lotus 1-2-3 (version 2.01) passes its floppy-based copy protection when in the foreground.

It should be noted that 386DOS, while functional, is not an optimal design/implementation of multiple 3xBoxes. In particular, interrupt management, the device driver model, and the existence of V86-mode kernel code should be modified before 386DOS is made a commercial product.

Unless stated otherwise, most of the concepts extant in 286DOS apply to 386DOS.

V86 Mode and the 386

The 386 CPU has three distinct execution modes: REAL, PROT, and V86. REAL
and PROT modes are largely compatible with the corresponding modes of an 286.
V86 modes is exactly the same as RING 3 PROT mode, with the following
differences:

o Memory Address Hierarchy
A 386 has three levels of memory addresses:
– Virtual (Intel refers to this as Logical)
This is either the selector:offset or segment:offset address used by unprivledged machine language code.
– Linear
This is the 32-bit address arrived at either via a GDT/LDT
selector lookup, or via the 8086-compatible (seg << 4 + offset).
– Physical
This is the 32-bit address arrived at by pushing a linear address
through the paging mechanism. This is the address that the CPU
sends out on the bus to select physical memory.

When in V86 mode, the CPU performs the 8086-compatible computation.

o I/O instructions are NOT IOPL-sensitive
Trapping of I/O is done using the IO Permission Map.

o All instructions which modify or expose the Interrupt Flag ARE IOPL-
sensitive.
This allows the OS to simulate the Interrupt Flag, if desired.

V86 IRETD Frame

When any interrupt, trap, exception, or fault occurs in V86 mode, the CPU
switches to PROT mode and switches to the TSS Ring 0 Stack and builds the
following stack frame:

CPU Mode Determination

A new implementation of the WHATMODE macro was written in order to distinguish
between the three CPU modes: REAL, PROT, and V86. REAL mode is indicated by
a 0 PE bit in CR0 (a.k.a. MSW on a 286). If the PE bit is 1, then the mode
may be either PROT or V86. These two modes may be distinguished by attempting
to change the IOPL bits in the FLAGS word. At Ring 0 in PROT mode (the only
place WHATMODE is used), the IOPL may be changed. In V86 mode, IOPL cannot
be changed. So, we change IOPL and then check to see if it changed. If so,
PROT mode, else V86 mode.

CPU Mode Switching

The 286DOS kernel relies extensively on switching inbetween REAL and PROT.
This functionality is provided by the RealMode and ProtMode routines.
In 386DOS, RealMode is no longer needed. As soon as we switch to PROT mode
during SysInit, the CPU only uses PROT and V86 modes.

Two new routines, ProtToV86 and V86ToProt, that are analogous to RealMode and
ProtMode. ProtToV86 is quite straightforward. We build a V86 IRETD frame
on the stack with the VM bit set in the EFLAGS image. We set the SS:SP
image to be equivalent to the stack just above the V86 IRETD frame, and
set the CS:IP image to instruction following an IRETD. Then, we issue the
IRETD and the CPU continues processing following the IRETD and in V86 mode.

V86ToProt is a bit trickier. The only way to get out of V86 mode is to
trap or fault or issue a software interrupt. We chose to use a software
interrupt, 30h, which we call the V86 Services interrupt. The INT 30h entry
in the IDT is a ring 3 interrupt gate, so issuing an INT 30 from V86 mode
causes a V86 IRETD frame to be built on the TSS Ring 0 stack and control
transfers to the INT 30h vector. The handler verifies that the INT 30h
was issued by the V86ToProt routine (checks CS:IP on the stack). If not,
the interrupt is reflected back to the requesting 3xBox (See Interrupt
Reflection). If it was V86ToProt, we clean off the stack frame and return to
the caller. NOTE: V86 Services is also used for completing the 386 LOADALL
used by PhysToVirt to map “high” memory in “REAL” mode.

Stack Switching

In order to maintain the 286DOS mode switch and stack switch semantics
when V86 mode is used, we have a new stack (the V86 Stack) in the 3xBox PTDA.

286DOS Modes and Stacks

The RealMode and ProtMode procedures in 286DOS are the only ways to switch
the CPU execution mode. These routines both maintain SS:SP, allowing
RealMode and ProtMode to be reentrant. The TSS Ring 0 stack is always the
current TCB stack in the current PTDA. The only other stacks in the system
are the Interrupt Stack and user stack(s).

386DOS Modes and Stacks

In 386DOS, any interrupt or exception while in V86 mode causes a switch to
PROT mode and the TSS Ring 0 Stack. So we have a new way to mode switch with
an incompatible stack semantic. We had to fix this mode switch to make it
compatible with 286DOS.

Observation

In V86 mode, the current stack must not be the TSS Ring 0 Stack. The CPU
only leaves V86 mode via an interrupt/exception, which causes a stack switch
to the TSS Ring 0 Stack. If the current stack was the same as the TSS Ring 0
Stack, then the stack might get corrupted. In 286DOS, the Ring 0 Stack is
the PTDA. Since we run on this stack in V86 mode, we need a new Ring 0 stack
when a 3xBox is running.

Approach

1) When a PMBox is running, the TSS Ring 0 Stack is a PTDA TCB stack.
+ This is consistent with the 286DOS model.

2) When a 3xBox is running, the TSS Ring 0 Stack is the “V86 Stack”.
+ The V86 Stack is allocated in the 3xBox PTDA.
+ If the cause of the mode switch can be handled without enabling
interrupts (e.g., interrupt reflection, IN/OUT trapping), we stay
on the V86 stack.
+ Otherwise, copy the V86 IRETD frame to the previous stack and
switch back to the previous stack.

Details

1) Leaving V86 mode
a. V86ToProt (analog of ProtMode)
+ Issue special V86ToProt software interrupt. If the interrupt
gate is DPL=3 (and it must be a 386 Interrupt Gate), then the 386
switches to Ring 0 (and the TSS Ring 0 stack) and transfers
control to the handler.
+ To ensure that 3xBox apps don’t use this feature, the interrupt
handler checks that CS=DosGroup and IP is in the correct range.
If not, then the interrupt is reflected (see below).
+ To make V86ToProt compatible with ProtMode, the interrupt handler
switches to the old stack (we get SS:ESP from TSS Ring 0 stack,
which is where we are running).
+ Finally, V86ToProt restores saved registers and flags from the
stack and returns to caller.

c. Hardware interrupt
+ To make this operation compatible with 286Dos, the interrupt
handler copies the V86 stack from the TSS Ring 0 stack to
the old stack, then switches stacks to the newly modified old
stack. This allows the Interupt Manager to do an IRETD to
get back to the correct mode.

Interrupt Management

All software interrupts, hardware interrupts, and CPU traps and exceptions
are vectored through a common IDT, regardless of whether the CPU is in PROT
or V86 mode.

NOTE: Background 3xBoxes get no hardware interrupts. In the commercial 386DOS,
this restriction can be relaxed so that interrupts, other than for the
keyboard and mouse (since those are implicitly for the foreground box),
can be given to background 3xBoxes.

Passing Hardware Interrupts to the Foreground 3xBox

In the interrupt manager:

IF a 3xBox is foreground -AND-
the current mapped 3xBox is background
THEN
MapIn foreground 3xBox;
Dispatch interrupt;

And to make things more interesting, from the later version of FOOTBALL, oddly enough version 4:

OS/2 FOOTBALL Boot Disk (v4.41.00)

This disk contained an updated version of OS/2 FOOTBALL Boot Disk (v4.41.00). It was built in December 1987, using final OS/2 1.0 sources merged with assorted FOOTBALL changes, and although it was originally assigned version number 1.3, this version of OS/2 would ultimately become 2.0.

It crashes on an 80286, jumping to invalid code immediately after performing a processor check. On an 80386, the following version banner is displayed:

The numbering of revisions must have been, um, revised, because despite the lower revision (4.41.00 vs. 7.68.17), it is newer than the 7.68.17 prototype. This is confirmed by the boot message (12/02/87), the file dates (12-23-87) and the higher version number (1.3).

I think I’m the last one on the internet crazy enough to try this, but here goes…

So the VPS where I run my BBS came up, and they wanted more money. And honestly, running a BBS from 1994 in 2015 just doesn’t cut it when it comes to system resources, and I’ve been looking for an excuse to bring it ‘home’ so I moved it inside. The cool thing though is that I don’t have to use usermode nat anymore, so I can use FTP to shuffle files around, which is a nice thing to have. I may have to investigate if there is an rsync as well, as reading files directly from the VM would be a bonus. It’d be cool to read things like Tradewars scores, last user activity and whatnot.

While I was setting up HTTP, and repointing to a new address, I figured I’d go all in on OS/2, and load up Apache on OS/2 2.0, and let it host it’s own website.

Hosting on OS/2

The ‘hard’ thing to fight was updating the mime.types, and dealing with CR/LF issues moving my old pages from Linux to OS/2. Luckily my C: drive is already HPFS, so I have long filenames already.

I guess the next thing to do is setup a RAM disk, and virtual servers so I can move Team OS/2 onto OS/2. Someone named Kohtaro Shinya just snagged the original Team OS/2 page. At least it’s not some forex scam, but now it’s tourism for Osaka.

But yes, my crappy BBS still lives, I think it’s moved hosts at least 7 times since 2011.

No go. Also Qemu 2.1.2 on Linux didn’t fare much better. Must be something about HPFS and raw disk images. The funny thing is that even once a disk became corrupted, I quit Qemu, restore the disk, and start again, and it’s still behaving like it’s corrupt. Qemu 0.15.X has been the most stable branch I’ve found to run OS/2, but it’s so obsolete now.