<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Windows NT 3.1 &#8211; Virtually Fun</title>
	<atom:link href="https://virtuallyfun.com/category/windows-nt-3-1/feed/" rel="self" type="application/rss+xml" />
	<link>https://virtuallyfun.com</link>
	<description>Fun with Virtualization</description>
	<lastBuildDate>Mon, 20 Apr 2026 19:36:19 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=7.0</generator>
	<item>
		<title>Fun with POSX subsystem on NT</title>
		<link>https://virtuallyfun.com/2026/04/19/fun-with-posx-subsystem-on-nt/</link>
					<comments>https://virtuallyfun.com/2026/04/19/fun-with-posx-subsystem-on-nt/#respond</comments>
		
		<dc:creator><![CDATA[neozeed]]></dc:creator>
		<pubDate>Sun, 19 Apr 2026 08:45:33 +0000</pubDate>
				<category><![CDATA[cross compiler]]></category>
		<category><![CDATA[gcc]]></category>
		<category><![CDATA[gnu]]></category>
		<category><![CDATA[Windows NT 3.1]]></category>
		<guid isPermaLink="false">https://virtuallyfun.com/?p=15686</guid>

					<description><![CDATA[Well this is going to be a seemingly pointless post but you know I love stuff like this. I&#8217;d already gotten GCC 1.40 to run on the Windows NT 1991December Pre-Release, but that&#8217;s all Win32, what about the much vaunted &#8230; <a href="https://virtuallyfun.com/2026/04/19/fun-with-posx-subsystem-on-nt/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
										<content:encoded><![CDATA[
<p class="wp-block-paragraph">Well this is going to be a seemingly pointless post but you know I love stuff like this.  I&#8217;d already gotten GCC 1.40 to run on the Windows NT 1991December Pre-Release, but that&#8217;s all Win32, what about the much vaunted POSIX subsystem?</p>



<p class="wp-block-paragraph">Well what is it?  Basically it&#8217;s just enough of the UNIX/POSIX standard to check a box that gave Windows NT an in for US Government contracts that required a POSIX checkbox.  And nothing else more.  It&#8217;s basically agreed that it&#8217;s just enough to run &#8216;vi&#8217; and that&#8217;s basically it.</p>



<p class="wp-block-paragraph">But surely we can probably do more with this?</p>



<p class="wp-block-paragraph">The first fun part is that setting up the environment is basically <strong>UNDOCUMENTED</strong>. It was a nightmare back. then, as you need to setup a termcap environment that again is not mentioned.  The only hint is is an old KB article <a href="https://jeffpar.github.io/kbarchive/kb/108/Q108581/">Q108581</a>, which sets out the vauge guide.  I do know that back in the day I did have vi running, but I can&#8217;t remember how I did it exactly but wow.</p>


<div class="wp-block-image">
<figure class="alignleft size-full"><a href="https://archive.org/details/win32-sdk-final-release-nt-31" target="_blank" rel=" noreferrer noopener"><img decoding="async" width="180" height="180" src="https://virtuallyfun.com/wp-content/uploads/2026/04/image-10.png" alt="" class="wp-image-15687" srcset="https://virtuallyfun.com/wp-content/uploads/2026/04/image-10.png 180w, https://virtuallyfun.com/wp-content/uploads/2026/04/image-10-150x150.png 150w" sizes="(max-width: 180px) 100vw, 180px" /></a></figure>
</div>


<p class="wp-block-paragraph">The first thing you need to do, naturally is install Windows NT 3.1. I did have access to this fun CD back in the day, it&#8217;s a combination <a href="https://archive.org/details/win32-sdk-final-release-nt-31" target="_blank" rel="noreferrer noopener">Windows NT 3.1 Workstation +SDK CD-ROM</a>.  This way you not only get the operating system, but you also now have the C compiler, libraries and headers.  Once setup, there is even a POSIX sample program.  Great?  Well, no.  Because this doesn&#8217;t include the OS environment, there is no previous &#8216;vi&#8217; either. Very sad.  Naturally you need another CD to install, which of course back in the day if you were going to use or support Windows NT, you&#8217;d naturally run out or order the <a href="https://archive.org/details/mswinntrskt310_20190128" target="_blank" rel="noreferrer noopener">Windows NT Resource Kit</a>.  These were absolutely required back in the day as the &#8216;task manager&#8217; only at best would show you named windows, it doesn&#8217;t show you the actual processes, making managing NT a nightmare without pviewer. (process viewer), among others.</p>


<div class="wp-block-image">
<figure class="aligncenter size-full"><img fetchpriority="high" decoding="async" width="408" height="308" src="https://virtuallyfun.com/wp-content/uploads/2026/04/image-11.png" alt="" class="wp-image-15688" srcset="https://virtuallyfun.com/wp-content/uploads/2026/04/image-11.png 408w, https://virtuallyfun.com/wp-content/uploads/2026/04/image-11-300x226.png 300w, https://virtuallyfun.com/wp-content/uploads/2026/04/image-11-397x300.png 397w" sizes="(max-width: 408px) 100vw, 408px" /><figcaption class="wp-element-caption">Windows NT Task List</figcaption></figure>
</div>


<p class="wp-block-paragraph">On the Resource Kit is not only a tiny &#8216;userland&#8217; but also it includes Elvis a vi clone, along with a much needed &#8216;cc&#8217; wrapper that will let you invoke the SDK C compiler as if it&#8217;s the Unix cc C compiler command.</p>



<p class="wp-block-paragraph">Elvis was written by Steve Kirkendall, back in the day, and even on Linux back in the day, I was using Elvis as well.  Remember &#8216;real&#8217; vi was tied to needing a 32v / BSD source license so it wasn&#8217;t free. </p>



<pre class="wp-block-code"><code>/* Author:
 *      Steve Kirkendall
 *      14407 SW Teal Blvd. #C
 *      Beaverton, OR 97005
 *      kirkenda@cs.pdx.edu
 */</code></pre>



<p class="wp-block-paragraph">It&#8217;s just how things were back then.</p>



<p class="wp-block-paragraph">To make things weird, I installed Windows NT onto a HPFS partition, because I wanted long file names, but I didn&#8217;t want to have a case preserving filesystem, as these old things have so much UPPERCASE/lowercase naming conflicts, because YES as a feature of NTFS &amp; POSIX it really does support Mixed case naming.  And I don&#8217;t feel like dealing with it, and it&#8217;s 1993, and HPFS is still a popular filesystem for us OS/2 users.</p>



<p class="wp-block-paragraph">Okay, so you&#8217;ve installed both the SDK &amp; the resource kit, surely you can just run vi?</p>



<figure class="wp-block-image size-full"><img decoding="async" width="452" height="174" src="https://virtuallyfun.com/wp-content/uploads/2026/04/image-13.png" alt="" class="wp-image-15690" srcset="https://virtuallyfun.com/wp-content/uploads/2026/04/image-13.png 452w, https://virtuallyfun.com/wp-content/uploads/2026/04/image-13-300x115.png 300w" sizes="(max-width: 452px) 100vw, 452px" /></figure>



<p class="wp-block-paragraph">No. No you cannot. Remember you need that TERM variable and termcap library!</p>



<p class="wp-block-paragraph">Now to save you the hassle you&#8217;ll go back and check Q108581 and you&#8217;ll see this example:</p>



<pre class="wp-block-code"><code>li|ansi|psx_ansi|:\ 

            :co#80:li#25:\ 
            :am:pt:ms:bw:\ 
            :cl=\E&#91;2J:cm=\E&#91;%i%d;%dH:ce=\E&#91;K:cd=\E&#91;J:\ 
            :sf=\E&#91;S:sr=\E&#91;T:\ 
             :ho=\E&#91;H:sc=\E&#91;s:rc=\E&#91;u:up=\E&#91;A:d=^J:nd=\E&#91;C:le=^H:\ 
             :ku=\E&#91;A:kd=\E&#91;V:kr=\E&#91;C:kl=\E&#91;D:kb=^H:\ 
             :so=\E&#91;7m:se=\E&#91;m:mr=\E&#91;7m:me=\E&#91;0m:\ </code></pre>



<p class="wp-block-paragraph">copy paste and and, yeah IT DOESNT WORK.  Like something being passed endlessly through a photocopier, it got mangled in usenet (maybe where I found it?) , and yeah you need to &#8216;fix&#8217; it up as it should look more like this.</p>


<div class="wp-block-image">
<figure class="aligncenter size-full"><img loading="lazy" decoding="async" width="553" height="284" src="https://virtuallyfun.com/wp-content/uploads/2026/04/Screenshot-2026-04-19-at-8.21.16-AM.png" alt="" class="wp-image-15691" srcset="https://virtuallyfun.com/wp-content/uploads/2026/04/Screenshot-2026-04-19-at-8.21.16-AM.png 553w, https://virtuallyfun.com/wp-content/uploads/2026/04/Screenshot-2026-04-19-at-8.21.16-AM-300x154.png 300w, https://virtuallyfun.com/wp-content/uploads/2026/04/Screenshot-2026-04-19-at-8.21.16-AM-500x257.png 500w" sizes="auto, (max-width: 553px) 100vw, 553px" /></figure>
</div>


<p class="wp-block-paragraph">Or for anyone hoping to copy/paste:</p>



<pre class="wp-block-code"><code>li|ansi|psx_ansi|:\
	:co#80:li#25:\
	:am:pt:ms:bw:\
	:cl=\E&#91;2J:cm=\E&#91;%i%d;%dH:ce=\E&#91;K:cd=\E&#91;J:\
	:sf=\E&#91;S:sr=\E&#91;T:\
	:ho=\E&#91;H:sc=\E&#91;s:rc=\E&#91;u:up=\E&#91;A:d=^J:nd=\E&#91;C:le=^H:\
	:ku=\E&#91;A:kd=\E&#91;V:kr=\E&#91;C:kl=\E&#91;D:kb=^H:bc=^H:\
	:so=\E&#91;7m:se=\E&#91;m:mr=\E&#91;7m:me=\E&#91;0m:\</code></pre>



<p class="wp-block-paragraph">Note that the leading &#8216;tab&#8217; actually matters and there should be NO empty spaces at the tail backslash!  If that tab or ending \ is padded or wrong it just plain will not work.  I wasted so much time before realizing the craziness of this setup.</p>



<p class="wp-block-paragraph">Okay.</p>



<p class="wp-block-paragraph">Thinking that&#8217;s enough you have to keep reading, as the POSIX environment has no idea what c: is, or how to set variables, so you need to specify the full NT path, not the Win32 path</p>



<p class="wp-block-paragraph">To save the adventure some time this is what I end up just putting into a CMD file so I can just click and go!</p>



<pre class="wp-block-code"><code>@stitle posix
@set PATH=c:\bin;%PATH%
@set Lib=c:\mstools\posix\lib;%lib%
@set Include=c:\mstools\posix\h;%include%
@set TERM=ansi
@set TERMCAP=//C/etc/termcap
@set _POSIX_TERM=on
@set TEMP=
@set tmp=
@set INCLUDE=
@set include=
@set lib=/usr/lib
@set tmp=//C/tmp
@set temp=//C/temp
@set MAKEPATH=//C/posix/src/MK-RULES
@cls
@sh</code></pre>



<p class="wp-block-paragraph">Now with a corrected environment for POSIX and a termcap file, now we can actually run VI/Elvis!</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="633" height="327" src="https://virtuallyfun.com/wp-content/uploads/2026/04/image-14.png" alt="" class="wp-image-15692" srcset="https://virtuallyfun.com/wp-content/uploads/2026/04/image-14.png 633w, https://virtuallyfun.com/wp-content/uploads/2026/04/image-14-300x155.png 300w, https://virtuallyfun.com/wp-content/uploads/2026/04/image-14-500x258.png 500w" sizes="auto, (max-width: 633px) 100vw, 633px" /><figcaption class="wp-element-caption">Elvis running correctly on the POSIX subsystem</figcaption></figure>



<p class="wp-block-paragraph">This is what success looks like!</p>



<p class="wp-block-paragraph">Now I know what you&#8217;re thinking okay, were setup now, we can just build something simple like say a hello world style program right?  I made a simple Makefile, and let&#8217;s go ahead and try to invoke the &#8216;cc&#8217; compiler wrapper:</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="634" height="331" src="https://virtuallyfun.com/wp-content/uploads/2026/04/image-15.png" alt="" class="wp-image-15693" srcset="https://virtuallyfun.com/wp-content/uploads/2026/04/image-15.png 634w, https://virtuallyfun.com/wp-content/uploads/2026/04/image-15-300x157.png 300w, https://virtuallyfun.com/wp-content/uploads/2026/04/image-15-500x261.png 500w" sizes="auto, (max-width: 634px) 100vw, 634px" /></figure>



<p class="wp-block-paragraph">And it just hangs, doing nothing.  As it turns out that the &#8216;cc&#8217; wrapper uses a file for IPC to talk between POSIX &amp; WIN32.  Remember they are separate personalities on the NTOKS kernel, and they cannot directly communicate with eachother.</p>


<div class="wp-block-image">
<figure class="aligncenter size-full"><img loading="lazy" decoding="async" width="474" height="355" src="https://virtuallyfun.com/wp-content/uploads/2026/04/image-16.png" alt="" class="wp-image-15694" srcset="https://virtuallyfun.com/wp-content/uploads/2026/04/image-16.png 474w, https://virtuallyfun.com/wp-content/uploads/2026/04/image-16-300x225.png 300w, https://virtuallyfun.com/wp-content/uploads/2026/04/image-16-401x300.png 401w" sizes="auto, (max-width: 474px) 100vw, 474px" /></figure>
</div>


<p class="wp-block-paragraph">I don&#8217;t know why they didn&#8217;t use a named pipe, maybe POSIX cannot write to them?  Maybe when they were writing the POSIX subsystem, named pipes weren&#8217;t working yet?  It&#8217;s hard to say, and the early NT 3.1 pre-releases don&#8217;t included the POSIX, or OS/2 subsystem.  Actually they don&#8217;t even have the NTVDM/MS-DOS/WoW either.</p>



<p class="wp-block-paragraph">So you need to run something called &#8216;devsrv&#8217; which is a Win32 program that looks for c:\tmp\ for devsem.ini file telling it what Win32 program to run and how.  For example, in this case it looks like this:</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="585" height="327" src="https://virtuallyfun.com/wp-content/uploads/2026/04/Screenshot-2026-04-19-at-8.36.08-AM.png" alt="" class="wp-image-15696" srcset="https://virtuallyfun.com/wp-content/uploads/2026/04/Screenshot-2026-04-19-at-8.36.08-AM.png 585w, https://virtuallyfun.com/wp-content/uploads/2026/04/Screenshot-2026-04-19-at-8.36.08-AM-300x168.png 300w, https://virtuallyfun.com/wp-content/uploads/2026/04/Screenshot-2026-04-19-at-8.36.08-AM-500x279.png 500w" sizes="auto, (max-width: 585px) 100vw, 585px" /></figure>



<p class="wp-block-paragraph">Now if you think you can just blindly run devrv, you&#8217;ll 99% of the time be in for a bad time as you need to initialize a working Win32-&gt;POSIX cross environment.  Me being, me I just put this into another CMD file:</p>



<pre class="wp-block-code"><code>title devsrv
@set PATH=c:\bin;c:\mstools\bin;%PATH%
@set Lib=c:\mstools\posix\lib;c:\usr\lib
@set Include=c:\mstools\posix\h;c:\usr\include
@set TEMP=c:\temp
@set tmp=c:\tmp
@c:\bin\devsrv</code></pre>



<p class="wp-block-paragraph">I&#8217;ve already started to place headers &amp; libraries into a more &#8216;UNIX&#8217; like path structure with /usr/include &amp; /usr/lib although by default the MSFT scripts expect things to live in the SDK world.  But I do have goals of running GCC and dealing with weird paths isn&#8217;t my goal as the less I have to fight, the better.</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="628" height="460" src="https://virtuallyfun.com/wp-content/uploads/2026/04/image-18.png" alt="" class="wp-image-15697" srcset="https://virtuallyfun.com/wp-content/uploads/2026/04/image-18.png 628w, https://virtuallyfun.com/wp-content/uploads/2026/04/image-18-300x220.png 300w, https://virtuallyfun.com/wp-content/uploads/2026/04/image-18-410x300.png 410w" sizes="auto, (max-width: 628px) 100vw, 628px" /><figcaption class="wp-element-caption">Compiling &#8216;hi&#8217; from within the POSIX subsystem</figcaption></figure>



<p class="wp-block-paragraph">  Now with devsrv running it cannot call the C compiler, and the linker.  It will fail at first as it&#8217;s expecting to link against NTDLL.LIB as in the Pre-release/Beta days there was a &#8216;ntdll&#8217; you had to link against.  It isn&#8217;t there in the RTM Windows NT, so it&#8217;s kind of clear that although POSIX shipped it was basically abandonded during the development cycle, and nobody expected anyone to actually do anthying with it.  Or at best find the KB article and maybe run vi.</p>



<p class="wp-block-paragraph">Or you could just fix &amp; rebuild the linker proxy, ld.c and remove the offending line:</p>



<pre class="wp-block-code"><code>char *def_lib&#91;] = /* Default library */
{
   "libcpsx.lib",
   "psxdll.lib",
   "ntdll.lib",
   "psxrtl.lib",
   SNULL
};</code></pre>



<p class="wp-block-paragraph">And re-compile.  Which of course is time to show yet another CMD file that sets up a Win32 environment enough to cross compile to POSIX:</p>



<pre class="wp-block-code"><code>title posix cross
@set CPU=i386
@set PATH=c:\posix\bin;c:\mstools\bin;%PATH%
@set Lib=c:\mstools\posix\lib;c:\usr\lib;%lib%
@set Include=c:\mstools\posix\h;c:\usr\include;%include%
@set TERM=ansi
@set TERMCAP=//C/etc/termcap
@set _POSIX_TERM=on
@set TEMP=c:\temp
@set tmp=c:\tmp
@set MAKEPATH=C:\posix\src\MK-RULES</code></pre>



<p class="wp-block-paragraph">So now I can build things from the Win32 side of life, like the LD proxy, or even &#8216;cross compile&#8217; a simple enough hello world from Win32:</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="628" height="267" src="https://virtuallyfun.com/wp-content/uploads/2026/04/image-19.png" alt="" class="wp-image-15698" srcset="https://virtuallyfun.com/wp-content/uploads/2026/04/image-19.png 628w, https://virtuallyfun.com/wp-content/uploads/2026/04/image-19-300x128.png 300w, https://virtuallyfun.com/wp-content/uploads/2026/04/image-19-500x213.png 500w" sizes="auto, (max-width: 628px) 100vw, 628px" /></figure>



<p class="wp-block-paragraph">See wasn&#8217;t that fun?!</p>



<p class="wp-block-paragraph">Since I already have a version of <a href="https://github.com/neozeed/gcc-1.40-msvc" target="_blank" rel="noreferrer noopener">GCC-1.40 building with the Microsoft C compiler</a> this seemed like a great leg up on building a POSIX version.  And naturally to make it more complete building bison-1.16 is also required.  Since I have Bison building on normal Win32, this wasn&#8217;t much of a problem.  The weird hurdle came in the C Preprocessor where I found out that POSIX is missing some seemingly vital stuff like fstat!  </p>



<pre class="wp-block-code"><code>int                 
file_size_and_mode (fd, mode_pointer, size_pointer)
     int fd;
     int *mode_pointer;
     long int *size_pointer;
{ 
#if 0
//this is missing from posix
  struct stat sbuf;
  
  if (fstat (fd, &amp;sbuf) &lt; 0) return (-1);
  if (mode_pointer) *mode_pointer = sbuf.st_mode;
  if (size_pointer) *size_pointer = sbuf.st_size;
#endif
  return 0;
}</code></pre>



<p class="wp-block-paragraph">Also, for some reason I can&#8217;t link any real programs that call unlink, I have to proxy that to a stub file that has no includes, define unlink as Xunlink, then link against that stube and it all links fine.  I know WTF?!  I don&#8217;t get it ether.  But I wanted to build stuff so these are&#8230; tradeoffs that I made to just short-cut the whole thing.  Maybe I&#8217;ll go back and look and try to figure it out.  As I see in the POSIX util source mutiple things call fstat, so maybe it&#8217;s happier when linked from Win32?</p>



<p class="wp-block-paragraph">To complete the round trip, since we already know the Link386 from the SDK and early Visual C++ will happily accept Xenix OMF files, I can use the <a href="https://github.com/neozeed/gas-1.38-xenix-" target="_blank" rel="noreferrer noopener">GNU Assembler that targets Xenix</a>, and then get a round tripped GCC on POSIX NT!</p>


<div class="wp-block-image">
<figure class="aligncenter size-full"><img loading="lazy" decoding="async" width="638" height="336" src="https://virtuallyfun.com/wp-content/uploads/2026/04/image-23.png" alt="" class="wp-image-15702" srcset="https://virtuallyfun.com/wp-content/uploads/2026/04/image-23.png 638w, https://virtuallyfun.com/wp-content/uploads/2026/04/image-23-300x158.png 300w, https://virtuallyfun.com/wp-content/uploads/2026/04/image-23-500x263.png 500w" sizes="auto, (max-width: 638px) 100vw, 638px" /><figcaption class="wp-element-caption">GCC running on POSIX NT!</figcaption></figure>
</div>


<p class="wp-block-paragraph">And there we have it!</p>



<h2 class="wp-block-heading">Installing it for the BRAVE</h2>



<p class="wp-block-paragraph">I&#8217;ve gone ahead and uploaded my working directories to archive.org here: <a href="https://archive.org/details/posix-4" target="_blank" rel="noreferrer noopener">POSIX-4</a>.</p>



<p class="wp-block-paragraph">I guess I could have found my old zip/unzip for NT 3.1 but I didn&#8217;t I stuck to PAX which surprisingly is in NT 3.1. It&#8217;s not quite as friendly as TAR but you can copy posix4.tar to the C: drive and just extract it with &#8216;pax -r -f posix4.tar&#8217;</p>



<p class="wp-block-paragraph">I should note for some reason trying to extract it from my tranfer disk, causes a BLUESCREEN in the HPFS device driver on NT 3.1&#8230; Bummer.</p>


<div class="wp-block-image">
<figure class="aligncenter size-full"><img loading="lazy" decoding="async" width="480" height="253" src="https://virtuallyfun.com/wp-content/uploads/2026/04/image-12.png" alt="" class="wp-image-15689" srcset="https://virtuallyfun.com/wp-content/uploads/2026/04/image-12.png 480w, https://virtuallyfun.com/wp-content/uploads/2026/04/image-12-300x158.png 300w" sizes="auto, (max-width: 480px) 100vw, 480px" /><figcaption class="wp-element-caption">extracting my posix all in one package</figcaption></figure>
</div>


<p class="wp-block-paragraph">Once all the files are unpacked the first thing I do is make a Program Item on Program Manager for the Posix shell.  All the hard work is done, you just have to path it to c:\posix\shell.cmd</p>



<p class="wp-block-paragraph">This is how I setup mine, so YMMV</p>


<div class="wp-block-image">
<figure class="aligncenter size-full"><img loading="lazy" decoding="async" width="506" height="225" src="https://virtuallyfun.com/wp-content/uploads/2026/04/image-20.png" alt="" class="wp-image-15699" srcset="https://virtuallyfun.com/wp-content/uploads/2026/04/image-20.png 506w, https://virtuallyfun.com/wp-content/uploads/2026/04/image-20-300x133.png 300w, https://virtuallyfun.com/wp-content/uploads/2026/04/image-20-500x222.png 500w" sizes="auto, (max-width: 506px) 100vw, 506px" /><figcaption class="wp-element-caption">Shell Program Item</figcaption></figure>
</div>


<p class="wp-block-paragraph">And the last part is the DEVSRV.  This is how I setup mine, with the emphasis on running minimized.  It does and can crash from time to time so I wouldn&#8217;t try to wrap it as a service or anything that creative.</p>


<div class="wp-block-image">
<figure class="aligncenter size-full"><img loading="lazy" decoding="async" width="473" height="205" src="https://virtuallyfun.com/wp-content/uploads/2026/04/image-21.png" alt="" class="wp-image-15700" srcset="https://virtuallyfun.com/wp-content/uploads/2026/04/image-21.png 473w, https://virtuallyfun.com/wp-content/uploads/2026/04/image-21-300x130.png 300w" sizes="auto, (max-width: 473px) 100vw, 473px" /><figcaption class="wp-element-caption">DevSRV Program Item</figcaption></figure>
</div>


<p class="wp-block-paragraph">And then I move mine to the startup items, so that way, every time I login, I now have the devsrv all ready for my POSIX experiments!</p>


<div class="wp-block-image">
<figure class="aligncenter size-full"><img loading="lazy" decoding="async" width="402" height="181" src="https://virtuallyfun.com/wp-content/uploads/2026/04/image-22.png" alt="" class="wp-image-15701" srcset="https://virtuallyfun.com/wp-content/uploads/2026/04/image-22.png 402w, https://virtuallyfun.com/wp-content/uploads/2026/04/image-22-300x135.png 300w" sizes="auto, (max-width: 402px) 100vw, 402px" /></figure>
</div>


<p class="wp-block-paragraph">Now you can just logoff/log back in, and you are ready for some POSIX GCC adventures.</p>



<p class="wp-block-paragraph">It&#8217;s a shame that back then I just was totally unaware of that Xenix OMF GAS version.  I pretty much had given up on Xenix 386 back then, as I never could find the developer&#8217;s kit, as they had gatekept people off the platform.  Linux is where all the excitement was, as not only did it have GCC, but you also had full source.  Even if I&#8217;d had access to GCC on Xenix, with no libc no headers it wasn&#8217;t going to go very far.</p>



<p class="wp-block-paragraph">Credit to Microsoft though, they did learn with that $3,000 OS/2 SDK, that if you paywall the low end developers away, nobody writes for your platform.  Although Microsoft did lose their way on this when they stopped QuickC, forcing new users to pay for the full thing.  They didn&#8217;t realize how much territory they ceded by charging for the C compiler to GCC until it was too late, as all &#8216;starving university&#8217; kids are GNU kids now (Yes I know CLANG is where it&#8217;s at today, thats&#8217;s Apple&#8217;s lesson I guess in there).  By the time they did free as in beer limited &#8220;<a href="https://archive.org/details/microsoft-visual-c-toolkit-2003" target="_blank" rel="noreferrer noopener">Visual C++ Toolkit 2003</a>&#8221; it was already far too late.</p>



<p class="wp-block-paragraph">The POSIX subsystem was never going to be all that useful, as it was pretty clear if NT became a competent UNIX, nobody would write Win32 server software.  But considering one of the best features to be added to Windows 10/Server 2016 was the WSL subsystem, we already crossed that bridge.</p>



<h2 class="wp-block-heading">Addendum</h2>



<p class="wp-block-paragraph">I thought it&#8217;d be &#8216;fun&#8217; to do this from Citrix as it easily allows me to map drives making life MUCH easier, but nothing worked.  I went thorugh installing NT 3.5 it&#8217;s SDK and Visual C++ 2 and noticed that nothing ran on that either.  Maybe it&#8217;s Qemu?</p>



<p class="wp-block-paragraph">So I just jumped forward to NT 4.0, because why not??</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="455" height="171" src="https://virtuallyfun.com/wp-content/uploads/2026/04/image-24.png" alt="" class="wp-image-15705" srcset="https://virtuallyfun.com/wp-content/uploads/2026/04/image-24.png 455w, https://virtuallyfun.com/wp-content/uploads/2026/04/image-24-300x113.png 300w" sizes="auto, (max-width: 455px) 100vw, 455px" /><figcaption class="wp-element-caption">make on NT 4.0 POSIX</figcaption></figure>



<p class="wp-block-paragraph">Turns out it doesn&#8217;t work either.</p>



<p class="wp-block-paragraph">Well sure vi does work, but the whole &#8216;cc&#8217; cross thing is just plain deprecated after 3.1&#8230; It&#8217;s like whatever attempt at POSIX being useable was fully given up on.  The only other interesting thing on the NT 3.5 resource kit, is that it <em>does</em> mention GCC being part of the kit, but obviously that never happened.  Politics I suppose.</p>



<p class="wp-block-paragraph">So now I really remember why I never really bothered with the environment, as it basically became unusable by Windows NT 3.5</p>



<h2 class="wp-block-heading">Running at home!</h2>



<p class="wp-block-paragraph">I&#8217;ve gone ahead, and uploaded the source to github, and included a binary release.  So you can try this on your own Windows NT 3.1 machine, or try the fight with NT 3.5 or higher and go through the fight yourself.</p>



<p class="wp-block-paragraph"><a href="https://github.com/neozeed/windowsnt31_posix" target="_blank" rel="noreferrer noopener">https://github.com/neozeed/windowsnt31_posix</a></p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="634" height="473" src="https://virtuallyfun.com/wp-content/uploads/2026/04/image-25.png" alt="" class="wp-image-15708" srcset="https://virtuallyfun.com/wp-content/uploads/2026/04/image-25.png 634w, https://virtuallyfun.com/wp-content/uploads/2026/04/image-25-300x224.png 300w, https://virtuallyfun.com/wp-content/uploads/2026/04/image-25-402x300.png 402w" sizes="auto, (max-width: 634px) 100vw, 634px" /></figure>



<p class="wp-block-paragraph">And yes, I did get <a href="https://github.com/neozeed/hack-1.03" target="_blank" rel="noreferrer noopener">hack-1.03</a> running!</p>



<p class="wp-block-paragraph"></p>
]]></content:encoded>
					
					<wfw:commentRss>https://virtuallyfun.com/2026/04/19/fun-with-posx-subsystem-on-nt/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Compiling Linux 0.11 using the December 1991 Windows NT Pre-release</title>
		<link>https://virtuallyfun.com/2024/08/02/compiling-linux-0-11-using-the-december-1991-windows-nt-pre-release/</link>
					<comments>https://virtuallyfun.com/2024/08/02/compiling-linux-0-11-using-the-december-1991-windows-nt-pre-release/#respond</comments>
		
		<dc:creator><![CDATA[neozeed]]></dc:creator>
		<pubDate>Fri, 02 Aug 2024 12:13:21 +0000</pubDate>
				<category><![CDATA[cross compiler]]></category>
		<category><![CDATA[gcc]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Windows NT 3.1]]></category>
		<guid isPermaLink="false">https://virtuallyfun.com/?p=14730</guid>

					<description><![CDATA[It&#8217;s no secret that I do enjoy building silly &#8220;what if&#8221; things. And this is going to be one of the more impractical ones. Building on previous work, where I had built GCC 1.40 using the OS/2 hosted Microsoft C &#8230; <a href="https://virtuallyfun.com/2024/08/02/compiling-linux-0-11-using-the-december-1991-windows-nt-pre-release/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
										<content:encoded><![CDATA[
<p class="wp-block-paragraph">It&#8217;s no secret that I do enjoy building silly &#8220;what if&#8221; things.  And this is going to be one of the more impractical ones.</p>



<p class="wp-block-paragraph">Building on previous work, where <a href="https://virtuallyfun.com/2024/01/08/so-it-turns-out-gcc-could-have-been-available-on-windows-nt-the-entire-time/" target="_blank" rel="noreferrer noopener">I had built GCC 1.40 using the OS/2 hosted Microsoft C compiler</a> that shipped with this Pre-Release, and using <a href="https://virtuallyfun.com/2015/10/09/building-linux-0-11-on-windows-10/" target="_blank" rel="noreferrer noopener">MinGW to build Linux 0.11</a>, it was time to combine the two, like chocolate &amp; peanut butter!</p>



<figure class="wp-block-video"><video height="480" style="aspect-ratio: 854 / 480;" width="854" controls src="https://virtuallyfun.com/wp-content/uploads/2024/08/combo.mp4"></video><figcaption class="wp-element-caption">Yes, it&#8217;s from 1981.  I&#8217;m that old to remember this.</figcaption></figure>



<h2 class="wp-block-heading">Getting NT ready</h2>



<p class="wp-block-paragraph">The first thing I wanted was to install the Pre-Release onto a HPFS disk.  I&#8217;ve uploaded this over on <a href="https://archive.org/details/dec-1991-prepped.7z" target="_blank" rel="noreferrer noopener">archive.org (Windows NT December 1991 prepped for Qemu<span style="color: rgb(44, 44, 44); font-family: &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; font-size: 14px; white-space-collapse: collapse;"></span>)</a>.  I took the CD-ROM image, removed all the MIPS stuff, built a boot floppy, and setup the paths so that the floppy can boot onto the secondary hard disk to a &#8216;full&#8217; version of NT.  This lets me format the C: drive as HPFS, and then do a selective install of Windows NT to ensure that that the software tools (compiler) are installed.</p>



<p class="wp-block-paragraph">I use a specially patched vintage QEMU build, <a href="https://archive.org/download/dec-1991-prepped.7z/qemu-0.14.0.7z" target="_blank" rel="noreferrer noopener">qemu-0.14.0.7z</a> which kind of makes it &#8216;easier&#8217;, along with the needed disk images in <a href="https://archive.org/download/dec-1991-prepped.7z/dec-1991-prepped.7z">dec-1991-prepped.7z</a></p>



<pre class="wp-block-code"><code>qemu.exe -L pc-bios -m 64 -net none -hda nt1991.vmdk -hdb nt1991-cd.vmdk -fda boot.vfd -boot a</code></pre>



<p class="wp-block-paragraph">This will bring up the boot selection menu.  The default option is fine, you can just hit enter.</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="722" height="432" src="https://virtuallyfun.com/wp-content/uploads/2024/08/install-patched-1991-01.png" alt="" class="wp-image-14732" srcset="https://virtuallyfun.com/wp-content/uploads/2024/08/install-patched-1991-01.png 722w, https://virtuallyfun.com/wp-content/uploads/2024/08/install-patched-1991-01-300x180.png 300w, https://virtuallyfun.com/wp-content/uploads/2024/08/install-patched-1991-01-500x300.png 500w" sizes="auto, (max-width: 722px) 100vw, 722px" /><figcaption class="wp-element-caption">boot NT from D:</figcaption></figure>



<p class="wp-block-paragraph">NT will load up and you now have to login as the SYSTEM user.  We need the advanced permissions to format the hard disk.</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="642" height="512" src="https://virtuallyfun.com/wp-content/uploads/2024/08/install-patched-1991-02.png" alt="" class="wp-image-14733" srcset="https://virtuallyfun.com/wp-content/uploads/2024/08/install-patched-1991-02.png 642w, https://virtuallyfun.com/wp-content/uploads/2024/08/install-patched-1991-02-300x239.png 300w, https://virtuallyfun.com/wp-content/uploads/2024/08/install-patched-1991-02-376x300.png 376w" sizes="auto, (max-width: 642px) 100vw, 642px" /><figcaption class="wp-element-caption">Login as &#8216;system&#8217;</figcaption></figure>



<p class="wp-block-paragraph">From the desktop we first format the C: drive as HPFS.  I made icons for all this stuff to try to make it as easy as possible.</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="642" height="512" src="https://virtuallyfun.com/wp-content/uploads/2024/08/install-patched-1991-03.png" alt="" class="wp-image-14742" srcset="https://virtuallyfun.com/wp-content/uploads/2024/08/install-patched-1991-03.png 642w, https://virtuallyfun.com/wp-content/uploads/2024/08/install-patched-1991-03-300x239.png 300w, https://virtuallyfun.com/wp-content/uploads/2024/08/install-patched-1991-03-376x300.png 376w" sizes="auto, (max-width: 642px) 100vw, 642px" /></figure>



<p class="wp-block-paragraph">You&#8217;ll get asked to confirm you want to do this, and give the disk a creative name.</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="642" height="512" src="https://virtuallyfun.com/wp-content/uploads/2024/08/install-patched-1991-04.png" alt="" class="wp-image-14741" srcset="https://virtuallyfun.com/wp-content/uploads/2024/08/install-patched-1991-04.png 642w, https://virtuallyfun.com/wp-content/uploads/2024/08/install-patched-1991-04-300x239.png 300w, https://virtuallyfun.com/wp-content/uploads/2024/08/install-patched-1991-04-376x300.png 376w" sizes="auto, (max-width: 642px) 100vw, 642px" /></figure>



<p class="wp-block-paragraph">And with the disk formatted it&#8217;s time to start the setup process.</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="642" height="512" src="https://virtuallyfun.com/wp-content/uploads/2024/08/install-patched-1991-05.png" alt="" class="wp-image-14740" srcset="https://virtuallyfun.com/wp-content/uploads/2024/08/install-patched-1991-05.png 642w, https://virtuallyfun.com/wp-content/uploads/2024/08/install-patched-1991-05-300x239.png 300w, https://virtuallyfun.com/wp-content/uploads/2024/08/install-patched-1991-05-376x300.png 376w" sizes="auto, (max-width: 642px) 100vw, 642px" /></figure>



<p class="wp-block-paragraph">Who are you?</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="642" height="512" src="https://virtuallyfun.com/wp-content/uploads/2024/08/install-patched-1991-06.png" alt="" class="wp-image-14739" srcset="https://virtuallyfun.com/wp-content/uploads/2024/08/install-patched-1991-06.png 642w, https://virtuallyfun.com/wp-content/uploads/2024/08/install-patched-1991-06-300x239.png 300w, https://virtuallyfun.com/wp-content/uploads/2024/08/install-patched-1991-06-376x300.png 376w" sizes="auto, (max-width: 642px) 100vw, 642px" /></figure>



<p class="wp-block-paragraph">And what slick account do you want?  It doesn&#8217;t matter tbh.</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="642" height="512" src="https://virtuallyfun.com/wp-content/uploads/2024/08/install-patched-1991-07.png" alt="" class="wp-image-14738" srcset="https://virtuallyfun.com/wp-content/uploads/2024/08/install-patched-1991-07.png 642w, https://virtuallyfun.com/wp-content/uploads/2024/08/install-patched-1991-07-300x239.png 300w, https://virtuallyfun.com/wp-content/uploads/2024/08/install-patched-1991-07-376x300.png 376w" sizes="auto, (max-width: 642px) 100vw, 642px" /></figure>



<p class="wp-block-paragraph">I&#8217;m going to do a custom install as the NIC&#8217;s aren&#8217;t supported, and even if they were it&#8217;s just NetBEUI anyways.</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="642" height="512" src="https://virtuallyfun.com/wp-content/uploads/2024/08/install-patched-1991-08.png" alt="" class="wp-image-14737" srcset="https://virtuallyfun.com/wp-content/uploads/2024/08/install-patched-1991-08.png 642w, https://virtuallyfun.com/wp-content/uploads/2024/08/install-patched-1991-08-300x239.png 300w, https://virtuallyfun.com/wp-content/uploads/2024/08/install-patched-1991-08-376x300.png 376w" sizes="auto, (max-width: 642px) 100vw, 642px" /></figure>



<p class="wp-block-paragraph">And select your hardware platform.  NT basically only supports this config, so it doesn&#8217;t matter.</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="642" height="512" src="https://virtuallyfun.com/wp-content/uploads/2024/08/install-patched-1991-09.png" alt="" class="wp-image-14736" srcset="https://virtuallyfun.com/wp-content/uploads/2024/08/install-patched-1991-09.png 642w, https://virtuallyfun.com/wp-content/uploads/2024/08/install-patched-1991-09-300x239.png 300w, https://virtuallyfun.com/wp-content/uploads/2024/08/install-patched-1991-09-376x300.png 376w" sizes="auto, (max-width: 642px) 100vw, 642px" /></figure>



<p class="wp-block-paragraph">The default target drive is our C drive, which we had just formatted to HPFS.</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="642" height="512" src="https://virtuallyfun.com/wp-content/uploads/2024/08/install-patched-1991-10.png" alt="" class="wp-image-14735" srcset="https://virtuallyfun.com/wp-content/uploads/2024/08/install-patched-1991-10.png 642w, https://virtuallyfun.com/wp-content/uploads/2024/08/install-patched-1991-10-300x239.png 300w, https://virtuallyfun.com/wp-content/uploads/2024/08/install-patched-1991-10-376x300.png 376w" sizes="auto, (max-width: 642px) 100vw, 642px" /></figure>



<p class="wp-block-paragraph">Next, I unchecked everything only leaving the MS Tools</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="642" height="512" src="https://virtuallyfun.com/wp-content/uploads/2024/08/install-patched-1991-11.png" alt="" class="wp-image-14734" srcset="https://virtuallyfun.com/wp-content/uploads/2024/08/install-patched-1991-11.png 642w, https://virtuallyfun.com/wp-content/uploads/2024/08/install-patched-1991-11-300x239.png 300w, https://virtuallyfun.com/wp-content/uploads/2024/08/install-patched-1991-11-376x300.png 376w" sizes="auto, (max-width: 642px) 100vw, 642px" /></figure>



<p class="wp-block-paragraph">It&#8217;ll offer the samples &amp; help files.  I always install them as I eventually need examples of stuff to steal, and to learn that including &lt;windows.h> won&#8217;t work right unless you manually define a -Di386 on the command line.  I&#8217;m saving you this pain right now up front.</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="642" height="512" src="https://virtuallyfun.com/wp-content/uploads/2024/08/install-patched-1991-12.png" alt="" class="wp-image-14745" srcset="https://virtuallyfun.com/wp-content/uploads/2024/08/install-patched-1991-12.png 642w, https://virtuallyfun.com/wp-content/uploads/2024/08/install-patched-1991-12-300x239.png 300w, https://virtuallyfun.com/wp-content/uploads/2024/08/install-patched-1991-12-376x300.png 376w" sizes="auto, (max-width: 642px) 100vw, 642px" /></figure>



<p class="wp-block-paragraph">Files will copy, and on a modern machine this takes seconds.</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="642" height="512" src="https://virtuallyfun.com/wp-content/uploads/2024/08/install-patched-1991-13.png" alt="" class="wp-image-14744" srcset="https://virtuallyfun.com/wp-content/uploads/2024/08/install-patched-1991-13.png 642w, https://virtuallyfun.com/wp-content/uploads/2024/08/install-patched-1991-13-300x239.png 300w, https://virtuallyfun.com/wp-content/uploads/2024/08/install-patched-1991-13-376x300.png 376w" sizes="auto, (max-width: 642px) 100vw, 642px" /></figure>



<p class="wp-block-paragraph">And there we go!</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="642" height="512" src="https://virtuallyfun.com/wp-content/uploads/2024/08/install-patched-1991-14.png" alt="" class="wp-image-14743" srcset="https://virtuallyfun.com/wp-content/uploads/2024/08/install-patched-1991-14.png 642w, https://virtuallyfun.com/wp-content/uploads/2024/08/install-patched-1991-14-300x239.png 300w, https://virtuallyfun.com/wp-content/uploads/2024/08/install-patched-1991-14-376x300.png 376w" sizes="auto, (max-width: 642px) 100vw, 642px" /></figure>



<p class="wp-block-paragraph">And Windows NT is installed.</p>



<p class="wp-block-paragraph">Yay.</p>



<p class="wp-block-paragraph">I put in a &#8216;CAD&#8217; feature in this Qemu hitting control+alt+d will send the familiar pattern, and after a few times NT will reboot.  We are pretty much done with NT for the moment, but congrats you&#8217;ve installed the December 1991 Pre-release onto a HPFS disk for those sweet long long file names!</p>



<h2 class="wp-block-heading">Going over the strategy:</h2>



<p class="wp-block-paragraph">I&#8217;ve already built GCC 1.40 for NT, so what is the rest of the stuff needed to build Linux?  It&#8217;s a quick checklist but here goes, in no specific order:</p>



<ul class="wp-block-list">
<li><s>GCC 1.40</s></li>



<li>bin86</li>



<li>binutils</li>



<li><s>gas 1.38</s></li>



<li>bison</li>



<li>unzip</li>



<li>zip</li>
</ul>



<p class="wp-block-paragraph">Luckily as part of building on Windows 10 using MinGW, I had fixed the weird file issues as MS-DOS/Windows NT/OS2 handle text/binary files, as we went through with how <a href="https://virtuallyfun.com/2024/04/28/compiling-ms-dos-4-0-from-dos-4-0-on-a-ps-2/" target="_blank" rel="noreferrer noopener">Github mangled MS-DOS 4.00</a>.</p>



<p class="wp-block-paragraph">The primary reason I wanted a working zip/unzip was to deal with long file names, and to auto convert text files.  And this ended up being an incredible waste of time trying to get the &#8216;old&#8217;s code on the Info-Zip page.</p>



<figure class="wp-block-image size-large"><a href="https://sourceforge.net/projects/infozip/files/UnZip%205.x%20and%20earlier/" target="_blank" rel="noreferrer noopener"><img loading="lazy" decoding="async" width="1024" height="418" src="https://virtuallyfun.com/wp-content/uploads/2024/08/infozip-old-downloads-1024x418.jpg" alt="" class="wp-image-14748" srcset="https://virtuallyfun.com/wp-content/uploads/2024/08/infozip-old-downloads-1024x418.jpg 1024w, https://virtuallyfun.com/wp-content/uploads/2024/08/infozip-old-downloads-300x123.jpg 300w, https://virtuallyfun.com/wp-content/uploads/2024/08/infozip-old-downloads-768x314.jpg 768w, https://virtuallyfun.com/wp-content/uploads/2024/08/infozip-old-downloads-500x204.jpg 500w, https://virtuallyfun.com/wp-content/uploads/2024/08/infozip-old-downloads.jpg 1119w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></a><figcaption class="wp-element-caption">Info-Zip&#8217;s old downloads. Version 5 only!</figcaption></figure>



<p class="wp-block-paragraph">I&#8217;m sure like everything else, the old versions are removed as they probably suffer from some catastrophic security issue with overflows.  The issue I ran into is that the version 5 stuff uses so many features of shipping NT, to even 2000 that it was going to be a LOT of work to get this far.  The quicker &amp; easier path as always turned out to be a time machine.</p>



<p class="wp-block-paragraph">Thankfully, since I had made a copy of the UTZOO archives, I was able to fish out, both <a href="https://github.com/neozeed/Info-Zip-3.1" target="_blank" rel="noreferrer noopener">version 3.1</a> from the archives.  Also known as &#8220;Portable UnZIP 3.1&#8221;, parts <a href="https://altavista.superglobalmegacorp.com/usenet/b181/comp/sources/misc/1833.txt" target="_blank" rel="noreferrer noopener">1</a>/<a href="https://altavista.superglobalmegacorp.com/usenet/b181/comp/sources/misc/1834.txt" target="_blank" rel="noreferrer noopener">2</a>/<a href="https://altavista.superglobalmegacorp.com/usenet/b181/comp/sources/misc/1835.txt" target="_blank" rel="noreferrer noopener">3</a>.  I also found <a href="https://github.com/neozeed/Info-Zip-4.1" target="_blank" rel="noreferrer noopener">version 4.1</a> as well.  And people wonder why you want to save these &#8216;huge&#8217; data sets. If the lawyers could have their way, they would obliterate all history.</p>



<p class="wp-block-paragraph">I spent a lot of time messing with Makefiles, as linking &amp; object conversion on old NT is a big deal, and not the kind of thing you want to do more than once.  Another big pain is that large files become delete only.  I don&#8217;t know what the deal with notepad is, but I could remove text, but not change or add.  I solved that by wrapping a number of things by including it in another file with some #define work to go around it. Needless to say, that sucked.</p>



<p class="wp-block-paragraph">One thing that constantly threw issues is that this version of Windows doesn&#8217;t handle Unix style signals.  I removed all the signal catch/throw stuff, and the binaries ran fine.  Why on earth does &#8216;strip&#8217; need signals is beyond me, but it runs fine without them!</p>



<h2 class="wp-block-heading">Bringing it together.</h2>



<p class="wp-block-paragraph">From my &#8220;<a href="https://archive.org/details/linux-0.11-compile-ntdec1991-bins" target="_blank" rel="noreferrer noopener">Build artifacts from Building Linux 0.11 on Windows NT build 239, December 1991</a>&#8221; page, grab the two files, <a href="https://archive.org/download/linux-0.11-compile-ntdec1991-bins/bin.zip" target="_blank" rel="noreferrer noopener">bin.zip</a> &amp; <a href="https://archive.org/download/linux-0.11-compile-ntdec1991-bins/source0.zip" target="_blank" rel="noreferrer noopener">source0.zip</a>.</p>



<p class="wp-block-paragraph">On Windows I just unzip the bin.zip file and leave source.0.zip intact into a directly say something like temp.  Then I can use a cool feature of Qemu where it can mount a directory as a read-only FAT disk.  This saves a lot of time!</p>



<p class="wp-block-paragraph">Running Qemu like this:</p>



<pre class="wp-block-code"><code>qemu.exe -L pc-bios -m 64 -net none -hda nt1991.vmdk -hdb fat:temp -fda boot.vfd</code></pre>



<p class="wp-block-paragraph">Will drop to the bootloader. Hit enter to login, and you&#8217;ll be at the desktop.  Hit enter again, and open a command prompt.</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="642" height="512" src="https://virtuallyfun.com/wp-content/uploads/2024/08/install-patched-1991-15.png" alt="" class="wp-image-14750" srcset="https://virtuallyfun.com/wp-content/uploads/2024/08/install-patched-1991-15.png 642w, https://virtuallyfun.com/wp-content/uploads/2024/08/install-patched-1991-15-300x239.png 300w, https://virtuallyfun.com/wp-content/uploads/2024/08/install-patched-1991-15-376x300.png 376w" sizes="auto, (max-width: 642px) 100vw, 642px" /><figcaption class="wp-element-caption">open the command prompt</figcaption></figure>



<p class="wp-block-paragraph">By default, the Numlock is messing with the arrow keys (I think it&#8217;s mapping to the old 83 key keyboard no matter what?)  Hit num-lock and your arrow keys should kind of work.  It&#8217;s a great time saver.</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="642" height="512" src="https://virtuallyfun.com/wp-content/uploads/2024/08/install-patched-1991-16b.png" alt="" class="wp-image-14752" srcset="https://virtuallyfun.com/wp-content/uploads/2024/08/install-patched-1991-16b.png 642w, https://virtuallyfun.com/wp-content/uploads/2024/08/install-patched-1991-16b-300x239.png 300w, https://virtuallyfun.com/wp-content/uploads/2024/08/install-patched-1991-16b-376x300.png 376w" sizes="auto, (max-width: 642px) 100vw, 642px" /><figcaption class="wp-element-caption">copy the binaries to \bin &amp; get ready to unzip</figcaption></figure>



<p class="wp-block-paragraph">I copied the binaries &amp; the ygcc.cmd file into the \bin directory, created a \proj directory and get ready to unzip all the source code.  For some reason this version of unzip doesn&#8217;t understand the zip compression, so it&#8217;s just storing instead, much like TAR.  It&#8217;s not that involved but unzip with the -d flag so it creates directories as needed.</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="642" height="512" src="https://virtuallyfun.com/wp-content/uploads/2024/08/install-patched-1991-17.png" alt="" class="wp-image-14753" srcset="https://virtuallyfun.com/wp-content/uploads/2024/08/install-patched-1991-17.png 642w, https://virtuallyfun.com/wp-content/uploads/2024/08/install-patched-1991-17-300x239.png 300w, https://virtuallyfun.com/wp-content/uploads/2024/08/install-patched-1991-17-376x300.png 376w" sizes="auto, (max-width: 642px) 100vw, 642px" /><figcaption class="wp-element-caption">unzipped</figcaption></figure>



<p class="wp-block-paragraph">This will let us keep long file names.  HPFS is case insensitive, but it also preserves the case, so don&#8217;t worry about the names being all weird.  It doesn&#8217;t matter.</p>



<p class="wp-block-paragraph">One thing worth mentioning is that even though the C pre-processor does compile it just hangs when trying to run it.  I&#8217;m not sure what is wrong exactly, but it&#8217;s just not worth fighting.  Instead, I had the better idea, of using the Microsoft C compiler to pre-process the source.  Apparently, this is how they originally built Windows NT, pre-processing on OS/2, then uploading the pre-processed files to a SUN workstation with the i860 compiler and downloading the objects to be converted &amp; linked.  Wow that must have been tedious!</p>



<p class="wp-block-paragraph">I created a CMD file &#8216;ygcc.cmd&#8217; to run the cl386 pre-processor, call CC1 &amp; GAS and clean up afterwards.</p>



<pre class="wp-block-code"><code>cl386 -nologo /u /EP -I\include -D__GNUC__ -Dunix -Di386 -D__unix__ -D__i386__ -D__OPTIMIZE__ %2 > \tmp\xxx.cpp
\bin\cc1 -version -quiet -O -fstrength-reduce -fomit-frame-pointer -fcombine-regs -o /tmp/xxx.s /tmp/xxx.cpp
\bin\ax386 -v -o %1 /tmp/xxx.s
@del \tmp\xxx.s
@del \tmp\xxx.cpp</code></pre>



<p class="wp-block-paragraph">It&#8217;s not pretty but it works!</p>



<h2 class="wp-block-heading">Building</h2>



<p class="wp-block-paragraph">Before you can build Linux, you need to create both a \tmp &amp; \temp directory.  Also the include files need to be copied to the \include directory to make the pre-processor happier.</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="642" height="512" src="https://virtuallyfun.com/wp-content/uploads/2024/08/install-patched-1991-18b.png" alt="" class="wp-image-14755" srcset="https://virtuallyfun.com/wp-content/uploads/2024/08/install-patched-1991-18b.png 642w, https://virtuallyfun.com/wp-content/uploads/2024/08/install-patched-1991-18b-300x239.png 300w, https://virtuallyfun.com/wp-content/uploads/2024/08/install-patched-1991-18b-376x300.png 376w" sizes="auto, (max-width: 642px) 100vw, 642px" /></figure>



<p class="wp-block-paragraph">I&#8217;ve tried to make this as simple as possible there is a &#8216;blind.cmd&#8217; file which I built that&#8217;ll manually compile Linux.  There is no error checking.</p>



<p class="wp-block-paragraph">And saving everyone the excitement here is an animation of the build process</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="480" height="357" src="https://virtuallyfun.com/wp-content/uploads/2024/08/build-linux011-ntdec1991.gif" alt="" class="wp-image-14749"/><figcaption class="wp-element-caption">Actually compiling Linux</figcaption></figure>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="642" height="512" src="https://virtuallyfun.com/wp-content/uploads/2024/08/install-patched-1991-19.png" alt="" class="wp-image-14756" srcset="https://virtuallyfun.com/wp-content/uploads/2024/08/install-patched-1991-19.png 642w, https://virtuallyfun.com/wp-content/uploads/2024/08/install-patched-1991-19-300x239.png 300w, https://virtuallyfun.com/wp-content/uploads/2024/08/install-patched-1991-19-376x300.png 376w" sizes="auto, (max-width: 642px) 100vw, 642px" /><figcaption class="wp-element-caption">compiled!</figcaption></figure>



<p class="wp-block-paragraph">And there we go! All compiled!</p>



<p class="wp-block-paragraph">From there it&#8217;s a matter of copying the Image file out of the VM, I used the boot floppy and 7zip&#8217;s ability to extract FAT images, and then boot up Qemu using the Image file as a &#8216;floppy&#8217; as back in the day we used to rawrite these to floppy disks. </p>



<pre class="wp-block-code"><code>qemu.exe -L pc-bios -m 64 -net none -hda nt1991.vmdk -hdb fat:temp -fda boot\IMAGE -boot a</code></pre>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="722" height="432" src="https://virtuallyfun.com/wp-content/uploads/2024/08/install-patched-1991-20.png" alt="" class="wp-image-14757" srcset="https://virtuallyfun.com/wp-content/uploads/2024/08/install-patched-1991-20.png 722w, https://virtuallyfun.com/wp-content/uploads/2024/08/install-patched-1991-20-300x180.png 300w, https://virtuallyfun.com/wp-content/uploads/2024/08/install-patched-1991-20-500x300.png 500w" sizes="auto, (max-width: 722px) 100vw, 722px" /><figcaption class="wp-element-caption">And there we go, Linux 0.11 booted!</figcaption></figure>



<p class="wp-block-paragraph">I don&#8217;t have a root filesystem, so the panic is expected, but yes, we just cross compiled Linux from Windows NT, circa 1991!</p>
]]></content:encoded>
					
					<wfw:commentRss>https://virtuallyfun.com/2024/08/02/compiling-linux-0-11-using-the-december-1991-windows-nt-pre-release/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		<enclosure url="https://virtuallyfun.com/wp-content/uploads/2024/08/combo.mp4" length="1485267" type="video/mp4" />

			</item>
		<item>
		<title>Announcing EmuWoW Beta 1 (AXP Preview1)</title>
		<link>https://virtuallyfun.com/2024/02/17/announcing-emuwow-beta-1-axp-preview1/</link>
					<comments>https://virtuallyfun.com/2024/02/17/announcing-emuwow-beta-1-axp-preview1/#respond</comments>
		
		<dc:creator><![CDATA[neozeed]]></dc:creator>
		<pubDate>Sat, 17 Feb 2024 08:57:28 +0000</pubDate>
				<category><![CDATA[DEC Alpha]]></category>
		<category><![CDATA[MIPS]]></category>
		<category><![CDATA[syscall emulation]]></category>
		<category><![CDATA[Win32]]></category>
		<category><![CDATA[Windows NT 3.1]]></category>
		<guid isPermaLink="false">https://virtuallyfun.com/?p=13972</guid>

					<description><![CDATA[This is a guest post by CaptainWillStarblazer Hello, everyone. This is a continuation of my previous blogpost on EmuWoW (formerly win32emu) found here, but to summarize, I’m the 18-year-old developer behind a project that allows running applications compiled for the MIPS/Alpha &#8230; <a href="https://virtuallyfun.com/2024/02/17/announcing-emuwow-beta-1-axp-preview1/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
										<content:encoded><![CDATA[
<figure class="wp-block-image size-full"><a href="/wp-content/uploads/2024/02/20240217-194140.gif" target="_blank" rel="noreferrer noopener"><img loading="lazy" decoding="async" width="1016" height="748" src="/wp-content/uploads/2024/02/20240217-194140.gif" alt="" class="wp-image-13986"/></a><figcaption class="wp-element-caption">Freecell &amp; Winver</figcaption></figure>



<p class="wp-block-paragraph">This is a guest post by <a href="https://github.com/BHTY">CaptainWillStarblazer</a></p>



<p class="wp-block-paragraph">Hello, everyone. This is a continuation of my previous blogpost on <a href="https://github.com/BHTY/EmuWoW" target="_blank" rel="noreferrer noopener">EmuWoW</a> (formerly win32emu) <a href="/2024/01/04/win323mu-diy-wow/" target="_blank" rel="noreferrer noopener">found here</a>, but to summarize, I’m the <a href="https://github.com/BHTY" target="_blank" rel="noreferrer noopener">18-year-old developer</a> behind a project that allows running applications compiled for the MIPS/Alpha version of Windows NT on standard x86 PCs through emulation, but without requiring a full system emulator. Since that last post, the project has made some substantial strides.</p>



<p class="wp-block-paragraph">Since then, I’ve adapted the MIPS emulator from MAME, which is both more accurate and faster than my own (writing my own was a fun exercise but to the end of running applications, borrowing an emulator was a better decision). This alone enabled WinMine to function, which can be seen below.</p>



<figure class="wp-block-image size-full"><a href="/wp-content/uploads/2024/02/EmuWoW-running-MIPS-Winmine.png" target="_blank" rel="noreferrer noopener"><img loading="lazy" decoding="async" width="753" height="403" src="/wp-content/uploads/2024/02/EmuWoW-running-MIPS-Winmine.png" alt="" class="wp-image-13973" srcset="https://virtuallyfun.com/wp-content/uploads/2024/02/EmuWoW-running-MIPS-Winmine.png 753w, https://virtuallyfun.com/wp-content/uploads/2024/02/EmuWoW-running-MIPS-Winmine-300x161.png 300w, https://virtuallyfun.com/wp-content/uploads/2024/02/EmuWoW-running-MIPS-Winmine-500x268.png 500w" sizes="auto, (max-width: 753px) 100vw, 753px" /></a><figcaption class="wp-element-caption">Winmine for MIPS!</figcaption></figure>



<p class="wp-block-paragraph">Around the same time, another <a href="/2020/05/20/discord-channel-added-by-popular-request/" target="_blank" rel="noreferrer noopener">VirtuallyFun </a>member named <a href="https://www.x86matthew.com/" target="_blank" rel="noreferrer noopener">x86matthew</a> entered the scene. His prior credits include a similar project, for Win16.  He was inspired by the initial win32emu blog post, created his own similar project called <a href="https://github.com/x86matthew/WoWMIPS" target="_blank" rel="noreferrer noopener">WoWMIPS</a>, which quickly started running a few simple apps, such as WinMine, Solitaire, and Notepad.  Be sure to check out <a href="https://www.x86matthew.com/view_post?id=mips_1" target="_blank" rel="noreferrer noopener">WoWMIPS &#8211; MIPS Emulator for Windows, Part 1: Introduction</a>, and parts <a href="https://www.x86matthew.com/view_post?id=mips_2" target="_blank" rel="noreferrer noopener">2</a>,<a href="https://www.x86matthew.com/view_post?id=mips_3" target="_blank" rel="noreferrer noopener">3</a>,<a href="https://www.x86matthew.com/view_post?id=mips_4" target="_blank" rel="noreferrer noopener">4</a>,<a href="https://www.x86matthew.com/view_post?id=mips_5" target="_blank" rel="noreferrer noopener">5</a>,<a href="https://www.x86matthew.com/view_post?id=mips_6" target="_blank" rel="noreferrer noopener">6</a>!</p>



<p class="wp-block-paragraph">This had actually been what I was hoping for from the beginning; I always saw win32emu as a proof of concept for a smarter person (either myself in the future or someone else altogether) to come back later and do it better, and this is a massive undertaking for a single individual. What makes x86matthew&#8217;s WoWMIPS so incredible is its clean design. For one, there’s no thunk DLLs required. When an application tries to import a DLL, the host x86 DLL is first loaded, and then any attempts to get the address of an exported procedure from it are then redirected to an auto-generated stub of MIPS code which invokes the emulator to call the function. In other words, the thunk DLLs are generated at load time. Additionally, there’s no window procedure thunks required either. Instead, MIPS code pages are marked as non-executable, causing an access violation when Windows attempts to call them. Using an exception handler implemented via Windows XP’s <a href="https://learn.microsoft.com/en-us/windows/win32/debug/vectored-exception-handling" target="_blank" rel="noreferrer noopener">Vectored Exception Handling</a> feature, one can detect this and then invoke the emulator to execute the callback. Storing the CPU state in thread-local-storage allowed proper support for multithreading. I duplicated these design choices into EmuWoW, and the results largely speak for themselves. Unlike WoWMIPS (at time of writing), EmuWoW is still capable of loading MIPS DLLs (and will prefer to do so if possible), however.</p>



<figure class="wp-block-image size-large"><a href="/wp-content/uploads/2024/02/Windows-NT-MIPS-apps-running.png" target="_blank" rel="noreferrer noopener"><img loading="lazy" decoding="async" width="1024" height="652" src="/wp-content/uploads/2024/02/Windows-NT-MIPS-apps-running-1024x652.png" alt="" class="wp-image-13977" srcset="https://virtuallyfun.com/wp-content/uploads/2024/02/Windows-NT-MIPS-apps-running-1024x652.png 1024w, https://virtuallyfun.com/wp-content/uploads/2024/02/Windows-NT-MIPS-apps-running-300x191.png 300w, https://virtuallyfun.com/wp-content/uploads/2024/02/Windows-NT-MIPS-apps-running-768x489.png 768w, https://virtuallyfun.com/wp-content/uploads/2024/02/Windows-NT-MIPS-apps-running-471x300.png 471w, https://virtuallyfun.com/wp-content/uploads/2024/02/Windows-NT-MIPS-apps-running.png 1165w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></a><figcaption class="wp-element-caption">Various MIPS Windows NT applications running</figcaption></figure>



<p class="wp-block-paragraph">To aid the process of fixing faults in the emulator, I hacked up a quick, minimal debugger into EmuWoW. First of all, there’s a “crash screen” which will indicate the type of error and dump registers and the current instruction if there’s a fault, and a running disassembly can be printed as you go, but most crucially, there’s a limited degree of interactive debugging functionality.</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="979" height="512" src="/wp-content/uploads/2024/02/emuwow-debugger.png" alt="" class="wp-image-13975" srcset="https://virtuallyfun.com/wp-content/uploads/2024/02/emuwow-debugger.png 979w, https://virtuallyfun.com/wp-content/uploads/2024/02/emuwow-debugger-300x157.png 300w, https://virtuallyfun.com/wp-content/uploads/2024/02/emuwow-debugger-768x402.png 768w, https://virtuallyfun.com/wp-content/uploads/2024/02/emuwow-debugger-500x261.png 500w" sizes="auto, (max-width: 979px) 100vw, 979px" /><figcaption class="wp-element-caption">The built in debugger to EmuWow</figcaption></figure>



<p class="wp-block-paragraph">The main capabilities contained herein are dumping registers and memory to the screen, disassembling regions of memory, listing loaded modules, getting import entry points, setting breakpoints, and single-stepping, along with printing functions. It’s no gdb (especially for the lack of PDB symbol support), but it’s something.</p>



<p class="wp-block-paragraph">MIPS is all well and good, however, but we can already emulate Windows NT for MIPS. MIPS is a fairly clean, simple architecture, often used for teaching, and short of weirdness like delay slots, is dead simple to emulate. And it fits the bill for what I’m trying to do here &#8211; a RISC architecture Microsoft abandoned, fixed-length 32-bit instructions, the works. However, adding support for the DEC Alpha AXP will finally get this project to where it was intended to be from the beginning, and I hope for it to eventually be able to run the Visual C++ compiler toolchain under EmuWoW. Being able to compile (and even test!) Alpha apps on readily available modern PCs will be a game-changer, and I intentionally wrote EmuWoW to be CPU-agnostic, so adding rudimentary support for the Alpha wasn&#8217;t difficult. Like with MIPS, I lifted the emulator from MAME. This admittedly did pose some challenges, due to MAME’s use of C++ features such as</p>



<ul class="wp-block-list">
<li>Classes (which I had to substitute for passing pointers to structs)</li>



<li>Templates (which I had to substitute for macros)</li>



<li>Function-style casts (which I had to change into C-style casts)</li>
</ul>



<p class="wp-block-paragraph">There was a lot of weirdness in how Alpha function calls, but it was my misunderstanding of the calling convention, and when to consider values to be 32-bit vs 64-bit posed a modest issue, but I got it to the point where some very simple DEC Alpha programs started to run, though many of them have various issues.</p>



<figure class="wp-block-image size-large"><a href="/wp-content/uploads/2024/02/Windows-NT-Dec-Alpha-apps-running.png"><img loading="lazy" decoding="async" width="1024" height="537" src="/wp-content/uploads/2024/02/Windows-NT-Dec-Alpha-apps-running-1024x537.png" alt="" class="wp-image-13974" srcset="https://virtuallyfun.com/wp-content/uploads/2024/02/Windows-NT-Dec-Alpha-apps-running-1024x537.png 1024w, https://virtuallyfun.com/wp-content/uploads/2024/02/Windows-NT-Dec-Alpha-apps-running-300x157.png 300w, https://virtuallyfun.com/wp-content/uploads/2024/02/Windows-NT-Dec-Alpha-apps-running-768x403.png 768w, https://virtuallyfun.com/wp-content/uploads/2024/02/Windows-NT-Dec-Alpha-apps-running-500x262.png 500w, https://virtuallyfun.com/wp-content/uploads/2024/02/Windows-NT-Dec-Alpha-apps-running.png 1469w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></a><figcaption class="wp-element-caption">Various Dec Alpha Windows NT applications running</figcaption></figure>



<p class="wp-block-paragraph">This is the first time this has ever been possible; emulation of AXP NT programs on standard PCs has just become possible now. I’m hoping to see EmuWoW continue to evolve, and I welcome contributions, whether that be improving support for the CPUs I already have, adding support for another (such as PowerPC) or anything else. To take a look at the code, go to <a href="https://github.com/BHTY/EmuWoW" target="_blank" rel="noreferrer noopener">github.com/bhty/emuwow</a> and to download EmuWoW and try it out for yourself, <a href="https://github.com/BHTY/EmuWoW/releases/tag/beta" target="_blank" rel="noreferrer noopener">click here</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://virtuallyfun.com/2024/02/17/announcing-emuwow-beta-1-axp-preview1/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>So it turns out GCC could have been available on Windows NT the entire time!</title>
		<link>https://virtuallyfun.com/2024/01/08/so-it-turns-out-gcc-could-have-been-available-on-windows-nt-the-entire-time/</link>
					<comments>https://virtuallyfun.com/2024/01/08/so-it-turns-out-gcc-could-have-been-available-on-windows-nt-the-entire-time/#respond</comments>
		
		<dc:creator><![CDATA[neozeed]]></dc:creator>
		<pubDate>Mon, 08 Jan 2024 18:32:14 +0000</pubDate>
				<category><![CDATA[cross compiler]]></category>
		<category><![CDATA[gcc]]></category>
		<category><![CDATA[microsoft]]></category>
		<category><![CDATA[Win32]]></category>
		<category><![CDATA[Windows NT 3.1]]></category>
		<guid isPermaLink="false">https://virtuallyfun.com/?p=13729</guid>

					<description><![CDATA[This is going to be a bit convoluted but here goes.. GCC isn&#8217;t a monolithic compiler, instead it&#8217;s various parts are separate programs. This lets us tackle it one part at a time. And/Or bypass a lot of it until &#8230; <a href="https://virtuallyfun.com/2024/01/08/so-it-turns-out-gcc-could-have-been-available-on-windows-nt-the-entire-time/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
										<content:encoded><![CDATA[
<p class="wp-block-paragraph">This is going to be a bit convoluted but here goes..  GCC isn&#8217;t a monolithic compiler, instead it&#8217;s various parts are separate programs.  This lets us tackle it one part at a time.  And/Or bypass a lot of it until I want to tackle it.</p>



<figure class="wp-block-image size-large"><a href="https://virtuallyfun.com/wp-content/uploads/2024/01/gcc-program-flow.png"><img loading="lazy" decoding="async" width="1024" height="384" src="https://virtuallyfun.com/wp-content/uploads/2024/01/gcc-program-flow-1024x384.png" alt="" class="wp-image-13731" srcset="https://virtuallyfun.com/wp-content/uploads/2024/01/gcc-program-flow-1024x384.png 1024w, https://virtuallyfun.com/wp-content/uploads/2024/01/gcc-program-flow-300x112.png 300w, https://virtuallyfun.com/wp-content/uploads/2024/01/gcc-program-flow-768x288.png 768w, https://virtuallyfun.com/wp-content/uploads/2024/01/gcc-program-flow-1536x575.png 1536w, https://virtuallyfun.com/wp-content/uploads/2024/01/gcc-program-flow-500x187.png 500w, https://virtuallyfun.com/wp-content/uploads/2024/01/gcc-program-flow.png 1962w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></a><figcaption class="wp-element-caption">Flow of GCC</figcaption></figure>



<p class="wp-block-paragraph">I&#8217;m sure many people have explained this far better than I ever could but in C you write source files (obviously), the pre-processor reads those and &#8216;header&#8217; files that describe interfaces to libraries, other objects, various macros and definitions (magical numbers) and the pre-processor will read those files, and do simple macro expansion and test insert/replacements to generate a single .i file at the end of it&#8217;s run.</p>



<p class="wp-block-paragraph">The C compiler (cc1) now reads that single .i file and translates it into native assembly.  This allows for &#8216;mid/high level&#8217; aspects of C to be machine independent (portable) but now will be written into a very system dependant assembly file, the single .S file.  One thing of note is that so far everything is text files.  You can edit the assembly file as you would any document, or even further &#8216;process&#8217; it if needed/wanted.</p>



<p class="wp-block-paragraph">The assembler <a href="https://github.com/neozeed/gas-1.38-xenix-" target="_blank" rel="noreferrer noopener">ax386</a> (GAS) will then read the single assembly file and write a a binary object file hi.OBJ.  There typically isn&#8217;t all that much to be said about assemblers although fancier ones allow for really strong Macro capabilities like Microsoft MASM.</p>



<p class="wp-block-paragraph">From here on, it&#8217;s all binary objects!</p>



<p class="wp-block-paragraph">The linker then takes your object files, and links them together with other system objects and system libraries into an executable, in this case.  Linkers can build all kinds of other things, but for now we&#8217;re just pretending its static C compilation like it&#8217;s the 1970&#8217;s.</p>



<p class="wp-block-paragraph">At it&#8217;s heart GCC processes text files.</p>



<p class="wp-block-paragraph">The first part in this insane experiment, is to build <a href="https://archive.org/details/oldgcc1x" target="_blank" rel="noreferrer noopener">GCC 1.40</a> with Microsoft Visual C++ 1.0.  Surprisingly it didn&#8217;t take an insane amount of messing with stuff, and I got an executable!  But everything it compiled failed to assemble.  Looking at this fragment, even if you don&#8217;t know i386 assembly you might spot the error:</p>



<pre class="wp-block-code"><code>main:
        pushl %ebp
        a b,c
        pushl %esi
        pushl %ebx</code></pre>



<p class="wp-block-paragraph">Yeah, it&#8217;s the &#8220;a b,c&#8221; part.  Those are NOT valid i386 opcodes!  </p>



<p class="wp-block-paragraph">Just because it compiled didn&#8217;t mean it actually worked.</p>



<p class="wp-block-paragraph">I used MinGW to build the same source, same Makefile, and I got a working executable.  Annoyed I started compiling random files with Microsoft C, and finally found the file that broke it all, it turned out to be insn-output.c needing to be compiled with the &#8220;/D__STDC__&#8221; flags.  A quick modification of the Makefile and now I have a working CC1!</p>



<p class="wp-block-paragraph">Okay, great, it&#8217;s well known back in the early dangerous ages of the 1980&#8217;s/1990&#8217;s that everyone wasn&#8217;t running Linux, nor were binary distributions of GCC that far spread, rather I think to re-enforce the source was available it was expected that you&#8217;d use your system compiler.  Systems like <a href="https://sourceforge.net/projects/crossdjgppv1/" target="_blank" rel="noreferrer noopener">DJGPP</a>/<a href="https://sourceforge.net/projects/crossemx/" target="_blank" rel="noreferrer noopener">EMX</a> take the path of binding a.out object files into something that MS-DOS can run via a dos extender, or the bind utility to allow you to run the a.out on OS/2.  What I wan&#8217;t to do is verify that in fact <a href="https://archive.org/details/windows-nt-3.1-build-239">Windows NT was a viable host for GCC back in the public pre-releases of 1991</a>.</p>



<p class="wp-block-paragraph">I&#8217;m sticking with the December build 239 version as it has working floating point.  Something that GCC has intrinsic support of, and I don&#8217;t feel like trying to work out emulation.</p>



<p class="wp-block-paragraph">The next step is to try to build it with the family mode-OS/2 version of the C compiler, which of course lead to the real issue of this 16bit hosted cross compiler:</p>



<pre class="wp-block-code"><code>        cl386 /u /Od /Ic:\MSVC32S\C386\INCLUDE /I. /Iconfig /c combine.c
Microsoft (R) Microsoft 386 C Compiler. Version 1.00.075
Copyright (c) Microsoft Corp 1984-1989. All rights reserved.

combine.c
combine.c(1734) : fatal error C1002: compiler is out of heap space in Pass 2
NMAKE : fatal error U1077: 'C:\WINDOWS\system32\cmd.exe' : return code '0x2'
Stop.
</code></pre>



<p class="wp-block-paragraph">Very frustrating.  I tried mixing and matching from Visual C++ 1.0 &amp; this old compiler, and while it did compile, it doesn&#8217;t run. does it mean anything?!</p>



<figure class="wp-block-image size-full"><a href="https://virtuallyfun.com/wp-content/uploads/2024/01/gcc-140-compiled-on-nt.png"><img loading="lazy" decoding="async" width="797" height="288" src="https://virtuallyfun.com/wp-content/uploads/2024/01/gcc-140-compiled-on-nt.png" alt="" class="wp-image-13734" srcset="https://virtuallyfun.com/wp-content/uploads/2024/01/gcc-140-compiled-on-nt.png 797w, https://virtuallyfun.com/wp-content/uploads/2024/01/gcc-140-compiled-on-nt-300x108.png 300w, https://virtuallyfun.com/wp-content/uploads/2024/01/gcc-140-compiled-on-nt-768x278.png 768w, https://virtuallyfun.com/wp-content/uploads/2024/01/gcc-140-compiled-on-nt-500x181.png 500w" sizes="auto, (max-width: 797px) 100vw, 797px" /></a><figcaption class="wp-element-caption">GCC 1.40 compiled by Microsoft 386 C Compiler. Version 1.00.075</figcaption></figure>



<p class="wp-block-paragraph">I should point out that this should be an expected working configuration as GCC does build on Xenix using the 32bit Microsoft C 5.1/386 compiler.  Furthered again that Xenix and these 1991 versions of NT use the same 32bit OMF object format.  And expanding on the Xenixnt experiment using the Xenix&#8217;ified GAS assembler with old Visual C++ includes &amp; libraries to produce a possible retro-early port of GCC to NT, the next move is to bulid GAS on NT.</p>



<figure class="wp-block-image size-full"><a href="https://virtuallyfun.com/wp-content/uploads/2024/01/xenix-gas-on-nt.png"><img loading="lazy" decoding="async" width="793" height="286" src="https://virtuallyfun.com/wp-content/uploads/2024/01/xenix-gas-on-nt.png" alt="" class="wp-image-13735" srcset="https://virtuallyfun.com/wp-content/uploads/2024/01/xenix-gas-on-nt.png 793w, https://virtuallyfun.com/wp-content/uploads/2024/01/xenix-gas-on-nt-300x108.png 300w, https://virtuallyfun.com/wp-content/uploads/2024/01/xenix-gas-on-nt-768x277.png 768w, https://virtuallyfun.com/wp-content/uploads/2024/01/xenix-gas-on-nt-500x180.png 500w" sizes="auto, (max-width: 793px) 100vw, 793px" /></a><figcaption class="wp-element-caption">Xenix GAS 1.38 compiled by by Microsoft 386 C Compiler. Version 1.00.075</figcaption></figure>



<p class="wp-block-paragraph">GAS gave me some weird issues with ctype.h where it runs fine with the one from Visual C++ 1.0 but the OS/2 &amp; NT pre-release both fail.  However the old Pre-release compiler cannot deal with the much newer ctype include file.  So after much hammering I amputated whatever was bothering it, and it&#8217;s just enough to build &amp; run. Great!</p>



<p class="wp-block-paragraph">Going back to the phases, I used a simple hello world program:</p>



<pre class="wp-block-code"><code>void main() {
 printf("Hello World!\n");
}</code></pre>



<p class="wp-block-paragraph">While not being a good program, it doesn&#8217;t include stdio.h, nor does it return anything. It&#8217;s terrible.  But in this case it allows me to be lazy and sidestep the pre-processor cpp.exe.  This way I can just directly run it through cc1 and get my assembler file hi.S</p>



<p class="wp-block-paragraph">Next I pass it to ax386 (GAS) and get the resulting object file hi.OBJ</p>



<p class="wp-block-paragraph">And finally link it with link.exe in this case.</p>



<figure class="wp-block-image size-full"><a href="https://virtuallyfun.com/wp-content/uploads/2024/01/hello-world-from-dec-1991.png"><img loading="lazy" decoding="async" width="793" height="286" src="https://virtuallyfun.com/wp-content/uploads/2024/01/hello-world-from-dec-1991.png" alt="" class="wp-image-13736" srcset="https://virtuallyfun.com/wp-content/uploads/2024/01/hello-world-from-dec-1991.png 793w, https://virtuallyfun.com/wp-content/uploads/2024/01/hello-world-from-dec-1991-300x108.png 300w, https://virtuallyfun.com/wp-content/uploads/2024/01/hello-world-from-dec-1991-768x277.png 768w, https://virtuallyfun.com/wp-content/uploads/2024/01/hello-world-from-dec-1991-500x180.png 500w" sizes="auto, (max-width: 793px) 100vw, 793px" /></a><figcaption class="wp-element-caption">Hello World from GCC 1.40 on NT!</figcaption></figure>



<p class="wp-block-paragraph">And with all the drama I&#8217;ve now compiled a simple hello world program on Windows NT.</p>



<p class="wp-block-paragraph">If it were 1991, I would hollow out gcc.c so it doesn&#8217;t use signals or forks to invoke the needed phases, and of course build the pre-processor.  In addition, libgcc needs to be compiled to allow for floating point operations to work correctly.  None of which is impossible, although I&#8217;m not sure it&#8217;s all that needed as it isn&#8217;t 1991.</p>



<figure class="wp-block-image size-full"><a href="https://archive.org/details/phoon-on-1991-dec-nt" target="_blank" rel="noreferrer noopener"><img loading="lazy" decoding="async" width="797" height="283" src="https://virtuallyfun.com/wp-content/uploads/2024/01/phoon-on-1991-dec-nt.png" alt="" class="wp-image-13755" srcset="https://virtuallyfun.com/wp-content/uploads/2024/01/phoon-on-1991-dec-nt.png 797w, https://virtuallyfun.com/wp-content/uploads/2024/01/phoon-on-1991-dec-nt-300x107.png 300w, https://virtuallyfun.com/wp-content/uploads/2024/01/phoon-on-1991-dec-nt-768x273.png 768w, https://virtuallyfun.com/wp-content/uploads/2024/01/phoon-on-1991-dec-nt-500x178.png 500w" sizes="auto, (max-width: 797px) 100vw, 797px" /></a><figcaption class="wp-element-caption">phoon</figcaption></figure>



<p class="wp-block-paragraph">With a little bit more work, I got the floating point support to compile, which relies on both a working &#8216;native&#8217; compiler, and a working GCC to compile the 2nd half.  I usually use <a href="https://www.acme.com/software/phoon/">phoon</a>, or <a href="https://www.acme.com/software/phoon/">Phases of the Moon</a>, to test floating point, and as you can see, it&#8217;s working!</p>



<p class="wp-block-paragraph">I&#8217;m not sure if there was a 32bit version of Microsoft C/386 available for Microsoft OS/2 2.00 betas.  Also, I don&#8217;t know if the Microsoft link386 for OS/2 can also link Xenix 386 object files?  Would it have been possible to bootstrap GCC/GAS on Microsoft OS/2 2.00?  I really don&#8217;t know, and as of this writing no versions of the old Microsoft OS/2 2.00 betas have surfaced.</p>



<p class="wp-block-paragraph"><strong>** update</strong> from the future, turns out that I found a way to convince the cl386 compilers from the NT Pre-Releases in 1991 to re-build an existing GCC that was built for NT.  The catch is the linker, LINK386 of course, as the format was constantly changing.  However the object files are fine, and I was able to just copy them over on diskette and re-link the compiler.  It even ran.  It&#8217;s not tested at all, so it turns out the 1989 compiler wasn&#8217;t good enough, but the 1991 was.</p>



<figure class="wp-block-image size-full"><a href="/wp-content/uploads/2024/02/gcc-on-early-os2-beta.png" target="_blank" rel="noreferrer noopener"><img loading="lazy" decoding="async" width="798" height="438" src="/wp-content/uploads/2024/02/gcc-on-early-os2-beta.png" alt="" class="wp-image-13916" srcset="https://virtuallyfun.com/wp-content/uploads/2024/02/gcc-on-early-os2-beta.png 798w, https://virtuallyfun.com/wp-content/uploads/2024/02/gcc-on-early-os2-beta-300x165.png 300w, https://virtuallyfun.com/wp-content/uploads/2024/02/gcc-on-early-os2-beta-768x422.png 768w, https://virtuallyfun.com/wp-content/uploads/2024/02/gcc-on-early-os2-beta-500x274.png 500w" sizes="auto, (max-width: 798px) 100vw, 798px" /></a><figcaption class="wp-element-caption">GCC 1.40 on OS/2 2.00 beta 6.123</figcaption></figure>



<p class="wp-block-paragraph">It&#8217;s interesting to me to see that <a href="https://virtuallyfun.com/2014/09/26/did-you-know-that-gcc-used-to-support-windows-nt/" target="_blank" rel="noreferrer noopener">even before GCC 2.6</a>, that vintage versions from 1991 would compile and run directly on Windows NT.</p>



<p class="wp-block-paragraph">I uploaded the source on <a href="https://github.com/neozeed/gcc-140_gas-138_WindowsNT_v239">github</a>, along with <a href="https://github.com/neozeed/gcc-140_gas-138_WindowsNT_v239/releases">some binaries</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://virtuallyfun.com/2024/01/08/so-it-turns-out-gcc-could-have-been-available-on-windows-nt-the-entire-time/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Windows NT 3.1 on DEC Alpha AXP</title>
		<link>https://virtuallyfun.com/2023/10/02/windows-nt-3-1-on-dec-alpha-axp/</link>
					<comments>https://virtuallyfun.com/2023/10/02/windows-nt-3-1-on-dec-alpha-axp/#comments</comments>
		
		<dc:creator><![CDATA[tenox]]></dc:creator>
		<pubDate>Mon, 02 Oct 2023 10:29:05 +0000</pubDate>
				<category><![CDATA[DEC Alpha]]></category>
		<category><![CDATA[guest post]]></category>
		<category><![CDATA[Windows NT 3.1]]></category>
		<guid isPermaLink="false">http://virtuallyfun.com/?p=13129</guid>

					<description><![CDATA[(this is a guest post by Antoni Sawicki aka Tenox) As I was preparing the Windows NT RISC exhibit for VCF west, I realized that I&#8217;m missing a rather important piece of the history. While I was showing the potentially &#8230; <a href="https://virtuallyfun.com/2023/10/02/windows-nt-3-1-on-dec-alpha-axp/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
										<content:encoded><![CDATA[
<p class="wp-block-paragraph"><em>(this is a guest post by Antoni Sawicki aka Tenox)</em></p>



<p class="wp-block-paragraph">As I was preparing the <a href="https://virtuallyfun.com/2023/08/05/come-meet-tenox-check-out-the-nt-risc-collection-over-at-vcf/" data-type="post" data-id="13090">Windows NT RISC exhibit for VCF west</a>, I realized that I&#8217;m missing a rather important piece of the history. While I was showing the potentially last DEC Alpha Windows build ever &#8211; <a href="https://virtuallyfun.com/2023/05/15/windows-2000-64-bit-for-alpha-axp/" data-type="post" data-id="12532">AXP64 2210</a>, I don&#8217;t have anything earlier than NT 3.51. It would be nice to showcase the very first RTM version &#8211; NT 3.1 on a RISC platform.</p>



<p class="wp-block-paragraph">From time perspective, NT didn&#8217;t get popular until 3.5 and later. Windows NT 3.1 would be considered rare even on a 386, let alone on a RISC machine! So what hardware does Windows NT 3.1 run on?</p>



<figure class="wp-block-image size-large is-resized"><img loading="lazy" decoding="async" width="752" height="1024" src="https://virtuallyfun.com/wp-content/uploads/2023/10/IMG_0179-1-752x1024.jpg" alt="" class="wp-image-13266" style="width:287px;height:391px" srcset="https://virtuallyfun.com/wp-content/uploads/2023/10/IMG_0179-1-752x1024.jpg 752w, https://virtuallyfun.com/wp-content/uploads/2023/10/IMG_0179-1-220x300.jpg 220w, https://virtuallyfun.com/wp-content/uploads/2023/10/IMG_0179-1-768x1045.jpg 768w, https://virtuallyfun.com/wp-content/uploads/2023/10/IMG_0179-1-1128x1536.jpg 1128w, https://virtuallyfun.com/wp-content/uploads/2023/10/IMG_0179-1-1505x2048.jpg 1505w, https://virtuallyfun.com/wp-content/uploads/2023/10/IMG_0179-1-scaled.jpg 1881w" sizes="auto, (max-width: 752px) 100vw, 752px" /><figcaption class="wp-element-caption">NT 3.1 RISC HCL</figcaption></figure>



<p class="wp-block-paragraph">Quite a limited list! The <a href="https://gunkies.org/wiki/Windows_NT_3.1_HCL">HCL published on gunkies</a> has a few more systems, but nothing that I would have. The early MIPS based systems are all but unobtanium as of today. This is probably a good time to mention a little known <a href="https://virtuallyfun.com/2023/06/15/windows-nt-demo-on-the-dec-mips-5000/" data-type="post" data-id="12830">port of Windows NT 3.1 to the DECstation 5000</a>. However these builds have not surfaced anywhere, so no help.</p>



<p class="wp-block-paragraph">The Alphas were looking a little more reachable. The DEC 2000 Model 300 and <a href="https://en.wikipedia.org/wiki/DECpc_AXP_150" data-type="link" data-id="https://en.wikipedia.org/wiki/DECpc_AXP_150">DECpc AXP 150</a> are one and the same machine, packaged in a server and workstation cases. Code-named <strong>Jensen</strong>, DEC designed and marketed these specifically around Windows NT. Unlike prior Alphas, this model used a lot of &#8220;PC&#8221; components for increased compatibility and lower cost. Eventually paved way for the more well known <a href="https://en.wikipedia.org/wiki/DEC_Multia">DEC Multia</a>. The Jensen has been seen floating here and there and many people have these. </p>



<p class="wp-block-paragraph">I was able to get a loaner from Chris Satterfield aka <a href="https://twitter.com/compgeke">Compgeke</a> and I was set for the <a href="https://virtuallyfun.com/2023/08/05/come-meet-tenox-check-out-the-nt-risc-collection-over-at-vcf/" data-type="post" data-id="13090">VCF</a>. However, having a working specimen at hand, I started looking at part numbers of various components. In an amazing streak of luck, in practically zero time I was able to find, buy and assemble a complete DECpc AXP 150 from spare parts on eBay! Without a case, but nevertheless. Also big thanks to <a href="https://christopherrivett.co.uk/2023/07/30/vms-and-nt-upgrades-on-the-jensen/#more-355" data-type="link" data-id="https://christopherrivett.co.uk/2023/07/30/vms-and-nt-upgrades-on-the-jensen/#more-355">Christopher Rivett </a>for help with some fine details!</p>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="726" src="https://virtuallyfun.com/wp-content/uploads/2023/10/IMG_0752-1024x726.jpg" alt="" class="wp-image-13268" srcset="https://virtuallyfun.com/wp-content/uploads/2023/10/IMG_0752-1024x726.jpg 1024w, https://virtuallyfun.com/wp-content/uploads/2023/10/IMG_0752-300x213.jpg 300w, https://virtuallyfun.com/wp-content/uploads/2023/10/IMG_0752-768x545.jpg 768w, https://virtuallyfun.com/wp-content/uploads/2023/10/IMG_0752-1536x1089.jpg 1536w, https://virtuallyfun.com/wp-content/uploads/2023/10/IMG_0752-2048x1452.jpg 2048w, https://virtuallyfun.com/wp-content/uploads/2023/10/IMG_0752-423x300.jpg 423w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /><figcaption class="wp-element-caption">Franken Jensen built from spare parts off eBay.</figcaption></figure>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="768" src="https://virtuallyfun.com/wp-content/uploads/2023/10/IMG_0897-1024x768.jpg" alt="" class="wp-image-13281" srcset="https://virtuallyfun.com/wp-content/uploads/2023/10/IMG_0897-1024x768.jpg 1024w, https://virtuallyfun.com/wp-content/uploads/2023/10/IMG_0897-300x225.jpg 300w, https://virtuallyfun.com/wp-content/uploads/2023/10/IMG_0897-768x576.jpg 768w, https://virtuallyfun.com/wp-content/uploads/2023/10/IMG_0897-1536x1152.jpg 1536w, https://virtuallyfun.com/wp-content/uploads/2023/10/IMG_0897-2048x1536.jpg 2048w, https://virtuallyfun.com/wp-content/uploads/2023/10/IMG_0897-400x300.jpg 400w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /><figcaption class="wp-element-caption">Jensen running at VCF West 2023, with fans installed</figcaption></figure>



<p class="wp-block-paragraph"><strong>BOM</strong></p>



<ul class="wp-block-list">
<li>Motherboard + CPU &#8211; DEC <strong>70-29685-01</strong></li>



<li>GPU &#8211; DEC/Compaq Qvision 1024/E (1024&#215;768) &#8211; <strong>126654-001</strong></li>



<li>GPU &#8211; (Optional) Number 9 High Res (1280&#215;1024) &#8211; <strong>30-41800-01</strong></li>



<li>HBA &#8211; Adaptec AHA-1742A EISA &#8211; <strong>467806-00</strong></li>



<li>NIC &#8211; DEC DE422-S EISA &#8211; <strong>5021102-01</strong></li>



<li>RAM &#8211; 4x 16MB, FPM, 60ns, 72-Pin, 12-Chip, True Parity SIMM</li>



<li>PSU &#8211; DEC/HP <strong>30-37197-02</strong>, however a standard AT PSU may be OK</li>
</ul>



<p class="wp-block-paragraph">If you going to build one yourself, beware of overheating. Jensen runs rather hot and needs good cooling. Not only for the CPU. There is a section of the motherboard just under the EISA cards that runs incredibly hot. See the picture, where I have installed a large Noctua fan.</p>



<p class="wp-block-paragraph"><strong>OS Install</strong></p>



<p class="wp-block-paragraph">There are many Windows NT 3.1 CDROMs floating around. I purchased a DEC branded, shrink-wrapped CD on eBay to use as a prop along with the machine. You can download the iso image <a href="http://osarchive.org/os/winnt_xp/Installmedia/nt3x/nt31dec.rar">here</a>.</p>



<figure class="wp-block-gallery has-nested-images columns-default is-cropped wp-block-gallery-1 is-layout-flex wp-block-gallery-is-layout-flex">
<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="768" height="1024" data-id="13308" src="https://virtuallyfun.com/wp-content/uploads/2023/10/IMG_0175-768x1024.jpg" alt="" class="wp-image-13308" srcset="https://virtuallyfun.com/wp-content/uploads/2023/10/IMG_0175-768x1024.jpg 768w, https://virtuallyfun.com/wp-content/uploads/2023/10/IMG_0175-225x300.jpg 225w, https://virtuallyfun.com/wp-content/uploads/2023/10/IMG_0175-1152x1536.jpg 1152w, https://virtuallyfun.com/wp-content/uploads/2023/10/IMG_0175-1536x2048.jpg 1536w, https://virtuallyfun.com/wp-content/uploads/2023/10/IMG_0175-scaled.jpg 1920w" sizes="auto, (max-width: 768px) 100vw, 768px" /></figure>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="768" height="1024" data-id="13309" src="https://virtuallyfun.com/wp-content/uploads/2023/10/IMG_0176-768x1024.jpg" alt="" class="wp-image-13309" srcset="https://virtuallyfun.com/wp-content/uploads/2023/10/IMG_0176-768x1024.jpg 768w, https://virtuallyfun.com/wp-content/uploads/2023/10/IMG_0176-225x300.jpg 225w, https://virtuallyfun.com/wp-content/uploads/2023/10/IMG_0176-1152x1536.jpg 1152w, https://virtuallyfun.com/wp-content/uploads/2023/10/IMG_0176-1536x2048.jpg 1536w, https://virtuallyfun.com/wp-content/uploads/2023/10/IMG_0176-scaled.jpg 1920w" sizes="auto, (max-width: 768px) 100vw, 768px" /></figure>
</figure>



<p class="wp-block-paragraph">Installation of Windows NT 3.1 on DECpc AXP 150 is pretty straightforward and not that much different from the later versions. However as a prerequisite you will need the <a href="http://osarchive.org/hw/dec/alpha_axp/jensen" data-type="link" data-id="http://osarchive.org/hw/dec/alpha_axp/jensen">ECU floppy disk</a> to configure the EISA slot assignments, card and jumper settings. After that you will have to go through various setup screens in ARC BIOS to configure system settings. Then you run <code>arcinst</code> to create a system partition and <code>setupldr</code> to install the OS. The rest of it is pretty uneventful. This is somewhat expected, as this was pretty much the only one and supported hardware combination, so must have been well tested. The only curious part is that the NT OS Kernel does not display any messages in text mode. Later versions of NT will display the build number and MP or UP kernel variant and dots indicating subsystem load progress. This is rather odd because I expected more char mode stuff from earlier NT version, but who knows.</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="440" height="200" src="https://virtuallyfun.com/wp-content/uploads/2023/10/Screenshot_2023-07-29_at_1.11.02_PM-1.png" alt="" class="wp-image-13272" srcset="https://virtuallyfun.com/wp-content/uploads/2023/10/Screenshot_2023-07-29_at_1.11.02_PM-1.png 440w, https://virtuallyfun.com/wp-content/uploads/2023/10/Screenshot_2023-07-29_at_1.11.02_PM-1-300x136.png 300w" sizes="auto, (max-width: 440px) 100vw, 440px" /><figcaption class="wp-element-caption">Jensen NT 3.1 Boot Menu</figcaption></figure>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="819" src="https://virtuallyfun.com/wp-content/uploads/2023/10/winnt31-1024x819.png" alt="" class="wp-image-13295" srcset="https://virtuallyfun.com/wp-content/uploads/2023/10/winnt31-1024x819.png 1024w, https://virtuallyfun.com/wp-content/uploads/2023/10/winnt31-300x240.png 300w, https://virtuallyfun.com/wp-content/uploads/2023/10/winnt31-768x614.png 768w, https://virtuallyfun.com/wp-content/uploads/2023/10/winnt31-375x300.png 375w, https://virtuallyfun.com/wp-content/uploads/2023/10/winnt31.png 1280w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /><figcaption class="wp-element-caption">Windows NT 3.1 on DEC Alpha AXP, DECpc 150 aka Jensen</figcaption></figure>



<p class="wp-block-paragraph"><strong>Service Pack Saga</strong></p>



<p class="wp-block-paragraph">If you are even vaguely familiar with installing Windows NT at all, you will know that the very first thing you have to perform after installation, is to apply a service pack. NT 3.1 did have service packs, up to SP3. The problem was that, as you may expect, RISC editions were nowhere to be found in 2023. The only thing I could come up with was <a href="http://www.win31.de/ent31.htm">http://www.win31.de/ent31.htm</a>, which at the time had a <strong>German</strong> AXP and MIPS SP3, but no English! <em>[It since has been updated&#8230;]</em>. I had to do some real detective work to track down an US-English AXP SP3 version. I spent a few days going through various random CDs and ftp site mirrors of that era, with little luck. Eventually I stumbled on this README file, stating:</p>



<pre class="wp-block-code"><code>Due to space constraints on the Windows NT Service Packs for
International Versions CD, the USA Service Pack version 3 is located on
the <em>Additional Windows NT Service Packs, Windows 3.11 versions, SDKs,
and DDKs CD</em> in the NTSRVPC3\USA directory.
</code></pre>



<p class="wp-block-paragraph">Bingo! After a few hits and missed I spotted this particular CDROM here: <a href="https://archive.org/details/microsoft-developer-network-january-1995-disc-4-of-15">https://archive.org/details/microsoft-developer-network-january-1995-disc-4-of-15</a> &#8211; Now the OS is finally &#8220;servicepacked&#8221; <img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f642.png" alt="🙂" class="wp-smiley" style="height: 1em; max-height: 1em;" /></p>



<p class="wp-block-paragraph"><strong>Applications!</strong></p>



<p class="wp-block-paragraph">OS by itself without apps is not much. While overall Alpha NT application outlook is pretty scanty I was able to find a several very interesting gems!</p>



<p class="wp-block-paragraph">Most importantly, thanks to <a href="https://christopherrivett.co.uk/2023/07/30/vms-and-nt-upgrades-on-the-jensen/#more-355" data-type="link" data-id="https://christopherrivett.co.uk/2023/07/30/vms-and-nt-upgrades-on-the-jensen/#more-355">Chris</a>, a <a href="https://9track.net/bits/dec/pc/AG-Q2CNA-RK.zip">DEC Windows NT Developers CD-ROM</a>! </p>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="1016" src="https://virtuallyfun.com/wp-content/uploads/2023/10/disc-1024x1016.jpg" alt="" class="wp-image-13278" srcset="https://virtuallyfun.com/wp-content/uploads/2023/10/disc-1024x1016.jpg 1024w, https://virtuallyfun.com/wp-content/uploads/2023/10/disc-300x298.jpg 300w, https://virtuallyfun.com/wp-content/uploads/2023/10/disc-150x150.jpg 150w, https://virtuallyfun.com/wp-content/uploads/2023/10/disc-768x762.jpg 768w, https://virtuallyfun.com/wp-content/uploads/2023/10/disc-302x300.jpg 302w, https://virtuallyfun.com/wp-content/uploads/2023/10/disc.jpg 1500w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<p class="wp-block-paragraph">The disk has an incredible amount of demo, freeware, public domain and shareware applications as well as DEC marketing material. </p>



<figure class="wp-block-image size-full is-resized"><img loading="lazy" decoding="async" width="1023" height="769" src="https://virtuallyfun.com/wp-content/uploads/2023/10/Screenshot_2023-07-29_at_1.30.09_PM.png" alt="" class="wp-image-13276" style="width:614px;height:455px" srcset="https://virtuallyfun.com/wp-content/uploads/2023/10/Screenshot_2023-07-29_at_1.30.09_PM.png 1023w, https://virtuallyfun.com/wp-content/uploads/2023/10/Screenshot_2023-07-29_at_1.30.09_PM-300x226.png 300w, https://virtuallyfun.com/wp-content/uploads/2023/10/Screenshot_2023-07-29_at_1.30.09_PM-768x577.png 768w, https://virtuallyfun.com/wp-content/uploads/2023/10/Screenshot_2023-07-29_at_1.30.09_PM-399x300.png 399w" sizes="auto, (max-width: 1023px) 100vw, 1023px" /><figcaption class="wp-element-caption">Windows NT Developers CD for DEC Alpha NT 3.1</figcaption></figure>



<p class="wp-block-paragraph">You can get a lot of DEC proprietary software like C++, Fortran, PATHWORKS, DECtalk, as well as X servers, etc.</p>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="768" src="https://virtuallyfun.com/wp-content/uploads/2023/10/Screenshot_2023-07-29_at_1.45.21_PM-1024x768.png" alt="" class="wp-image-13277" srcset="https://virtuallyfun.com/wp-content/uploads/2023/10/Screenshot_2023-07-29_at_1.45.21_PM-1024x768.png 1024w, https://virtuallyfun.com/wp-content/uploads/2023/10/Screenshot_2023-07-29_at_1.45.21_PM-300x225.png 300w, https://virtuallyfun.com/wp-content/uploads/2023/10/Screenshot_2023-07-29_at_1.45.21_PM-768x576.png 768w, https://virtuallyfun.com/wp-content/uploads/2023/10/Screenshot_2023-07-29_at_1.45.21_PM-400x300.png 400w, https://virtuallyfun.com/wp-content/uploads/2023/10/Screenshot_2023-07-29_at_1.45.21_PM.png 1026w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<p class="wp-block-paragraph">However I was particularly interested in some 3rd party commercial apps. </p>



<p class="wp-block-paragraph">For example there is an early version of <a href="https://virtuallyfun.com/2017/12/25/calamus-for-windows-nt-risc/" data-type="link" data-id="https://virtuallyfun.com/2017/12/25/calamus-for-windows-nt-risc/">DMC Calamus Desktop Publishing</a>. </p>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="850" src="https://virtuallyfun.com/wp-content/uploads/2023/10/calamus-1024x850.png" alt="" class="wp-image-13289" srcset="https://virtuallyfun.com/wp-content/uploads/2023/10/calamus-1024x850.png 1024w, https://virtuallyfun.com/wp-content/uploads/2023/10/calamus-300x249.png 300w, https://virtuallyfun.com/wp-content/uploads/2023/10/calamus-768x637.png 768w, https://virtuallyfun.com/wp-content/uploads/2023/10/calamus-362x300.png 362w, https://virtuallyfun.com/wp-content/uploads/2023/10/calamus.png 1134w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /><figcaption class="wp-element-caption">DMC Calamus desktop publishing on Windows NT 3.1 DEC Alpha AXP</figcaption></figure>



<p class="wp-block-paragraph">Also a demo version of a vintage, text-mode SlickEdit, way before it was replaced by the <a href="https://www.slickedit.com/" data-type="link" data-id="https://www.slickedit.com/">Visual SlickEdit </a>known today.</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="652" height="331" src="https://virtuallyfun.com/wp-content/uploads/2023/10/slickedit.png" alt="" class="wp-image-13290" srcset="https://virtuallyfun.com/wp-content/uploads/2023/10/slickedit.png 652w, https://virtuallyfun.com/wp-content/uploads/2023/10/slickedit-300x152.png 300w, https://virtuallyfun.com/wp-content/uploads/2023/10/slickedit-500x254.png 500w" sizes="auto, (max-width: 652px) 100vw, 652px" /><figcaption class="wp-element-caption">SlickEdit 2.3 on Windows NT 3.1 DEC Alpha AXP</figcaption></figure>



<p class="wp-block-paragraph">There also is WinDev editior, which is quite superior to Notepad and has some code editing goodies and shortcuts to SDK tools, making it something of a simple IDE.</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="778" height="459" src="https://virtuallyfun.com/wp-content/uploads/2023/10/windev.png" alt="" class="wp-image-13292" srcset="https://virtuallyfun.com/wp-content/uploads/2023/10/windev.png 778w, https://virtuallyfun.com/wp-content/uploads/2023/10/windev-300x177.png 300w, https://virtuallyfun.com/wp-content/uploads/2023/10/windev-768x453.png 768w, https://virtuallyfun.com/wp-content/uploads/2023/10/windev-500x295.png 500w" sizes="auto, (max-width: 778px) 100vw, 778px" /><figcaption class="wp-element-caption">WinDev 1.56 on Windows NT 3.1 DEC Alpha AXP</figcaption></figure>



<p class="wp-block-paragraph">Another big source is <a href="https://archive.org/details/microsoft-32-bit-applications-sampler-for-windows-nt">Windows NT Application Sampler CDROM</a>, (<a href="https://www.si.edu/object/microsoft-32-bit-applications-sampler-windows-nt%3Anmah_1304593">also from Smithsonian)</a>.</p>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="768" src="https://virtuallyfun.com/wp-content/uploads/2023/10/img-Microsoft-32-Bit-Applications-Sampler-for-Windows-NT-1024x768.jpg" alt="" class="wp-image-13302" srcset="https://virtuallyfun.com/wp-content/uploads/2023/10/img-Microsoft-32-Bit-Applications-Sampler-for-Windows-NT-1024x768.jpg 1024w, https://virtuallyfun.com/wp-content/uploads/2023/10/img-Microsoft-32-Bit-Applications-Sampler-for-Windows-NT-300x225.jpg 300w, https://virtuallyfun.com/wp-content/uploads/2023/10/img-Microsoft-32-Bit-Applications-Sampler-for-Windows-NT-768x576.jpg 768w, https://virtuallyfun.com/wp-content/uploads/2023/10/img-Microsoft-32-Bit-Applications-Sampler-for-Windows-NT-1536x1152.jpg 1536w, https://virtuallyfun.com/wp-content/uploads/2023/10/img-Microsoft-32-Bit-Applications-Sampler-for-Windows-NT-2048x1536.jpg 2048w, https://virtuallyfun.com/wp-content/uploads/2023/10/img-Microsoft-32-Bit-Applications-Sampler-for-Windows-NT-400x300.jpg 400w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<p class="wp-block-paragraph">One of the coolest thing found there is a GUI text editor called WinEdit. It has a ton of features including syntax highlighting! It has since became my default to go editor / IDE on this system!</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="726" height="485" src="https://virtuallyfun.com/wp-content/uploads/2023/10/winedit.png" alt="" class="wp-image-13291" srcset="https://virtuallyfun.com/wp-content/uploads/2023/10/winedit.png 726w, https://virtuallyfun.com/wp-content/uploads/2023/10/winedit-300x200.png 300w, https://virtuallyfun.com/wp-content/uploads/2023/10/winedit-449x300.png 449w" sizes="auto, (max-width: 726px) 100vw, 726px" /><figcaption class="wp-element-caption">WinEdit 3.0E on Windows NT 3.1 DEC Alpha AXP</figcaption></figure>



<p class="wp-block-paragraph">There of course is a Windows NT SDK with the <a href="https://virtuallyfun.com/2018/03/11/microsoft-editor/" data-type="post" data-id="8226">M (MEP) editor</a>.</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="975" height="847" src="https://virtuallyfun.com/wp-content/uploads/2023/10/sdk.png" alt="" class="wp-image-13296" srcset="https://virtuallyfun.com/wp-content/uploads/2023/10/sdk.png 975w, https://virtuallyfun.com/wp-content/uploads/2023/10/sdk-300x261.png 300w, https://virtuallyfun.com/wp-content/uploads/2023/10/sdk-768x667.png 768w, https://virtuallyfun.com/wp-content/uploads/2023/10/sdk-345x300.png 345w" sizes="auto, (max-width: 975px) 100vw, 975px" /><figcaption class="wp-element-caption">Windows NT 3.1 SDK with M / MEP Editor on DEC Alpha AXP</figcaption></figure>



<p class="wp-block-paragraph">There also are quite few public domain apps and games, ports of GNU software, Micro Emacs, Kermit, etc.</p>



<p class="wp-block-paragraph"><strong>Update:</strong> CICA NT Shareware Collection has some interesting apps under the <a href="http://cd.textfiles.com/cica/cica9710/ALPHA/">/alpha</a> directory.</p>



<p class="wp-block-paragraph"><strong>High Resolution GPU</strong></p>



<p class="wp-block-paragraph">One of things that was troubling me for some time was rather low resolution of the default QVision graphics card. The maximum being only 1024&#215;768 is just not acceptable. Talking to several Jensen&#8217;s owners, no one even heard about anything better. However looking at the Windows setup options, I curiously noticed that the system does support one 1280&#215;1024 video card &#8211; <a href="https://en.wikipedia.org/wiki/Number_Nine_Visual_Technology#Number_Nine_Video_Cards_using_S3_Graphics_processors">Number 9 GXE</a>.</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="447" height="172" src="https://virtuallyfun.com/wp-content/uploads/2023/10/gfx.png" alt="" class="wp-image-13297" srcset="https://virtuallyfun.com/wp-content/uploads/2023/10/gfx.png 447w, https://virtuallyfun.com/wp-content/uploads/2023/10/gfx-300x115.png 300w" sizes="auto, (max-width: 447px) 100vw, 447px" /></figure>



<p class="wp-block-paragraph">I assumed that such card would simply be unobtanium in 2023. However, digging through some old catalogs and spare part listings, I managed to find a DEC part number, which is <strong>30-41800-01</strong>. Armed with this, I was able to find it via DEC spare part reseller that I often use. They had it in stock listed as &#8220;HIGH RES EISA 1280 x 1024 GRAPHICS&#8221;. The price wasn&#8217;t too bad either. A few days later I received this:</p>



<figure class="wp-block-gallery has-nested-images columns-default is-cropped wp-block-gallery-2 is-layout-flex wp-block-gallery-is-layout-flex">
<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="768" data-id="13299" src="https://virtuallyfun.com/wp-content/uploads/2023/10/IMG_1019-1024x768.jpg" alt="" class="wp-image-13299" srcset="https://virtuallyfun.com/wp-content/uploads/2023/10/IMG_1019-1024x768.jpg 1024w, https://virtuallyfun.com/wp-content/uploads/2023/10/IMG_1019-300x225.jpg 300w, https://virtuallyfun.com/wp-content/uploads/2023/10/IMG_1019-768x576.jpg 768w, https://virtuallyfun.com/wp-content/uploads/2023/10/IMG_1019-1536x1152.jpg 1536w, https://virtuallyfun.com/wp-content/uploads/2023/10/IMG_1019-2048x1536.jpg 2048w, https://virtuallyfun.com/wp-content/uploads/2023/10/IMG_1019-400x300.jpg 400w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="768" data-id="13300" src="https://virtuallyfun.com/wp-content/uploads/2023/10/IMG_1018-1024x768.jpg" alt="" class="wp-image-13300" srcset="https://virtuallyfun.com/wp-content/uploads/2023/10/IMG_1018-1024x768.jpg 1024w, https://virtuallyfun.com/wp-content/uploads/2023/10/IMG_1018-300x225.jpg 300w, https://virtuallyfun.com/wp-content/uploads/2023/10/IMG_1018-768x576.jpg 768w, https://virtuallyfun.com/wp-content/uploads/2023/10/IMG_1018-1536x1152.jpg 1536w, https://virtuallyfun.com/wp-content/uploads/2023/10/IMG_1018-2048x1536.jpg 2048w, https://virtuallyfun.com/wp-content/uploads/2023/10/IMG_1018-400x300.jpg 400w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>
</figure>



<p class="wp-block-paragraph">After installation of the S3 driver (must be the Service Pack 3 version!) I was finally able to get 1280&#215;1024 from the poor thing!</p>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="706" src="https://virtuallyfun.com/wp-content/uploads/2023/10/IMG_1046-1024x706.jpg" alt="" class="wp-image-13301" srcset="https://virtuallyfun.com/wp-content/uploads/2023/10/IMG_1046-1024x706.jpg 1024w, https://virtuallyfun.com/wp-content/uploads/2023/10/IMG_1046-300x207.jpg 300w, https://virtuallyfun.com/wp-content/uploads/2023/10/IMG_1046-768x530.jpg 768w, https://virtuallyfun.com/wp-content/uploads/2023/10/IMG_1046-435x300.jpg 435w, https://virtuallyfun.com/wp-content/uploads/2023/10/IMG_1046.jpg 1177w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<p class="wp-block-paragraph">With this I should have a more cozy environment to compile and port even more apps <img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f642.png" alt="🙂" class="wp-smiley" style="height: 1em; max-height: 1em;" /></p>



<p class="wp-block-paragraph">In future I want to try the Advanced Server edition as well as some early Betas with Alpha support. To be continued&#8230;</p>
]]></content:encoded>
					
					<wfw:commentRss>https://virtuallyfun.com/2023/10/02/windows-nt-3-1-on-dec-alpha-axp/feed/</wfw:commentRss>
			<slash:comments>15</slash:comments>
		
		
			</item>
		<item>
		<title>Windows NT demo on the DECstation 5000</title>
		<link>https://virtuallyfun.com/2023/06/15/windows-nt-demo-on-the-dec-mips-5000/</link>
					<comments>https://virtuallyfun.com/2023/06/15/windows-nt-demo-on-the-dec-mips-5000/#comments</comments>
		
		<dc:creator><![CDATA[neozeed]]></dc:creator>
		<pubDate>Thu, 15 Jun 2023 21:59:43 +0000</pubDate>
				<category><![CDATA[MIPS]]></category>
		<category><![CDATA[videos]]></category>
		<category><![CDATA[Windows NT 3.1]]></category>
		<guid isPermaLink="false">http://virtuallyfun.com/?p=12830</guid>

					<description><![CDATA[Well this was unexpected find! Thanks to hyenasky over on discord. While the platform had a few mentions here and there but it&#8217;s great to have found a talk about the product with video of it running. Interestingly enough Compaq &#8230; <a href="https://virtuallyfun.com/2023/06/15/windows-nt-demo-on-the-dec-mips-5000/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
										<content:encoded><![CDATA[
<iframe loading="lazy" width="560" height="315" src="https://www.youtube.com/embed/bMJIhN4xCro" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen></iframe>



<p class="wp-block-paragraph">Well this was unexpected find! Thanks to hyenasky over on discord.</p>



<p class="wp-block-paragraph">While the platform had a few mentions here and there but it&#8217;s great to have found a talk about the product with video of it running.</p>



<p class="wp-block-paragraph">Interestingly enough Compaq was apparently in charge of the ARC specifications?  Also kind of funny how the do touch on that maybe one day it could be available for the Dec Alpha, but as we know DEC pivoted away from the MIPS entirely to focus on the Alpha.</p>



<p class="wp-block-paragraph">The other part being how the Pentium/Pentium Pro was entirely unexpected from the wider RISC market that thought they had the migration point out of 386/486 based machines.</p>



<figure class="wp-block-image size-full"><a href="https://il.linkedin.com/in/yonah-alexandre-bronstein-3bb1785"><img loading="lazy" decoding="async" width="776" height="219" src="https://virtuallyfun.com/wp-content/uploads/2023/06/image.png" alt="" class="wp-image-12833" srcset="https://virtuallyfun.com/wp-content/uploads/2023/06/image.png 776w, https://virtuallyfun.com/wp-content/uploads/2023/06/image-300x85.png 300w, https://virtuallyfun.com/wp-content/uploads/2023/06/image-768x217.png 768w, https://virtuallyfun.com/wp-content/uploads/2023/06/image-500x141.png 500w" sizes="auto, (max-width: 776px) 100vw, 776px" /></a></figure>



<p class="wp-block-paragraph">Unfortunately, like the platform, Alexandre Bronstein exited DEC to go onto other ventures, oddly enough at Veritas being pulled back into dealing with Microsoft with the disk manager.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://virtuallyfun.com/2023/06/15/windows-nt-demo-on-the-dec-mips-5000/feed/</wfw:commentRss>
			<slash:comments>2</slash:comments>
		
		
			</item>
		<item>
		<title>Fun with Windows ePDK NT 3.1 build 196 &#038; Some Xenix fun!</title>
		<link>https://virtuallyfun.com/2023/06/01/fun-with-windows-epdk-nt-3-1-build-196-some-xenix-fun/</link>
					<comments>https://virtuallyfun.com/2023/06/01/fun-with-windows-epdk-nt-3-1-build-196-some-xenix-fun/#comments</comments>
		
		<dc:creator><![CDATA[neozeed]]></dc:creator>
		<pubDate>Thu, 01 Jun 2023 10:24:11 +0000</pubDate>
				<category><![CDATA[cross compiler]]></category>
		<category><![CDATA[gcc]]></category>
		<category><![CDATA[gnu]]></category>
		<category><![CDATA[microsoft]]></category>
		<category><![CDATA[microsoft windows]]></category>
		<category><![CDATA[Win32]]></category>
		<category><![CDATA[Win32s]]></category>
		<category><![CDATA[Windows NT 3.1]]></category>
		<category><![CDATA[Xenix]]></category>
		<guid isPermaLink="false">http://virtuallyfun.com/?p=12733</guid>

					<description><![CDATA[I&#8217;m not sure if I covered the Windows NT 3.1 build 196 before. First the most obvious is that as of this moment it&#8217;s the earliest version of Windows NT available. So let&#8217;s do some obligatory scratch of the surface. &#8230; <a href="https://virtuallyfun.com/2023/06/01/fun-with-windows-epdk-nt-3-1-build-196-some-xenix-fun/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
										<content:encoded><![CDATA[
<p class="wp-block-paragraph">I&#8217;m not sure if I covered the Windows <a rel="noreferrer noopener" href="https://archive.org/details/windows-nt-3.1-build-196" data-type="URL" data-id="https://archive.org/details/windows-nt-3.1-build-196" target="_blank">NT 3.1 build 196 before</a>. First the most obvious is that as of this moment it&#8217;s the earliest version of Windows NT available.</p>



<figure class="wp-block-image size-full"><a href="https://archive.org/details/windows-nt-3.1-build-196"><img loading="lazy" decoding="async" width="1000" height="1000" src="https://virtuallyfun.com/wp-content/uploads/2023/06/WindowsNT196Disc.jpg" alt="" class="wp-image-12734" srcset="https://virtuallyfun.com/wp-content/uploads/2023/06/WindowsNT196Disc.jpg 1000w, https://virtuallyfun.com/wp-content/uploads/2023/06/WindowsNT196Disc-300x300.jpg 300w, https://virtuallyfun.com/wp-content/uploads/2023/06/WindowsNT196Disc-150x150.jpg 150w, https://virtuallyfun.com/wp-content/uploads/2023/06/WindowsNT196Disc-768x768.jpg 768w" sizes="auto, (max-width: 1000px) 100vw, 1000px" /></a></figure>



<p class="wp-block-paragraph">So let&#8217;s do some obligatory scratch of the surface. Like all the other 1991 pre-releases there really is just a text mode setup install script. Choosing the lesser amount of pain, I went with a MS-DOS hosted install.  However, using MS-DOS 6.22 resulted in a broken dual boot system.  But we live in the era of virtual machines, so it really doesn&#8217;t matter.  I&#8217;m using <a rel="noreferrer noopener" href="https://archive.org/details/qemu-14.0-rc2-i386" target="_blank">Qemu 0.14-rc2</a>, something that is &#8216;era correct&#8217; for when the first avalanche broke on early Windows NT pre-releases.  I&#8217;ve had issues with more modern versions of Qemu, and I felt that if we&#8217;re using vintage software may as well go in all the way.</p>



<figure class="wp-block-image size-full"><a href="https://virtuallyfun.com/wp-content/uploads/2023/06/Windows-NT-196-boot-banner.png"><img loading="lazy" decoding="async" width="722" height="457" src="https://virtuallyfun.com/wp-content/uploads/2023/06/Windows-NT-196-boot-banner.png" alt="" class="wp-image-12736" srcset="https://virtuallyfun.com/wp-content/uploads/2023/06/Windows-NT-196-boot-banner.png 722w, https://virtuallyfun.com/wp-content/uploads/2023/06/Windows-NT-196-boot-banner-300x190.png 300w, https://virtuallyfun.com/wp-content/uploads/2023/06/Windows-NT-196-boot-banner-474x300.png 474w" sizes="auto, (max-width: 722px) 100vw, 722px" /></a></figure>



<p class="wp-block-paragraph">The boot loader identifies itself as being 1990 vintage.  Pretty sure it doesn&#8217;t mean anything, but we haven&#8217;t been blessed with the &#8220;blue screen&#8221; of ARC yet.</p>



<figure class="wp-block-image size-full"><a href="https://virtuallyfun.com/wp-content/uploads/2023/06/Windows-NT-196-login-screen.png"><img loading="lazy" decoding="async" width="642" height="512" src="https://virtuallyfun.com/wp-content/uploads/2023/06/Windows-NT-196-login-screen.png" alt="" class="wp-image-12738" srcset="https://virtuallyfun.com/wp-content/uploads/2023/06/Windows-NT-196-login-screen.png 642w, https://virtuallyfun.com/wp-content/uploads/2023/06/Windows-NT-196-login-screen-300x239.png 300w, https://virtuallyfun.com/wp-content/uploads/2023/06/Windows-NT-196-login-screen-376x300.png 376w" sizes="auto, (max-width: 642px) 100vw, 642px" /></a></figure>



<p class="wp-block-paragraph">The login screen and desktop have a very strong Windows 3.1 beta feel to them.  And that would land this where it was, Windows was such a big seller that Maritz had been trying to convince Gates &amp; Balmer to &#8216;switch to the Windows horse&#8217; in the spring/summer of 1990, culminating in Gate&#8217;s July decision to walk away from NT/OS2 and rebrand the new OS as Windows NT.  Oddly enough it was Balmer who was in favour of OS/2 &amp; IBM. (<em>Showstopper 89-90</em>)</p>



<figure class="wp-block-image size-full"><a href="https://virtuallyfun.com/wp-content/uploads/2023/06/Windows-NT-196-desktop.png"><img loading="lazy" decoding="async" width="642" height="512" src="https://virtuallyfun.com/wp-content/uploads/2023/06/Windows-NT-196-desktop.png" alt="" class="wp-image-12739" srcset="https://virtuallyfun.com/wp-content/uploads/2023/06/Windows-NT-196-desktop.png 642w, https://virtuallyfun.com/wp-content/uploads/2023/06/Windows-NT-196-desktop-300x239.png 300w, https://virtuallyfun.com/wp-content/uploads/2023/06/Windows-NT-196-desktop-376x300.png 376w" sizes="auto, (max-width: 642px) 100vw, 642px" /></a></figure>



<p class="wp-block-paragraph">At first glance the opening window isn&#8217;t all that interesting.  It&#8217;s just very. Windows.</p>



<figure class="wp-block-image size-full"><a href="https://virtuallyfun.com/wp-content/uploads/2023/06/Windows-NT-196-reversi.png"><img loading="lazy" decoding="async" width="642" height="512" src="https://virtuallyfun.com/wp-content/uploads/2023/06/Windows-NT-196-reversi.png" alt="" class="wp-image-12744" srcset="https://virtuallyfun.com/wp-content/uploads/2023/06/Windows-NT-196-reversi.png 642w, https://virtuallyfun.com/wp-content/uploads/2023/06/Windows-NT-196-reversi-300x239.png 300w, https://virtuallyfun.com/wp-content/uploads/2023/06/Windows-NT-196-reversi-376x300.png 376w" sizes="auto, (max-width: 642px) 100vw, 642px" /></a></figure>



<p class="wp-block-paragraph">Rest assured <a rel="noreferrer noopener" href="https://youtu.be/DgJS2tQPGKQ?t=35" target="_blank">Reversi</a>, of course made the this Win32 cut.  And it&#8217;s full of weird easter eggs, oddly enough in the OS/2 surviving bits.</p>



<pre class="wp-block-code"><code>type OS2LDR.DOS
OS2LDR 01.00.01
by KeithMo 01/08/91</code></pre>



<p class="wp-block-paragraph">On the <a rel="noreferrer noopener" href="https://discord.gg/HMwevcN" target="_blank">Discord</a> there had been a big discussion about early NT executable formats, and the whole COFF vs ECOFF vs PE/PEI. I had tried to hunt down the specific version of GCC I used ages to to build a so called <a rel="noreferrer noopener" href="https://virtuallyfun.com/2016/12/09/gcc-windows-nt-dec-alpha/" target="_blank">Dec Alpha GCC cross compiler</a>, but the short version is that it didn&#8217;t work as we don&#8217;t have any assembler/linker for anything GNU targets.  There had been a <a rel="noreferrer noopener" href="https://archive.org/details/gcc-alpha-b19-src.tar" target="_blank">cygwin port </a><a rel="noreferrer noopener" href="https://archive.org/details/gcc-alpha-b19-src.tar" target="_blank">a</a><a rel="noreferrer noopener" href="https://archive.org/details/gcc-alpha-b19-src.tar" target="_blank">n</a><a rel="noreferrer noopener" href="https://archive.org/details/gcc-alpha-b19-src.tar" target="_blank">d</a><a rel="noreferrer noopener" href="https://archive.org/details/gcc-alpha-b19-src.tar" target="_blank"> </a><a rel="noreferrer noopener" href="https://archive.org/details/gcc-alpha-b19-src.tar" target="_blank">a</a><a rel="noreferrer noopener" href="https://archive.org/details/gcc-alpha-b19-src.tar" target="_blank">n</a><a rel="noreferrer noopener" href="https://archive.org/details/gcc-alpha-b19-src.tar" target="_blank"> </a><a rel="noreferrer noopener" href="https://archive.org/details/gcc-alpha-b19-src.tar" target="_blank">OpenNT on Alpha</a>, but all that is lost to the winds, minus what few scraps I had saved.  I did try building some cross tools to elf hoping to just objcopy out the data and get linkable objects, but that didn&#8217;t work either.</p>



<p class="wp-block-paragraph">So I though this was a perfect opportunity to take a look at this early pre-release version of NT, and although I do know that you have to convert your objects into something the &#8216;COFF&#8217; linker will accept:</p>



<figure class="wp-block-image size-full"><a href="https://virtuallyfun.com/wp-content/uploads/2023/06/building-the-simple-text-mode-app-on-196.png"><img loading="lazy" decoding="async" width="642" height="106" src="https://virtuallyfun.com/wp-content/uploads/2023/06/building-the-simple-text-mode-app-on-196.png" alt="" class="wp-image-12745" srcset="https://virtuallyfun.com/wp-content/uploads/2023/06/building-the-simple-text-mode-app-on-196.png 642w, https://virtuallyfun.com/wp-content/uploads/2023/06/building-the-simple-text-mode-app-on-196-300x50.png 300w, https://virtuallyfun.com/wp-content/uploads/2023/06/building-the-simple-text-mode-app-on-196-500x83.png 500w" sizes="auto, (max-width: 642px) 100vw, 642px" /></a></figure>



<p class="wp-block-paragraph">And I never really paid that much attention to the object files.  I do know that you can link them with <a rel="noreferrer noopener" href="https://virtuallyfun.com/2021/05/11/continuing-with-ancient-microsoft-c-linkers/" target="_blank">Link386 for OS/2</a>, but the NT object files themselves report:</p>



<pre class="wp-block-code"><code>wsl file SIMPLE.OBJ
SIMPLE.OBJ: Intel 80386 COFF object file, not stripped, 4 sections, symbol offset=0x102, 20 symbols, created Thu Jun  1 14:13:50 2023, 1st section name ".text"</code></pre>



<p class="wp-block-paragraph">Well, now that is interesting.  And of course the COFF thing reminded me of Xenix!  And sure enough ages ago I had found the source to a modified version of <a rel="noreferrer noopener" href="https://github.com/neozeed/gas-1.38-xenix-" target="_blank">GNU GAS that outputs COFF</a>.  Once more again this is an indication that all 386 roads in Microsoft really did originate with Xenix.  It&#8217;s too bad there never was a Windows/386 on Xenix/386.  What an incredible OS that would have been!  There must be some incredible stories from the tool teams that worked on Microsoft C/386 along with other projects.  Oddly enough they never get anywhere near as much exposure as Office or OS.</p>



<p class="wp-block-paragraph">Now this is fun, but nothing takes in these ancient COFF objects, do they?  I tried to run LINK 1.0 from <a href="https://virtuallyfun.com/2011/04/04/win32s-version-tour/" target="_blank" rel="noreferrer noopener">Win32s SDK</a> and surprisingly it didn&#8217;t complain about the object, rather, it auto converted it in memory:</p>



<pre class="wp-block-code"><code>Microsoft (R) 32-Bit Executable Linker Version 1.00
Copyright (C) Microsoft Corp 1992-93. All rights reserved.

SIMPLE.OBJ : warning LNK4016: unresolved external symbol "__chkstk"
LINK : warning LNK4016: unresolved external symbol "_mainCRTStartup"
SIMPLE.OBJ : warning LNK4016: unresolved external symbol "_printf"
SIMPLE.exe : error LNK1120: 3 unresolved externals</code></pre>



<p class="wp-block-paragraph">Does this mean that if I give it some libraries it will actually link?</p>



<pre class="wp-block-code"><code>LINK.EXE SIMPLE.OBJ /SUBSYSTEM:CONSOLE /MACHINE:i386 -entry:mainCRTStartup -out:simple.exe libc.lib kernel32.lib
Microsoft (R) 32-Bit Executable Linker Version 1.00
Copyright (C) Microsoft Corp 1992-93. All rights reserved.


C:\temp\nt196\x\dec\x&gt;simple
Win32, it's happenin'!</code></pre>



<p class="wp-block-paragraph">This was. VERY unexpected.</p>



<p class="wp-block-paragraph">So I had this crazy idea, what if the Xenix assembler could in fact build objects that are also compaible in this manner?  I used the <a rel="noreferrer noopener" href="https://sourceforge.net/projects/linux011/" target="_blank">a.out GCC / Linux porting tools</a> I had built so I could compile Linux on Windows NT using the vintage tools as a starting point.  I guess I should also add that when people always say &#8216;use newer version of THING&#8217; this is how you miss out on old stuff like this.  If I had been obsessed with using modern tools and modern operating systems, I&#8217;d have missed out on this Xenix filled window.</p>



<p class="wp-block-paragraph">I took the gcc driver &amp; the cc1 compiler from 1.40 and the c pre-processor from 2.5.8 as it can understand C++ comments.  First I manually compiled the &#8216;simple&#8217; example to assembly:</p>



<pre class="wp-block-code"><code>gcc -v -nostdinc -I/xenixnt/h -S SIMPLE.c -O simple.S
gcc version 1.40
 cpp -nostdinc -v -I/xenixnt/h -undef -D__GNUC__ -Dunix -Di386 -D__unix__ -D__i386__ -D__OPTIMIZE__ SIMPLE.c C:/Users/jsteve/AppData/Local/Temp/cca2_048.cpp
GNU CPP version 2.5.8 (80386, BSD syntax)
#include "..." search starts here:
#include &lt;...&gt; search starts here:
 /xenixnt/h
End of search list.
 cc1 C:/Users/jsteve/AppData/Local/Temp/cca2_048.cpp -quiet -dumpbase SIMPLE.c -O -version -o SIMPLE.s
GNU C version 1.40 (80386, BSD syntax) compiled by GNU C version 5.1.0.
default target switches: -m80387
 cpp -nostdinc -v -I/xenixnt/h -undef -D__GNUC__ -$ -Dunix -Di386 -D__unix__ -D__i386__ -D__OPTIMIZE__ simple.S C:/Users/jsteve/AppData/Local/Temp/cca2_048.s
GNU CPP version 2.5.8 (80386, BSD syntax)
#include "..." search starts here:
#include &lt;...&gt; search starts here:
 /xenixnt/h
End of search list.</code></pre>



<p class="wp-block-paragraph">Which gave me the following assembly:</p>



<pre class="wp-block-code"><code>        .file   "SIMPLE.c"
gcc_compiled.:
.text
LC0:
        .ascii "Win32, it's happenin'!\0"
        .align 2
.globl _main
_main:
        pushl %ebp
        movl %esp,%ebp
        pushl $LC0
        call _printf
        leave
        ret
</code></pre>



<p class="wp-block-paragraph">Now to assemble with the GAS Xenix assembler</p>



<pre class="wp-block-code"><code>C:\temp\nt196\files\MSTOOLS\SAMPLES\SIMPLE&gt;ax386 SIMPLE.s -o SIMPLE.obj

C:\temp\nt196\files\MSTOOLS\SAMPLES\SIMPLE&gt;wsl file SIMPLE.obj
SIMPLE.obj: 8086 relocatable (Microsoft), "SIMPLE.c", 1st record data length 10, 2nd record type 0x88, 2nd record data length 11</code></pre>



<p class="wp-block-paragraph">Not quite the same.  But it does closer resemble the output from the OS/2 bound versions of the Pre-Rease compilers:</p>



<pre class="wp-block-code"><code>file EMPTY.OBJ
EMPTY.OBJ: 8086 relocatable (Microsoft), "empty.c", 1st record data length 9, 2nd record type 0x88, 2nd record data length 7</code></pre>



<p class="wp-block-paragraph">So will it link?!</p>



<pre class="wp-block-code"><code>C:\temp\nt196\files\MSTOOLS\SAMPLES\SIMPLE&gt;LINK.EXE SIMPLE.OBJ /SUBSYSTEM:CONSOLE /MACHINE:i386 -entry:mainCRTStartup -out:simple.exe libc.lib kernel32.lib
Microsoft (R) 32-Bit Incremental Linker Version 2.50
Copyright (C) Microsoft Corp 1992-94. All rights reserved.

SIMPLE.OBJ : warning LNK4033: converting object format from OMF to COFF

C:\temp\nt196\files\MSTOOLS\SAMPLES\SIMPLE&gt;simple
Win32, it's happenin'!</code></pre>



<p class="wp-block-paragraph">Well now this is interesting!  LONG before MinGW, or the <a rel="noreferrer noopener" href="https://virtuallyfun.com/2014/09/26/did-you-know-that-gcc-used-to-support-windows-nt/" target="_blank">GCC port to Windows NT</a>, it turns out that in fact GCC could target Windows NT the entire time!</p>



<p class="wp-block-paragraph">So the next thing to do is something not as trivial, like <a rel="noreferrer noopener" href="https://www.acme.com/software/phoon/" target="_blank">phoon</a>.</p>



<p class="wp-block-paragraph">I setup some quick script to pre-process, compile, assemble and then try to link, but as this one uses floating point, disaster struck:</p>



<pre class="wp-block-code"><code>phoon.obj : error LNK2001: unresolved external symbol "___fixdfsi"
astro.obj : error LNK2001: unresolved external symbol "___fixdfsi"
phoon.exe : error LNK1120: 1 unresolved externals</code></pre>



<p class="wp-block-paragraph">Now ages ago while messgin with old GCC &amp; DooM I also had weird math calls not working.  In the end I ended up extracting them from libgcc builds, so I thought I&#8217;d try the libgcc built during the GCC 2.6.3 on NT adventure.</p>



<pre class="wp-block-code"><code>link /NODEFAULTLIB:libc.lib /NODEFAULTLIB:OLDNAMES.LIB -out:phoon.exe astro.obj date_p.obj phoon.obj -entry:mainCRTStartup libgcc1.lib LIBC.LIB KERNEL32.LIB
Microsoft (R) 32-Bit Incremental Linker Version 2.50
Copyright (C) Microsoft Corp 1992-94. All rights reserved.</code></pre>



<p class="wp-block-paragraph">And of course:</p>


<div class="wp-block-image">
<figure class="aligncenter size-full"><img loading="lazy" decoding="async" width="979" height="512" src="https://virtuallyfun.com/wp-content/uploads/2023/06/phoon-gcc-on-nt.png" alt="" class="wp-image-12748" srcset="https://virtuallyfun.com/wp-content/uploads/2023/06/phoon-gcc-on-nt.png 979w, https://virtuallyfun.com/wp-content/uploads/2023/06/phoon-gcc-on-nt-300x157.png 300w, https://virtuallyfun.com/wp-content/uploads/2023/06/phoon-gcc-on-nt-768x402.png 768w, https://virtuallyfun.com/wp-content/uploads/2023/06/phoon-gcc-on-nt-500x261.png 500w" sizes="auto, (max-width: 979px) 100vw, 979px" /></figure>
</div>


<p class="wp-block-paragraph">To try to make the steps make a little more sense, and to allow for some higher level of automation I made a Makefile:</p>



<pre class="wp-block-code"><code>CC=gcc
CC1=cc1
AS=ax386
CPP=cpp


CFLAGS= -O
CPPFLAGS= -lang-c-c++-comments -nostdinc -I/xenixnt/h

OBJ =   astro.obj \
date_p.obj \
phoon.obj

LIBS = libgcc1.lib LIBC.LIB KERNEL32.LIB

phoon.exe: $(OBJ)
        link -out:phoon.exe $(OBJ) -entry:mainCRTStartup $(LIBS)

%.obj: %.c
        $(CPP) $(CPPFLAGS) $&lt; $*.i
        $(CC1) $*.i -quiet $(CFLAGS) -version -o $*.S
        $(AS) $*.S -o $*.obj


clean:
        del $(OBJ) *.i *.S phoon.exe</code></pre>



<p class="wp-block-paragraph">I&#8217;m sure there is better ways to do this, but it breaks the compile up to it&#8217;s individual parts:</p>



<p class="wp-block-paragraph">Run the pre-processor to allow // in the comments, C++ hadn&#8217;t been the default thing back when GCC 1.40 was a thing.  Also path it to the headers, in this case I&#8217;m using the ones from NT 196.  Trying to link with the 196 libraries gave me this:</p>



<pre class="wp-block-code"><code>C:\xenixnt\demos\phoon&gt;link /NODEFAULTLIB:LIBC.LIB /NODEFAULTLIB:OLDNAMES.LIB -out:phoon.exe astro.obj date_p.obj phoon.obj -entry:mainCRTStartup base.lib wincrt.lib ntdll.lib \xenixnt\lib\libgcc1.lib
Microsoft (R) 32-Bit Incremental Linker Version 2.50
Copyright (C) Microsoft Corp 1992-94. All rights reserved.

wincrt.lib(maincrt0.obj) : warning LNK4078: multiple ".data" sections found with different attributes (40000040)
astro.obj : error LNK2001: unresolved external symbol "_asin"
astro.obj : error LNK2001: unresolved external symbol "_atan"
astro.obj : error LNK2001: unresolved external symbol "_atan2"
phoon.obj : error LNK2001: unresolved external symbol "_cos"
astro.obj : error LNK2001: unresolved external symbol "_cos"
astro.obj : error LNK2001: unresolved external symbol "_floor"
astro.obj : error LNK2001: unresolved external symbol "_sin"
phoon.obj : error LNK2001: unresolved external symbol "_sqrt"
astro.obj : error LNK2001: unresolved external symbol "_sqrt"
astro.obj : error LNK2001: unresolved external symbol "_tan"
phoon.exe : error LNK1120: 8 unresolved externals</code></pre>



<p class="wp-block-paragraph">Which is not surprising as there is no FPU/Floating point math support in 196. I tried the December 1991 Pre-Release, but it failed for other reasons:</p>



<figure class="wp-block-image size-full"><a href="https://virtuallyfun.com/wp-content/uploads/2023/06/missing-CloseConsoleHandle.png"><img loading="lazy" decoding="async" width="968" height="364" src="https://virtuallyfun.com/wp-content/uploads/2023/06/missing-CloseConsoleHandle.png" alt="" class="wp-image-12750" srcset="https://virtuallyfun.com/wp-content/uploads/2023/06/missing-CloseConsoleHandle.png 968w, https://virtuallyfun.com/wp-content/uploads/2023/06/missing-CloseConsoleHandle-300x113.png 300w, https://virtuallyfun.com/wp-content/uploads/2023/06/missing-CloseConsoleHandle-768x289.png 768w, https://virtuallyfun.com/wp-content/uploads/2023/06/missing-CloseConsoleHandle-500x188.png 500w" sizes="auto, (max-width: 968px) 100vw, 968px" /></a></figure>



<p class="wp-block-paragraph">I did copy over BASE.DLL BASERTL.DLL CSR.DLL DBGDLL.DLL as it wanted, but despite the symbol being in the DLL it didn&#8217;t load.</p>



<p class="wp-block-paragraph">So that&#8217;s why I&#8217;m using the libraries from the <a href="https://virtuallyfun.com/2011/04/04/win32s-version-tour/" target="_blank" rel="noreferrer noopener">Win32s SDK</a>.</p>



<p class="wp-block-paragraph">Okay, so far now we have GCC 1.40 compiling to an old Xenix GAS assembler, and linking with Microsoft link from Visual C++ 1.0/2.0 era.  The next step is to see if we can just link the objects under 196, and get a running EXE!</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="642" height="512" src="https://virtuallyfun.com/wp-content/uploads/2023/06/Windows-NT-196-running-GCC-compiled-fib.png" alt="" class="wp-image-12742" srcset="https://virtuallyfun.com/wp-content/uploads/2023/06/Windows-NT-196-running-GCC-compiled-fib.png 642w, https://virtuallyfun.com/wp-content/uploads/2023/06/Windows-NT-196-running-GCC-compiled-fib-300x239.png 300w, https://virtuallyfun.com/wp-content/uploads/2023/06/Windows-NT-196-running-GCC-compiled-fib-376x300.png 376w" sizes="auto, (max-width: 642px) 100vw, 642px" /></figure>



<p class="wp-block-paragraph">I have this tiny fibonacci example program, so with it compiled &amp; assembled by GCC &amp; GAS, I did the final link under 196, and YES it runs!</p>



<figure class="wp-block-image size-full"><a href="https://virtuallyfun.com/wp-content/uploads/2023/06/Windows-NT-196-linking-and-running-GCC-compiled-infocom.png"><img loading="lazy" decoding="async" width="642" height="512" src="https://virtuallyfun.com/wp-content/uploads/2023/06/Windows-NT-196-linking-and-running-GCC-compiled-infocom.png" alt="" class="wp-image-12751" srcset="https://virtuallyfun.com/wp-content/uploads/2023/06/Windows-NT-196-linking-and-running-GCC-compiled-infocom.png 642w, https://virtuallyfun.com/wp-content/uploads/2023/06/Windows-NT-196-linking-and-running-GCC-compiled-infocom-300x239.png 300w, https://virtuallyfun.com/wp-content/uploads/2023/06/Windows-NT-196-linking-and-running-GCC-compiled-infocom-376x300.png 376w" sizes="auto, (max-width: 642px) 100vw, 642px" /></a></figure>



<p class="wp-block-paragraph">I then built the <a rel="noreferrer noopener" href="https://virtuallyfun.com/2014/12/15/tracking-down-the-infotaskforce-from-1987/" target="_blank">&#8217;87 InfoTaskForce</a>, <a rel="noreferrer noopener" href="https://virtuallyfun.com/2014/12/15/tracking-down-the-infotaskforce-from-1987/" target="_blank">Infocom interpreter</a>, and it was just a simple link, and it&#8217;s running!</p>



<p class="wp-block-paragraph">Possible things to do?  GCC should be able to build itself, so it should be possible to build GCC and link that on 196 or December 1991, and get a native version of GCC on NT.  The other possibility is to get newer versions of GCC (cc1 drop in replacements) to build for Xenix and / or OS/2.  Obviously this Xenix linker is the gateway to older 386 Microsoft based products!</p>



<p class="wp-block-paragraph">For those interested in such things, I&#8217;ve uploaded all of this to <a href="https://archive.org/details/windows-nt-196-linking-and-running-gcc" target="_blank" rel="noreferrer noopener">archive.org here: windows-nt-196-linking-and-running-gcc</a></p>
]]></content:encoded>
					
					<wfw:commentRss>https://virtuallyfun.com/2023/06/01/fun-with-windows-epdk-nt-3-1-build-196-some-xenix-fun/feed/</wfw:commentRss>
			<slash:comments>4</slash:comments>
		
		
			</item>
		<item>
		<title>Interesting? Maybe. October 1991 NT SDK uses the OS/2 toolchain</title>
		<link>https://virtuallyfun.com/2021/05/08/interesting-maybe-october-1991-nt-sdk-uses-the-os-2-toolchain/</link>
					<comments>https://virtuallyfun.com/2021/05/08/interesting-maybe-october-1991-nt-sdk-uses-the-os-2-toolchain/#respond</comments>
		
		<dc:creator><![CDATA[neozeed]]></dc:creator>
		<pubDate>Sat, 08 May 2021 02:42:01 +0000</pubDate>
				<category><![CDATA[cross compiler]]></category>
		<category><![CDATA[microsoft]]></category>
		<category><![CDATA[OS/2]]></category>
		<category><![CDATA[OS/2 2.0]]></category>
		<category><![CDATA[Windows NT 3.1]]></category>
		<guid isPermaLink="false">https://virtuallyfun.com/wordpress/?p=10978</guid>

					<description><![CDATA[So back in the day I wrote something vague about the October 1991 preview version of Windows NT, and after messing with the tools and building f2c &#38; dungeon (among some other stuff) one that that stuck out to me &#8230; <a href="https://virtuallyfun.com/2021/05/08/interesting-maybe-october-1991-nt-sdk-uses-the-os-2-toolchain/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
										<content:encoded><![CDATA[
<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="722" height="465" src="https://virtuallyfun.com/wp-content/uploads/2021/05/simple-c-program-with-October-1991-NT-SDK-for-OS2-2.00-v123.png" alt="" class="wp-image-10979" srcset="https://virtuallyfun.com/wp-content/uploads/2021/05/simple-c-program-with-October-1991-NT-SDK-for-OS2-2.00-v123.png 722w, https://virtuallyfun.com/wp-content/uploads/2021/05/simple-c-program-with-October-1991-NT-SDK-for-OS2-2.00-v123-300x193.png 300w, https://virtuallyfun.com/wp-content/uploads/2021/05/simple-c-program-with-October-1991-NT-SDK-for-OS2-2.00-v123-466x300.png 466w" sizes="auto, (max-width: 722px) 100vw, 722px" /><figcaption>The linker is from an older MS SDK, the compiler from October 1991 preview of NT</figcaption></figure>



<p class="wp-block-paragraph">So back in the day I wrote something vague about the <a rel="noreferrer noopener" href="https://virtuallyfun.com/wordpress/2011/04/26/the-first-appearance-of-windows-nt/" target="_blank">October 1991 preview version of Windows NT</a>, and after messing with the tools and building f2c &amp; dungeon (among some other stuff) one that that stuck out to me is that the object files had to be converted for NT.</p>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="642" height="316" src="https://virtuallyfun.com/wp-content/uploads/2021/05/WindowsNT-3.1-October-1991-preview-simple-build.png" alt="" class="wp-image-10980" srcset="https://virtuallyfun.com/wp-content/uploads/2021/05/WindowsNT-3.1-October-1991-preview-simple-build.png 642w, https://virtuallyfun.com/wp-content/uploads/2021/05/WindowsNT-3.1-October-1991-preview-simple-build-300x148.png 300w, https://virtuallyfun.com/wp-content/uploads/2021/05/WindowsNT-3.1-October-1991-preview-simple-build-500x246.png 500w" sizes="auto, (max-width: 642px) 100vw, 642px" /><figcaption>cvtomf!</figcaption></figure>



<p class="wp-block-paragraph">The interesting thing is of course that it doesn&#8217;t support the cl386 direct compile and link (hence CL).  Instead you have to compile, convert and then link.  A fun thing about the October 1991 version is that there is a cl386 cross compiler for OS/2.  So while looking around for OMF linkers (and assemblers that either understand GAS but output OMF, or some translator) I ran across this, and well yeah, it turns out that the OS/2 tool chain is the toolchain.  I guess it makes sense in that the NT team was using OS/2 to build NT, but objects and exe&#8217;s were not solidified.</p>



<p class="wp-block-paragraph">I think 6.00.080 was the last version of Microsoft C 386 for OS/2.  I need to start collecting more of the SDK/DDK&#8217;s of the mixed era, I think the LX/OMF stuff was a bit more widespread hiding in plain sight.</p>



<p class="wp-block-paragraph">Anyways, interesting?! sure. useful?  Maybe 30 years ago.  Although I&#8217;d probably say just use Watcom C/C++ instead of Microsoft C 6.00</p>
]]></content:encoded>
					
					<wfw:commentRss>https://virtuallyfun.com/2021/05/08/interesting-maybe-october-1991-nt-sdk-uses-the-os-2-toolchain/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>NT RISC Apps</title>
		<link>https://virtuallyfun.com/2019/04/27/nt-risc-apps/</link>
					<comments>https://virtuallyfun.com/2019/04/27/nt-risc-apps/#comments</comments>
		
		<dc:creator><![CDATA[tenox]]></dc:creator>
		<pubDate>Sat, 27 Apr 2019 07:39:44 +0000</pubDate>
				<category><![CDATA[DEC Alpha]]></category>
		<category><![CDATA[Digital Research]]></category>
		<category><![CDATA[Digitial]]></category>
		<category><![CDATA[guest post]]></category>
		<category><![CDATA[microsoft]]></category>
		<category><![CDATA[microsoft windows]]></category>
		<category><![CDATA[MIPS]]></category>
		<category><![CDATA[powerpc]]></category>
		<category><![CDATA[Win32]]></category>
		<category><![CDATA[Windows NT 3.1]]></category>
		<category><![CDATA[Windows NT 3.5]]></category>
		<category><![CDATA[Windows NT 3.51]]></category>
		<category><![CDATA[Windows NT 4.0]]></category>
		<guid isPermaLink="false">https://virtuallyfun.com/wordpress/?p=9423</guid>

					<description><![CDATA[(This is a guest post by Antoni Sawicki aka Tenox) Apps for Windows NT RISC&#8230; Alpha AXP, MIPS and PowerPC. Happy downloading.]]></description>
										<content:encoded><![CDATA[
<p class="wp-block-paragraph"><em>(This is a guest post by Antoni Sawicki aka Tenox)</em></p>



<p class="wp-block-paragraph">Apps for <a href="http://tenox.pdp-11.ru/os/winnt_xp/Apps/" data-type="URL" data-id="http://tenox.pdp-11.ru/os/winnt_xp/Apps/">Windows NT RISC&#8230; Alpha AXP, MIPS and PowerPC</a>. Happy downloading.</p>



<p class="wp-block-paragraph"></p>
]]></content:encoded>
					
					<wfw:commentRss>https://virtuallyfun.com/2019/04/27/nt-risc-apps/feed/</wfw:commentRss>
			<slash:comments>16</slash:comments>
		
		
			</item>
		<item>
		<title>MSDN from October 1994</title>
		<link>https://virtuallyfun.com/2018/08/20/msdn-from-october-1994/</link>
					<comments>https://virtuallyfun.com/2018/08/20/msdn-from-october-1994/#comments</comments>
		
		<dc:creator><![CDATA[neozeed]]></dc:creator>
		<pubDate>Mon, 20 Aug 2018 12:56:39 +0000</pubDate>
				<category><![CDATA[microsoft]]></category>
		<category><![CDATA[microsoft windows]]></category>
		<category><![CDATA[MS-DOS]]></category>
		<category><![CDATA[Win16]]></category>
		<category><![CDATA[Win32]]></category>
		<category><![CDATA[Windows 3.1]]></category>
		<category><![CDATA[Windows NT 3.1]]></category>
		<guid isPermaLink="false">https://virtuallyfun.com/wordpress/?p=8745</guid>

					<description><![CDATA[I picked this 20 disc set recently and ugh the cringe is just&#8230; insane.Â  And yes, that is Bill Nye&#8230; &#160; STUDS from Microsoft .(Video in MPEG-1/Audio MPEG-2 care ofÂ JSMpeg). I had this ages ago, although I couldn't remember if &#8230; <a href="https://virtuallyfun.com/2018/08/20/msdn-from-october-1994/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
										<content:encoded><![CDATA[
<p class="wp-block-paragraph">I picked this 20 disc set recently and ugh the cringe is just&#8230; insane.Â  And yes, <a href="https://blogs.msdn.microsoft.com/oldnewthing/20060214-13/?p=32293/">that is Bill Nye</a>&#8230;</p>



<div class="jsmpeg full-width" data-url="/videos/studs.ts">&nbsp;</div>
<script type="text/javascript" language="javascript">
if(!window.scriptHasRun) { window.scriptHasRun = true; document.write('<script type="text/javascript" language="javascript" src="/videos/jsmpeg.min.js"><\/script>')}
</script>



<p class="wp-block-paragraph" style="font-size:12px"><em>STUDS from <em>Microsoft </em>.</em><br/>(Video in MPEG-1/Audio MPEG-2 care ofÂ <a href="https://jsmpeg.com/">JSMpeg</a>).</p>



<p class="wp-block-paragraph" style="font-size:12px"></p>



<figure class="wp-block-image"><img loading="lazy" decoding="async" width="1426" height="705" src="https://virtuallyfun.com/wp-content/uploads/2018/08/MSDN-SDK-DDK-and-Operating-Systems-October-1994-Insert-Cover-_reduced.jpg" alt="" class="wp-image-8746" srcset="https://virtuallyfun.com/wp-content/uploads/2018/08/MSDN-SDK-DDK-and-Operating-Systems-October-1994-Insert-Cover-_reduced.jpg 1426w, https://virtuallyfun.com/wp-content/uploads/2018/08/MSDN-SDK-DDK-and-Operating-Systems-October-1994-Insert-Cover-_reduced-300x148.jpg 300w, https://virtuallyfun.com/wp-content/uploads/2018/08/MSDN-SDK-DDK-and-Operating-Systems-October-1994-Insert-Cover-_reduced-768x380.jpg 768w, https://virtuallyfun.com/wp-content/uploads/2018/08/MSDN-SDK-DDK-and-Operating-Systems-October-1994-Insert-Cover-_reduced-1024x506.jpg 1024w, https://virtuallyfun.com/wp-content/uploads/2018/08/MSDN-SDK-DDK-and-Operating-Systems-October-1994-Insert-Cover-_reduced-1200x593.jpg 1200w" sizes="auto, (max-width: 1426px) 100vw, 1426px" /></figure>



<p class="wp-block-paragraph">I had this ages ago, although I couldn't remember if the NT 3.5 SDK/DDK had shown up at this point, but it's only the <em>Japanese</em> version in this set.Â  Since I'm having such a PITA in tracking down a 3.5 set, and I'm not sitting on this, I may as well archive it.</p>



<figure class="wp-block-image"><img loading="lazy" decoding="async" width="2912" height="2912" src="https://virtuallyfun.com/wp-content/uploads/2018/08/MSDN-SDK-DDK-and-Operating-Systems-October-1994-Disc-1-of-20.jpg" alt="" class="wp-image-8748" srcset="https://virtuallyfun.com/wp-content/uploads/2018/08/MSDN-SDK-DDK-and-Operating-Systems-October-1994-Disc-1-of-20.jpg 2912w, https://virtuallyfun.com/wp-content/uploads/2018/08/MSDN-SDK-DDK-and-Operating-Systems-October-1994-Disc-1-of-20-150x150.jpg 150w, https://virtuallyfun.com/wp-content/uploads/2018/08/MSDN-SDK-DDK-and-Operating-Systems-October-1994-Disc-1-of-20-300x300.jpg 300w, https://virtuallyfun.com/wp-content/uploads/2018/08/MSDN-SDK-DDK-and-Operating-Systems-October-1994-Disc-1-of-20-768x768.jpg 768w, https://virtuallyfun.com/wp-content/uploads/2018/08/MSDN-SDK-DDK-and-Operating-Systems-October-1994-Disc-1-of-20-1024x1024.jpg 1024w, https://virtuallyfun.com/wp-content/uploads/2018/08/MSDN-SDK-DDK-and-Operating-Systems-October-1994-Disc-1-of-20-1200x1200.jpg 1200w" sizes="auto, (max-width: 2912px) 100vw, 2912px" /><figcaption>Yes, I had to rip 20 of these!</figcaption></figure>



<p class="wp-block-paragraph">So you too can find the early Video for Windows, and all kinds of other things from the mid '90's on <a href="https://archive.org/details/MSDNOctober1994">archive.org</a>.</p>



<p class="wp-block-paragraph">Or Wallpapers like this 'puppy' from the Japanese version of Windows 3.1</p>



<figure class="wp-block-image"><img loading="lazy" decoding="async" width="640" height="480" src="https://virtuallyfun.com/wp-content/uploads/2018/08/PUPPY.jpg" alt="" class="wp-image-8754" srcset="https://virtuallyfun.com/wp-content/uploads/2018/08/PUPPY.jpg 640w, https://virtuallyfun.com/wp-content/uploads/2018/08/PUPPY-300x225.jpg 300w" sizes="auto, (max-width: 640px) 100vw, 640px" /></figure>



<p class="wp-block-paragraph"><a href="https://archive.org/details/MSDNOctober1994">https://archive.org/details/MSDNOctober1994</a></p>
]]></content:encoded>
					
					<wfw:commentRss>https://virtuallyfun.com/2018/08/20/msdn-from-october-1994/feed/</wfw:commentRss>
			<slash:comments>20</slash:comments>
		
		
			</item>
	</channel>
</rss>
