<!--
.. title: Windows 3.1 on Raspberry Pi CM4
.. slug: windows-31-on-raspberry-pi-cm4
.. date: 2023-01-22 17:59:10 UTC-06:00
.. tags: raspberry pi cm4, windows 3.11, visual basic 3, dosbox, compute module
.. category:
.. link:
.. description:  Running ancient software on modern Arm-based system on a module is extremely easy and straightforward.
.. type: text
-->



<div class="audio-widget">
<div class="audio-widget-header">
<span class="audio-widget-icon">🎧</span>
<span class="audio-widget-label">Listen to this article</span>
</div>
<audio controls preload="metadata">
<source src="/windows-31-on-raspberry-pi-cm4_tts.mp3" type="audio/mpeg">
</audio>
<div class="audio-widget-footer">3 min · AI-generated narration</div>
</div>

I got my start with computers in the late 1980s on an Apple IIe. By 1990, my father had been bringing home a laptop from his work. When he was not working, I would use Microsoft QBasic (here is a [JavaScript implementation](https://baud.rs/ULa33t) of QBasic).  Three years later, we had a Gateway 2000 desktop computer.  It sported an Intel 486 50Mhz with 24MB of ram and about 512MB of disk space.  Also in 1993, I was able to get a real copy of Visual Basic 3 from a friend who had gone off to college; he bought it for me from the campus bookstore.

Fast forward thirty years, and here, in 2023, I'm all about single board computers, and in particular, Arm-based SBCs.

Can one run software that was written thirty years ago that was intended to run on a completely different architecture? The answer is yes, and it is damn simple, too.

<pre>
<code class="command">sudo apt install dosbox</code>
</pre>

Download [Windows 3.11](https://baud.rs/VxmrPl) from [archive.org](https://baud.rs/5ZAcYu).

Unzip the archive

Run `dosbox`

<pre>
<code class="command">dosbox</code>
</pre>

Mount the Windows 3.11 directory as drive `c:`

<pre>
mount c /home/pi/win3.11
c:
setup
</pre>

Follow the instructions on the screen.

Installing Visual Basic 3.0 is also simple.  Download an [ISO from archive.org](https://baud.rs/RnlrZ8).

Mount the ISO to a directory in your home directory on the Raspberry Pi, copy the contents and execute in Windows 3.11.

<pre>
<code class="command">mkdir cdrom</code>
<code class="command">sudo mount -o loop VBPRO30.ISO cdrom</code>
<code class="command">mkdir win3.11/cdrom; cp -R cdrom/* win3.11/cdrom/; chmod -R 755 win3.11/cdrom</code>
</pre>

I found I needed to restart `dosbox` in order for the new directory to show up.  Repeat mounting `/home/pi/win3.11` in `dosbox`.

<pre>
mount c /home/pi/win3.11
c:
cd Windows
win
</pre>

Navigate with `File Manager` to `c:` drive, open the `cdrom` folder, go to `DISK1` and execute `SETUP.EXE`

As a helpful note, to release the mouse from `dosbox`, simply press `CTRL+F10`

You might be asking, *what's the point of this exercise?* - It is *because it can be done*.

<div style="width: 100%; text-align: center">
<iframe width="100%" height="480px" src="https://www.youtube-nocookie.com/embed/keS-Hq3zKiw" title="YouTube video player" frameborder="0"  loading="lazy" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen></iframe>
</div>

<div style="height: 50px; width: 100%; text-align: center;">
<a href="https://baud.rs/Ks7G4h" target="_blank">eBay Windows 3.11</a>
</div>
