2 ms·
I didn't remember an FS register... it was added on the 386, I wonder what would happen if this was run on an old IBM XT? I realize that something had to go in
by mikewarot 5y ago
I didn't remember an FS register... it was added on the 386, I wonder what would happen if this was run on an old IBM XT?
I realize that something had to go in order to fit it in the size limit, compatibility with 8088 CPUs isn't the worst choice.
[Edit] Sorry if this sounded too negative... I'm astounded that it's even possible to do this in a sector at all.
- adrian_b 5y agoIntel 8086 and 8088 did not have invalid instruction exceptions. The opcodes that were not documented were either redundant, doing exactly the same thing as other documented opcodes, or they crashed the system. Later, in 1982, 80186 and 80286 introduced invalid opcode exceptions, so starting with the IBM PC/AT any program intended for later CPUs should abort with an error message. Most IBM PC/XT were made with Intel 8088, so the behavior of an 80386 program is unpredictable. Some PC/XT clones were made with 80186 or 80188, or, more frequently, with NEC V20 processors. All these had invalid opcode exceptions, so they should behave like a PC/AT.
- jart 5y agoIt's not too negative because to be honest it's something I felt guilty about. It looks we actually have enough room left to fix that, since we're not currently using %bp. We even have room to add the necessary push/pop for %bp to work around a bug in the original IBM PC BIOS implementation. If we make that change, then I've just confirmed with xed -r -isa-set -i sectorlisp.o that's it's pure i8086 and should work. One of us should pull out an old IBM PC and record a video of sectorlisp running on the original hardware. Anyone want to volunteer? I have one but it's difficult for me to use since I only know how to type dvorak.