Hi Guys,
I've modified fasm's dos interface so that it can be run on VCPI environment.
This is tested on both QEMM and EMM386 and it works fine to me. Since there's
about 300 lines of code to kick fasm to ring-0 pm so it run faster than wdosx and doesnt cause memory leak from EMS pool like wdosx (bug?)

Happy coding
Posted on 2003-04-08 14:26:52 by quiveror
how many run fasm under raw and vcpi? genuine question out of curiosity, not mocking.

and it possible to feel any speed increase from ring0 vs. ring3, even on old hardware? (old defines as "around 200 mhz").
Posted on 2003-04-08 15:11:07 by f0dder
Nice work, and even before I have released the guide to fasm's interface... :alright:
About the speed: on the older machines the fastest version is the unREAL one (this is the fully 32-bit real mode, while FRM - which fasm uses normally - only enables 32-bit addresing), but I haven't made this version official because I'm still not sure if it runs correctly on all machines. If anyone wants to try it, the needed interface files are in the attachment.
Posted on 2003-04-08 16:05:01 by Tomasz Grysztar
but is it noticeable, privalov? and by how much? how low (machine-spec wise) do you have to go before you can tell a difference between ring0 and ring3 (both running under dos)?
Posted on 2003-04-08 16:10:31 by f0dder
Well, I haven't tested the difference between ring0 and ring3, but on old machines real mode is noticeable faster than protected mode when executing 16-bit code, altough is a bit slower when executing 32-bit code - because of 66h and 67h prefixes. unREAL mode executes pure 32-bit code (without the slowing-down prefixes) in the real mode environment and therefore is the fastest one. Probably ring0 without paging will have the speed similar to real mode and ring3 with paging will be noticeably slower; but it all applies only to old machines (386-486, early Pentiums), on the new ones there's no slow-down because of protected mode mechanism (but there's still slow-down because of prefixes).
In my tests on Pentium 66 machine unREAL version was about 1.5 times faster than FRM version. I've heard that on 386 this factor is even better.
Posted on 2003-04-08 16:16:08 by Tomasz Grysztar
0x66 and 0x67 are evil imo :) - I always though flat+unreal+voodoo+(etc) referred to the same mode, though (that is, 16bit mode with extensions allowing 32bit register access etc).

hm, pure 32bit code in real-mode environment... this sounds somewhat interesting!

What about ring3 w/o paging compared to ring0 w/o paging? I don't think the ring difference will make a noticeable difference, even on old hardware? (I suspected paging might, but only on "quite old" hardware).

This stuff might not be of immediate use to me, but interesting it is nonetheless. And if I start messing with some of the abandoned 486 machines here, it might even come in useful :)

Btw, the "voodoo modes" are somewhat quirky sometimes. I don't think there's any hw-specific problems (perhaps with very queer non-intel CPUs, though I doubt it) - main problems are with weird drivers etc. But then you have the choice of raw pm, vcpi, dpmi, whatever.
Posted on 2003-04-08 16:31:41 by f0dder