Conversation

Jarkko Sakkinen

Edited 2 months ago

#holiday activities (last week ongoing).

I learned how to compile DOS COM executables with the latest GCC. It can be done with a trivial LD script, i.e. dump to 0x100. It has a memory topology of single 16-bit code and data segment.

I also learned that event with ELF toolchain “-nostdlib” is still required because crt0.o is not compatible with MS-DOS.

I also implemented couple of features for this “not for profit MS-DOS framework”:

  1. At launch visit in the protected mode and load GDT with code segment according to real-mode, limit for data segment set to 4GB, and return back to the real mode. CPU will just use the latest cached descriptors. This means that BIOS calls continue to work but data can be accessed with the full 32-bit address space, because x86 has opcode prefixes in real mode for 32-bit registers.
  2. Setup 320x240 256 color planar mode based on tweaking various VGA registers (invented by Michael Abrash originally). It has square pixels and can address multiple, and can page flip by setting the new address to CRT index port.

Not sure what I’m going to do with this next but no rush with MZ EXE (I have idea how approach that w/o sacrificing modern tools) because 64 kB is enough for some time, and I have no data limit ;-)

#x86 #dos #assembly #intel #86box #gcc

1
0
1
I probably do next a texture mapper for triangles (not a goal just next thing in mind).

I have my 86box setup as Pentium-166 MMX so to take advantage of that I'm also going to do a texture mapper for triangles, which uses texture organized into 8x8 tiles for the sake of efficient L1 usage, and order opcodes in a way that the filler keeps both of the two pipelines busy. Can be extended to perspective correction later on without huge sacrifice in perf as FPU (MMX) can run in parallel with ALUs.

From classic Intel CPU's Pentium is my favorite because it already has a bit of modern parallel and pipeline alike stuff but you can still cope it in your head easily ;-)
0
0
0