Totally unfair comparison of Microsoft C

Because I hate myself, I tried to get the Microsoft OS/2 Beta 2 SDK’s C compiler building simple stuff for text mode NT. Because, why not?!

Since the object files won’t link, we have to go in with assembly. And that of course doesn’t directly assemble, but it just needs a little hand holding:

Microsoft (R) Program Maintenance Utility   Version 1.40
Copyright (c) Microsoft Corp 1988-93. All rights reserved.

        cl386 /Ih /Ox /Zi /c /Fadhyrst.a dhyrst.c
Microsoft (R) Microsoft 386 C Compiler. Version 1.00.075
Copyright (c) Microsoft Corp 1984-1989. All rights reserved.

dhyrst.c
        wsl sed -e 's/FLAT://g' dhyrst.a > dhyrst.a1
        wsl sed -e "s/DQ\t[0-9a-f]*r/&XMMMMMMX/g" dhyrst.a1  | wsl sed -e "s/rXMMMMMMX/H/g" > dhyrst.asm
        ml /c dhyrst.asm
Microsoft (R) Macro Assembler Version 6.11
Copyright (C) Microsoft Corp 1981-1993.  All rights reserved.

 Assembling: dhyrst.asm
        del dhyrst.a dhyrst.a1 dhyrst.asm
        link -debug:full -out:dhyrst.exe dhyrst.obj libc.lib
Microsoft (R) 32-Bit Executable Linker Version 1.00
Copyright (C) Microsoft Corp 1992-93. All rights reserved.

I use sed to remove the FLAT: directives which makes everything upset. Also there is some weird confusion on how to pad float constants and encode them.

CONST   SEGMENT  DWORD USE32 PUBLIC 'CONST'
$T20001         DQ      0040f51800r    ;        86400.00000000000
CONST      ENDS

MASM 6.11 is very update with this. I just padded it with more zeros, but it just hung. I suspect DQ isn’t the right size? I’m not 386 MASM junkie. I’m at least getting the assembler to shut-up but it doesn’t work right. I’ll have to look more into it.

Xenix 386 also includes an earlier version of Microsoft C / 386, and it formats the float like this:

CONST   SEGMENT  DWORD USE32 PUBLIC 'CONST'
$T20000         DQ      0040f51800H    ;        86400.00000000000
CONST      ENDS

So I had thought maybe if I replace the ‘r’ with a ‘H’ that might be enough? The only annoying thing about the Xenix compiler is that it was K&R so I spent a few minutes porting phoon to K&R, dumped the assembly and came up with this sed string to find the pattern, mark it, and replace it (Im not that good at this stuff)

wsl sed -e "s/DQ\t[0-9a-f]r/&XMMMMMMX/g" $.a1 \
| wsl sed -e "s/rXMMMMMMX/H/g" > $*.asm

While it compiles with no issues, and runs, it just hangs. I tried the transplanted Xenix assembly and it just hangs as well. Clearly there is something to do with how to use floats.

I then looked at whetstone, and after building it noticed this is the output compiling with Visual C++ 8.0

      0       0       0  1.0000e+000 -1.0000e+000 -1.0000e+000 -1.0000e+000
  12000   14000   12000 -1.3190e-001 -1.8218e-001 -4.3145e-001 -4.8173e-001
  14000   12000   12000  2.2103e-002 -2.7271e-002 -3.7914e-002 -8.7290e-002
 345000       1       1  1.0000e+000 -1.0000e+000 -1.0000e+000 -1.0000e+000
 210000       1       2  6.0000e+000  6.0000e+000 -3.7914e-002 -8.7290e-002
  32000       1       2  5.0000e-001  5.0000e-001  5.0000e-001  5.0000e-001
 899000       1       2  1.0000e+000  1.0000e+000  9.9994e-001  9.9994e-001
 616000       1       2  3.0000e+000  2.0000e+000  3.0000e+000 -8.7290e-002
      0       2       3  1.0000e+000 -1.0000e+000 -1.0000e+000 -1.0000e+000
  93000       2       3  7.5000e-001  7.5000e-001  7.5000e-001  7.5000e-001

However this is the output from C/386:

      0       0       0  5.2998e-315  1.5910e-314  1.5910e-314  1.5910e-314
  12000   14000   12000  0.0000e+000  0.0000e+000  0.0000e+000  0.0000e+000
  14000   12000   12000  0.0000e+000  0.0000e+000  0.0000e+000  0.0000e+000
 345000       1       1  5.2998e-315  1.5910e-314  1.5910e-314  1.5910e-314
 210000       1       2  6.0000e+000  6.0000e+000  0.0000e+000  0.0000e+000
  32000       1       2  5.2946e-315  5.2946e-315  5.2946e-315  5.2946e-315
 899000       1       2  5.2998e-315  5.2998e-315  0.0000e+000  0.0000e+000
 616000       1       2  5.3076e-315  5.3050e-315  5.3076e-315  0.0000e+000
      0       2       3  5.2998e-315  1.5910e-314  1.5910e-314  1.5910e-314
  93000       2       3  5.2972e-315  5.2972e-315  5.2972e-315  5.2972e-315

Great they look nothing alike. So something it totally broken. I guess the real question is, does it even work on OS/2?

Since I should post the NMAKE Makefile so I can remember how it can do custom steps so I can edit the intermediary files. Isn’t C fun?!

INC = /Ih
OPT = /Ox
DEBUG = /Zi
CC = cl386

OBJ = dhyrst.obj

.c.obj:
	$(CC) $(INC) $(OPT) $(DEBUG) /c /Fa$*.a $*.c
	wsl sed -e 's/FLAT://g' $*.a > $*.a1
	wsl sed -e "s/DQ\t[0-9a-f]*r/&XMMMMMMX/g" $*.a1 \
	| wsl sed -e "s/rXMMMMMMX/H/g" > $*.asm
	ml /c $*.asm
	del $*.a $*.a1 $*.asm

dhyrst.exe: $(OBJ)
        link -debug:full -out:dhyrst.exe $(OBJ) libc.lib

clean:
        del $(OBJ)
        del dhyrst.exe
        del *.asm *.a *.a1

As you can see, I’m using /Ox or maximum speed! So how does it compare?

Dhrystone(1.1) time for 180000000 passes = 20
This machine benchmarks at 9000000 dhrystones/second

And for the heck of it, how does Visual C++ 1.0’s performance compare?

Dhrystone(1.1) time for 180000000 passes = 7
This machine benchmarks at 25714285 dhrystones/second

That’s right the 1989 compiler is 35% the speed of the 1993 compiler. wow. Also it turns out that MASM 6.11 actually can (mostly) assemble the output of this ancient compiler. It’s nice when something kind of work. I can also add that the Infocom ’87 interpreter works as well.

YAY!

It’s really awkward when your mistakes are public

Blessed is the RS232

Blessed is the RS232

On the way back from a day trip with my muse I came across this interesting thing on all the sign boards in Waverly. Not sure if it’s a firmware update that went rogue, or if someone is messing with them, but for the most part all the signs would alternate between the two. I guess if I was running the rails I too would have them set on a serial MUX and keep that crap off a network to make the bar higher for the haxor kids.

But all the same, if someone goofed up, and zapped all the boards, they better set their serial lines correctly to get ahold of them. And maybe update from V14.5, I mean 2017 is so old!

Expect more DEC Alpha madness coming in. And as always, I want to thank my Patreon‘s for making all of this crazyness possible!

#include <names.h>
Brian Ledbetter
Joakim L. Gilje
Bamdad
Andy Wallis
Endir
Tink

Web Rendering Proxy v4.6 released

(this is a guest post by Antoni Sawicki aka Tenox)

Pleased to announce WRP version 4.6! After almost two years of no updates due to dependency issues I finally resolved everything. More frequent work should resume now.

The main improvement visible to users is the new GIF encoding. I have been struggling with poor GIF performance for quite a while. This was mostly manifested on lower end machines running WRP such as Raspberry PI or these micro instances in the cloud.

Thanks to invaluable work of Hill Ma we now have blazing fast GIFs. Probably order of 100x improvements! This comes at a cost of quality, especially of color palette and dithering. However worse quality of imagery has a surprise improvement of font/text quality which is what a lot of people wanted.

WRP 4.6 with default 216 color GIF

Note that by default WRP uses GIF with 216 “web safe” colors. We choose this not so much for number of colors but rather activation of the super fast GIF encoding.

WRP 4.6 in 256 color mode GIF

When switching to 256 color mode the image look much better, however it takes around 25x longer to encode (7ms vs 170ms).

When using PNG this is of course not a problem.

0 height mode, which renders tall images of full page length has also been improved and is now more stable. Be careful when using very old machines with little memory as the images can be pretty big.

I hope that WRP will help you use your vintage computers more 🙂

Please report bugs and issues on github!

Downloads here.

Missing Neko98

Neko on ARM

With the collapse of my vpsland archive, Neko has become lost once more again. Thankfully I had some fragment backups so I have been able to bring Neko back from the grave. again.

First I dumped everything I had over on sourceforge. With a bit more digging I found the old RISC versions as well. I even found the Itanium version, although I lost the ARM version. Im not sure I have an 8gb pi4 anymore, but I’d like to get one when/if prices stop being insane. Anyways I also uploaded the source to github, since it’s more hip and acceptable for zoomers. I do have to say the git mirror command was everything I’d hoped it’d be.

git push --mirror https://github.com/neozeed/neko98.git

It literally was that easy.

I put a binary built with Visual C++ 2010 SP1 over there too. Although if you need Visual C++ 2010 runtimes, I put them on sourceforge.

Also I should add in the settings make sure you click “Always On Top”, otherwise Neko will be hidden to the desktop surface and you won’t see him.

I hope you enjoy!

So there has been a problem

I’ve been on the road for a few months, basically in exile. I’ve downsized my once large online presence to a desktop in an office I’m still obligated to for rent and internet. So my i7 workstation had been up to the task, although it seems I didn’t have the right power settings to turn back on from a power failure.

So now I’m faced with a stale backup as i can’t find my currents. so yeah content has been lost. So i also don’t want to race back to a single point of failure, so once more again I’m going to try a cloud. Microsoft keeps sending me these $200 trial things so i thought I would try it. There is a large learning curve about their networks , and deployments. although there is a bunch of ”shake and bake” deployments to speed things along. As always the key is reading the documents.

I still have a lot of stuff to upload, so for the moment the database is restored but there is a lot of messing around needed for the the old layout.

So appologies for the mess.

Special thanks for Tenox for helping me with all kinds of issues, and support from my muse.

Its always darker before its bright, and its already getting dark in northern Europe.

Much regrets to all my loyal fans

It’s come to that point where I’m basically forced to either step up and do a patreon and beg for money, or go the other way and passively shill for ads.

I’ve gone for plan b.

It’s annoying and yeah I know. It sucks.

This trip has… been a challenge, and I have a stack of unfinished crap I need to push out, but frankly i’ve been too lazy to do it.

Maybe I’ll call it depression as it’s more dressed up and sexy.

Anyways I now have far too much kit where I wanted 3 max, and now I have like far too many. Time to get busy with my Chinese soldering iron, patch up some stuff, and get some of this out of the door.

Anyways yeah, people not using blockers will see the ads.

Also today was frought with additional money stress so yeah.. let’s hope this meets in the middle passively.