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, 27.03.2024, 23:29

My previous message did not make much sense. It turns out that MMX does only 32-bit math and many sources from the internet are wrong about this. I replaced the MMX routines with code that uses the 32-bit i386 registers. The new code is also much faster.

I also tried SSE2 instructions, but interestingly they were not much faster than MMX either.

Trying to replace 64-bit comparisons with hand-written routines seems to result in slow code. The reason is probably that the hand-written routines have to always have their return value in a general-purpose register, whereas the comparisons that the compiler generates natively have their "return value" in the flags register. So although comparing two 64-bit numbers in 16-bit registers means having to do four conditional jumps, it is still faster than a hand-written routine. AFAIK the Watcom compiler does not support having a return value of an actual function in the flags register. But replacing 64-bit additions and substractions with hand-written inline routines did speed things up a lot.

Symlinks can now point to device files. Previously they could only point to actual files.

The cache lookup table was previously a far object, but I moved it to the same segment with the kernel, which resulted in a small performance improvement.

 

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