Category Archives: Development

Win16 Memory Management

This is a kind of knowledge base article which resulted from attempts to understand exactly how memory management works in 16-bit Windows. It is not exactly undocumented, but it is also not well documented; even before Windows 3.0 appeared, the … Continue reading

Posted in Development, Microsoft, PC history, Windows, x86 | 14 Comments

ICAT and Watcom

Some time ago I embarked on a minor retro development project related to this post. For convenience, I decided to do the development on a Windows host machine and (obviously) test in a VM. For C code compiling, and linking, … Continue reading

Posted in Debugging, Development, IBM, OS/2, Watcom | 18 Comments

Learn Something Old Every Day, Part XX: 8087 Emulation on 8086 Systems

Not too long ago I had a need and an opportunity to re-acquaint myself with the mechanism used for software emulation of the 8087 FPU on 8086/8088 machines. As mentioned elsewhere, the 8086 CPU (1978) had a generic co-processor interface … Continue reading

Posted in 8086/8088, Development, Intel, LSOED, Microsoft, x87 | 20 Comments

Bitfield Pitfalls

Some time ago I ran into a bug that had been dormant for some time. The problem involved expressions where one of the operands is a bit-field. To demonstrate the problem, I will present a reduced example: #include <stdio.h> #include … Continue reading

Posted in C, Development, Standards | 4 Comments

DOS Memory Management

The memory management in DOS is simple, but that simplicity may be deceptive. There are several rather interesting pitfalls that programming documentation often does not mention. DOS 1.x (1981) had no explicit memory management support. It was designed to run … Continue reading

Posted in Development, DOS, Microsoft, PC history | 25 Comments

Cracking DXP and SXD

There are situations where software is available only in the form of a floppy image. This goes especially for historic hardware drivers and patches, which were often distributed only in the form of floppy images. This method was quite popular … Continue reading

Posted in Archiving, Development, Floppy Images | 4 Comments

The OS/2 Display Driver Zoo

I have recently explored (again) the possibility of writing a high-res display driver for virtualized OS/2. But I ran (again) into a dizzying array of possible solutions, each with its own advantages and a good deal of drawbacks. OS/2 display … Continue reading

Posted in Development, Documentation, Graphics, IBM, OS/2 | 32 Comments

Time Trouble

Last Friday I had a moment of panic. While investigating why different run-time libraries might interpret file timestamps differently, I noticed that even Windows doesn’t always agree with itself. When was dos4gw.exe last modified, at 10:14 PM or 9:14 PM? … Continue reading

Posted in Bugs, Development, Microsoft | 20 Comments

Learn Something Old Every Day, Part XIV: read() Return Value May Surprise

Last week I amused myself by porting some source code from Watcom C to Microsoft C. In general that is not difficult, because Watcom C was intended to achieve a high degree of compatibility with Microsoft’s C dialect. Yet one … Continue reading

Posted in C, Development, LSOED | 11 Comments

I Thought I Found a Bug…

So I was working on improving a DOS emulator, when I found that something seemingly trivial wasn’t working right when COMMAND.COM was asked to do the following: echo AB> foo.txtecho CD>> foo.txt Instead of ABCD, foo.txt contained ABBC. I verified … Continue reading

Posted in Bugs, C, Development, Watcom | 26 Comments