<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
	
	>
<channel>
	<title>
	Comments on: All in the Family	</title>
	<atom:link href="https://virtuallyfun.com/2021/05/16/all-in-the-family/feed/" rel="self" type="application/rss+xml" />
	<link>https://virtuallyfun.com/2021/05/16/all-in-the-family/</link>
	<description>Fun with Virtualization</description>
	<lastBuildDate>Wed, 20 Sep 2023 01:51:59 +0000</lastBuildDate>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=7.0</generator>
	<item>
		<title>
		By: Malcolm		</title>
		<link>https://virtuallyfun.com/2021/05/16/all-in-the-family/comment-page-1/#comment-339002</link>

		<dc:creator><![CDATA[Malcolm]]></dc:creator>
		<pubDate>Wed, 20 Sep 2023 01:51:59 +0000</pubDate>
		<guid isPermaLink="false">https://virtuallyfun.com/wordpress/?p=11019#comment-339002</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://virtuallyfun.com/2021/05/16/all-in-the-family/comment-page-1/#comment-338997&quot;&gt;neozeed&lt;/a&gt;.

I haven&#039;t looked at 2ine yet, but agree that&#039;s another thing to look into.  It&#039;s a bit strange to be looking into OS/2-on-DOS instead of OS/2-on-Win32, which seems more applicable.  Note though since it&#039;s 16 bit code it&#039;d need CPU emulation like winevdm - does 2ine do that?

Without CPU emulation, it&#039;s an interesting question whether the same source code can target DOS, OS/2, and Win32 - obviously it _can_ but the logic needs to limit itself to 64Kb segments which is going to look ugly on Win32.  There&#039;s also another route of using the 32-bit OS/2 API to get a single piece of source code to support Win32, OS/2 and a DOS extender.

I don&#039;t follow the comment about the msft post though - what msft post?  That link should be to my personal blog...]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://virtuallyfun.com/2021/05/16/all-in-the-family/comment-page-1/#comment-338997">neozeed</a>.</p>
<p>I haven&#8217;t looked at 2ine yet, but agree that&#8217;s another thing to look into.  It&#8217;s a bit strange to be looking into OS/2-on-DOS instead of OS/2-on-Win32, which seems more applicable.  Note though since it&#8217;s 16 bit code it&#8217;d need CPU emulation like winevdm &#8211; does 2ine do that?</p>
<p>Without CPU emulation, it&#8217;s an interesting question whether the same source code can target DOS, OS/2, and Win32 &#8211; obviously it _can_ but the logic needs to limit itself to 64Kb segments which is going to look ugly on Win32.  There&#8217;s also another route of using the 32-bit OS/2 API to get a single piece of source code to support Win32, OS/2 and a DOS extender.</p>
<p>I don&#8217;t follow the comment about the msft post though &#8211; what msft post?  That link should be to my personal blog&#8230;</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: neozeed		</title>
		<link>https://virtuallyfun.com/2021/05/16/all-in-the-family/comment-page-1/#comment-338997</link>

		<dc:creator><![CDATA[neozeed]]></dc:creator>
		<pubDate>Tue, 19 Sep 2023 21:56:06 +0000</pubDate>
		<guid isPermaLink="false">https://virtuallyfun.com/wordpress/?p=11019#comment-338997</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://virtuallyfun.com/2021/05/16/all-in-the-family/comment-page-1/#comment-338990&quot;&gt;Malcolm&lt;/a&gt;.

Looks pretty cool!

I had messed with the MSC from the October 1991 NT, and the leaked MASM386 can assemble it, to an OMF that NT LINK386 can use, much like the Xenix 386 GAS.

The other &#039;target&#039; I guess for family api, is &lt;a href=&quot;https://github.com/icculus/2ine&quot; rel=&quot;nofollow ugc&quot;&gt;2ine&lt;/a&gt;? the OS/2 libraries for Linux, which give us the 64bit OS/2 we all know we need.

Also what is the msft post on creating family apps on masm6?]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://virtuallyfun.com/2021/05/16/all-in-the-family/comment-page-1/#comment-338990">Malcolm</a>.</p>
<p>Looks pretty cool!</p>
<p>I had messed with the MSC from the October 1991 NT, and the leaked MASM386 can assemble it, to an OMF that NT LINK386 can use, much like the Xenix 386 GAS.</p>
<p>The other &#8216;target&#8217; I guess for family api, is <a href="https://github.com/icculus/2ine" rel="nofollow ugc">2ine</a>? the OS/2 libraries for Linux, which give us the 64bit OS/2 we all know we need.</p>
<p>Also what is the msft post on creating family apps on masm6?</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Malcolm		</title>
		<link>https://virtuallyfun.com/2021/05/16/all-in-the-family/comment-page-1/#comment-338990</link>

		<dc:creator><![CDATA[Malcolm]]></dc:creator>
		<pubDate>Tue, 19 Sep 2023 19:52:42 +0000</pubDate>
		<guid isPermaLink="false">https://virtuallyfun.com/wordpress/?p=11019#comment-338990</guid>

					<description><![CDATA[I&#039;ve been looking into Family API a bit more, using Visual C++ as a compiler for it.

If you&#039;re interested, first blog post: http://www.malsmith.net/blog/visual-c-os2-family/

Source code: https://github.com/malxau/os2api]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been looking into Family API a bit more, using Visual C++ as a compiler for it.</p>
<p>If you&#8217;re interested, first blog post: <a href="http://www.malsmith.net/blog/visual-c-os2-family/" rel="nofollow ugc">http://www.malsmith.net/blog/visual-c-os2-family/</a></p>
<p>Source code: <a href="https://github.com/malxau/os2api" rel="nofollow ugc">https://github.com/malxau/os2api</a></p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: neozeed		</title>
		<link>https://virtuallyfun.com/2021/05/16/all-in-the-family/comment-page-1/#comment-272245</link>

		<dc:creator><![CDATA[neozeed]]></dc:creator>
		<pubDate>Tue, 18 May 2021 05:55:02 +0000</pubDate>
		<guid isPermaLink="false">https://virtuallyfun.com/wordpress/?p=11019#comment-272245</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://virtuallyfun.com/2021/05/16/all-in-the-family/comment-page-1/#comment-272244&quot;&gt;Malcolm&lt;/a&gt;.

I found my hello world one:

&lt;code&gt;NAME	HELLO	WINDOWCOMPAT
DESCRIPTION &#039;Hello world&#039;
PROTMODE
&lt;/code&gt;

So yeah, so confusing!]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://virtuallyfun.com/2021/05/16/all-in-the-family/comment-page-1/#comment-272244">Malcolm</a>.</p>
<p>I found my hello world one:</p>
<p><code>NAME	HELLO	WINDOWCOMPAT<br />
DESCRIPTION 'Hello world'<br />
PROTMODE<br />
</code></p>
<p>So yeah, so confusing!</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Malcolm		</title>
		<link>https://virtuallyfun.com/2021/05/16/all-in-the-family/comment-page-1/#comment-272244</link>

		<dc:creator><![CDATA[Malcolm]]></dc:creator>
		<pubDate>Tue, 18 May 2021 05:48:28 +0000</pubDate>
		<guid isPermaLink="false">https://virtuallyfun.com/wordpress/?p=11019#comment-272244</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://virtuallyfun.com/2021/05/16/all-in-the-family/comment-page-1/#comment-272236&quot;&gt;neozeed&lt;/a&gt;.

I think it&#039;s just &quot;NAME FOO WINDOWCOMPAT&quot; in a .def file, and point the linker to it.  That sets a single bit in the executable which also modifies a second checksum bit.  It should be possible to just mark executables after linking.

(Also, I know about the two bits because it&#039;s possible to just recompile and diff.  Unlike what happened later, the results really seem reproducible by default.)

Agree about the unified console.  The Win95 one (which has no scrollback since it&#039;s just an emulated VGA device) is unusably annoying now.  That said, I started Yori so I could have tab completion on NT 3.51, and using OS/2 without tab completion is driving me nuts.  OS/2 really tried to have a modern console (at least for OS/2 applications) but the shell needs work.]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://virtuallyfun.com/2021/05/16/all-in-the-family/comment-page-1/#comment-272236">neozeed</a>.</p>
<p>I think it&#8217;s just &#8220;NAME FOO WINDOWCOMPAT&#8221; in a .def file, and point the linker to it.  That sets a single bit in the executable which also modifies a second checksum bit.  It should be possible to just mark executables after linking.</p>
<p>(Also, I know about the two bits because it&#8217;s possible to just recompile and diff.  Unlike what happened later, the results really seem reproducible by default.)</p>
<p>Agree about the unified console.  The Win95 one (which has no scrollback since it&#8217;s just an emulated VGA device) is unusably annoying now.  That said, I started Yori so I could have tab completion on NT 3.51, and using OS/2 without tab completion is driving me nuts.  OS/2 really tried to have a modern console (at least for OS/2 applications) but the shell needs work.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: neozeed		</title>
		<link>https://virtuallyfun.com/2021/05/16/all-in-the-family/comment-page-1/#comment-272236</link>

		<dc:creator><![CDATA[neozeed]]></dc:creator>
		<pubDate>Tue, 18 May 2021 04:55:34 +0000</pubDate>
		<guid isPermaLink="false">https://virtuallyfun.com/wordpress/?p=11019#comment-272236</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://virtuallyfun.com/2021/05/16/all-in-the-family/comment-page-1/#comment-272235&quot;&gt;Fernando&lt;/a&gt;.

oh I have to find the linker def&#039;s to make it window compatible. I have it somewhere when I was messing with Fortran 5.1.  Otherwise it&#039;ll launch a full screen session, say hi, and close in the blink of an eye.

We really take the &#039;unified&#039; console of Windows NT for granted, as it was so fragmented back in the day.]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://virtuallyfun.com/2021/05/16/all-in-the-family/comment-page-1/#comment-272235">Fernando</a>.</p>
<p>oh I have to find the linker def&#8217;s to make it window compatible. I have it somewhere when I was messing with Fortran 5.1.  Otherwise it&#8217;ll launch a full screen session, say hi, and close in the blink of an eye.</p>
<p>We really take the &#8216;unified&#8217; console of Windows NT for granted, as it was so fragmented back in the day.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Fernando		</title>
		<link>https://virtuallyfun.com/2021/05/16/all-in-the-family/comment-page-1/#comment-272235</link>

		<dc:creator><![CDATA[Fernando]]></dc:creator>
		<pubDate>Tue, 18 May 2021 04:53:54 +0000</pubDate>
		<guid isPermaLink="false">https://virtuallyfun.com/wordpress/?p=11019#comment-272235</guid>

					<description><![CDATA[Did you try running the OS/2 program with a double click from the WPS?]]></description>
			<content:encoded><![CDATA[<p>Did you try running the OS/2 program with a double click from the WPS?</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: neozeed		</title>
		<link>https://virtuallyfun.com/2021/05/16/all-in-the-family/comment-page-1/#comment-272150</link>

		<dc:creator><![CDATA[neozeed]]></dc:creator>
		<pubDate>Mon, 17 May 2021 05:42:24 +0000</pubDate>
		<guid isPermaLink="false">https://virtuallyfun.com/wordpress/?p=11019#comment-272150</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://virtuallyfun.com/2021/05/16/all-in-the-family/comment-page-1/#comment-272142&quot;&gt;Malcolm&lt;/a&gt;.

Ive been getting an incredible amount of errors from invalid binaries, malformed binaries, missing symbols t duplicate symbols (__acrtused) and other stuff.

I just re-installed under OS/2 and got it to seemingly work though.  I had it as a strictly OS/2 only setup?

doing steps &lt;a href=&quot;https://virtuallyfun.com/wordpress/wp-content/uploads/2021/05/setup-msc5-os2-only-1.png&quot;&gt;1&lt;/a&gt;/&lt;a href=&quot;https://virtuallyfun.com/wordpress/wp-content/uploads/2021/05/setup-msc5-os2-only-2.png&quot;&gt;2&lt;/a&gt;/&lt;a href=&quot;https://virtuallyfun.com/wordpress/wp-content/uploads/2021/05/setup-msc5-os2-only-3.png&quot;&gt;3&lt;/a&gt; and it &lt;a href=&quot;https://virtuallyfun.com/wordpress/wp-content/uploads/2021/05/finally-built-family-mode-using-msc51.png&quot;&gt;finally runs&lt;/a&gt;!

Thanks so much for that hint of just targeting OS/2.  I manually extracted back the compiler only for realmode, and it&#039;s acting way better now.  I guess Microsoft C 6.00 is way more forging in this aspect.]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://virtuallyfun.com/2021/05/16/all-in-the-family/comment-page-1/#comment-272142">Malcolm</a>.</p>
<p>Ive been getting an incredible amount of errors from invalid binaries, malformed binaries, missing symbols t duplicate symbols (__acrtused) and other stuff.</p>
<p>I just re-installed under OS/2 and got it to seemingly work though.  I had it as a strictly OS/2 only setup?</p>
<p>doing steps <a href="https://virtuallyfun.com/wordpress/wp-content/uploads/2021/05/setup-msc5-os2-only-1.png">1</a>/<a href="https://virtuallyfun.com/wordpress/wp-content/uploads/2021/05/setup-msc5-os2-only-2.png">2</a>/<a href="https://virtuallyfun.com/wordpress/wp-content/uploads/2021/05/setup-msc5-os2-only-3.png">3</a> and it <a href="https://virtuallyfun.com/wordpress/wp-content/uploads/2021/05/finally-built-family-mode-using-msc51.png">finally runs</a>!</p>
<p>Thanks so much for that hint of just targeting OS/2.  I manually extracted back the compiler only for realmode, and it&#8217;s acting way better now.  I guess Microsoft C 6.00 is way more forging in this aspect.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Malcolm		</title>
		<link>https://virtuallyfun.com/2021/05/16/all-in-the-family/comment-page-1/#comment-272142</link>

		<dc:creator><![CDATA[Malcolm]]></dc:creator>
		<pubDate>Mon, 17 May 2021 03:57:26 +0000</pubDate>
		<guid isPermaLink="false">https://virtuallyfun.com/wordpress/?p=11019#comment-272142</guid>

					<description><![CDATA[Can you describe a bit more about what you see with C 5.1?

I&#039;ve had this working successfully although there are plenty of quirks.  If you&#039;re using the DOS toolchain, note there&#039;s two versions of link.exe: a real mode one, and a bound (family mode) one.  Linking an OS/2 application really wants the bound one, or the one provided with the OS (which is marginally newer.)  The real mode one will complain about unresolved externals despite being given doscalls.lib (it doesn&#039;t seem to handle it correctly.)  The function prototypes for things like DosWrite are included in C 5.1 headers though.

Also, by default C 5.1 generates non-windowcompat binaries, so a module definition file is needed to make a useful result.  On OS/2 2.0 and above, using the whole thing from DOS boxen might be easier, because everything works in a window by default.

This is a good resource:
http://www.edm2.com/index.php/Hints_for_writing_simple_programs_for_both_OS/2_and_DOS

Note the part at the bottom - it&#039;s possible to dynamically check which system a binary is executing from with DosGetMachineMode, and it&#039;s possible to add extra OS/2 functions so long as you supply a DOS equivalent.  Bind -n can map a list of extra functions to a generic handler function, which is useful if you use DosGetMachineMode to ensure that the OS/2 function is only invoked on OS/2.

Also, digging around showed a PC Mag article complaining that building a family mode app is often larger than just building a native DOS version and using it as a stub for the OS/2 version - ie., rather than have a single OS/2 binary with a DOS translation layer, just glue two complete binaries together.  For hello world, that seems like the right thing to do.

It&#039;s a real shame that the same e_lfanew field is used to indicate _any_ &quot;new&quot; header.  We could have had MZ applications that contain a DOS version, an NE OS/2 version (or possibly WLO), and a PE version.  Although, it&#039;d also be great to have a single PE version for multiple architectures.  Sigh...]]></description>
			<content:encoded><![CDATA[<p>Can you describe a bit more about what you see with C 5.1?</p>
<p>I&#8217;ve had this working successfully although there are plenty of quirks.  If you&#8217;re using the DOS toolchain, note there&#8217;s two versions of link.exe: a real mode one, and a bound (family mode) one.  Linking an OS/2 application really wants the bound one, or the one provided with the OS (which is marginally newer.)  The real mode one will complain about unresolved externals despite being given doscalls.lib (it doesn&#8217;t seem to handle it correctly.)  The function prototypes for things like DosWrite are included in C 5.1 headers though.</p>
<p>Also, by default C 5.1 generates non-windowcompat binaries, so a module definition file is needed to make a useful result.  On OS/2 2.0 and above, using the whole thing from DOS boxen might be easier, because everything works in a window by default.</p>
<p>This is a good resource:<br />
<a href="http://www.edm2.com/index.php/Hints_for_writing_simple_programs_for_both_OS/2_and_DOS" rel="nofollow ugc">http://www.edm2.com/index.php/Hints_for_writing_simple_programs_for_both_OS/2_and_DOS</a></p>
<p>Note the part at the bottom &#8211; it&#8217;s possible to dynamically check which system a binary is executing from with DosGetMachineMode, and it&#8217;s possible to add extra OS/2 functions so long as you supply a DOS equivalent.  Bind -n can map a list of extra functions to a generic handler function, which is useful if you use DosGetMachineMode to ensure that the OS/2 function is only invoked on OS/2.</p>
<p>Also, digging around showed a PC Mag article complaining that building a family mode app is often larger than just building a native DOS version and using it as a stub for the OS/2 version &#8211; ie., rather than have a single OS/2 binary with a DOS translation layer, just glue two complete binaries together.  For hello world, that seems like the right thing to do.</p>
<p>It&#8217;s a real shame that the same e_lfanew field is used to indicate _any_ &#8220;new&#8221; header.  We could have had MZ applications that contain a DOS version, an NE OS/2 version (or possibly WLO), and a PE version.  Although, it&#8217;d also be great to have a single PE version for multiple architectures.  Sigh&#8230;</p>
]]></content:encoded>
		
			</item>
	</channel>
</rss>
