Back to home page

DOS ain't dead

Forum index page

Log in | Register

Back to the forum
Board view  Mix view

I made my own DOS implementation (Announce)

posted by samwdpckr, 26.03.2024, 04:36

New version. No new features this time, and no significant bugfixes either. In the filesystem mounter there was a bug that affected only builds with 64-bit LBA support when the BIOS supported LBA48 or higher. The program left the most significant doubleword of the "starting sector" of a filesystem uninitialized and it caused read errors. The default build of the kernel uses only 32-bit sector indexes anyway.

I did numerous small fixes to make the kernel support 64-bit sector indexing properly, so now it should work with larger than 2 TB hard drives. I cannot test it though.

I did also many micro-optimizations and reordered the arguments of many functions.

I wrote routines that calculate the sector indexes using MMX instructions. I thought that it would make the math with 64-bit integers a lot faster than adding, subtracting and comparing the numbers 16 bits at time in the 8086-compatible general purpose registers. In the end the MMX version turned out to be significantly slower, at least on a 3 GHz Pentium 4. This again shows that using new fancy instruction set extensions does not always make the program run faster, but it can very efficiently ruin compatibility with older hardware. The kernel can be compiled with "-dUSE_MMX" to create a build that uses MMX instructions.

The kernel can also be compiled for different targets than just 8086. I noticed that when it is compiled for i386 or newer CPUs, some programs just stop working. One of those programs is Doom's installer. I don't know why that happens.

The "VER" command of the command prompt now also shows the build target of the kernel.

 

Complete thread:

Back to the forum
Board view  Mix view
22049 Postings in 2034 Threads, 396 registered users, 114 users online (0 registered, 114 guests)
DOS ain't dead | Admin contact
RSS Feed
powered by my little forum