Short answer: Use JonoF's BUILD port! It includes BUILD.EXE for SW.
-------------------------------------------------------------------
Long answer (for posterity):
In my original BUILD.C, I had this at the top of my keyboard handler:
koutp(0x20,0x20);
oldreadch = readch; readch = kinp(0x60);
keytemp = kinp(0x61); koutp(0x61,keytemp|128); koutp(0x61,keytemp&127);
In 1999, after testing Build on NT, I changed it to this:
oldreadch = readch; readch = kinp(0x60);
keytemp = kinp(0x61); koutp(0x61,keytemp|128); koutp(0x61,keytemp&127);
koutp(0x20,0x20);
I was calling koutp(0x20,0x20) at a non-standard place. DOS/Win9X/WINME work fine with it at top. WinNT/Win2K/WinXP do not. Probably, the emulation is calling my old keyboard handler recursively when it gets to the koutp(0x20,0x20), causing it to receive 2-byte scancodes in reverse order.