Back to home page

DOS ain't dead

Forum index page

Log in | Register

Back to the forum
Board view  Mix view

With DPMI into protect mode and back (Developers)

posted by Japheth Homepage, Germany (South), 19.10.2010, 09:58

> I doubt r7 is better in this particular part, but you should definitely
> test against that. It's default on DJ's Zip Picker now anyways (though I'm
> not denying that r5 exists in a ton of places). Also, I know you're busy,
> but if it's really a bug, he should be notified. I'll (weakly) do it if
> you're unwilling.

I tested r7 and didn't note a difference.

However, the cause of the problem is found. Here's the output of DPMI.EXE with CWSDPMI loaded:
-------------------------------------------------
Cpu is in V86-mode
[snipped]
state save protected-mode: 002B:000012A2, real-mode: 0306:12A2
size state save buffer: 0000
raw jump to real-mode: 0068:00000000, protected-mode: 0306:1267
[snipped]
-------------------------------------------------

Size of the state buffer is zero, that is, one doesn't need to call the "state save" routines for raw-mode switches. DEBUGX does, no matter what size the buffer has. This is - or "should be" - ok, according to DPMI docs.

With CWSDPMI, it isn't ok, because the protected-mode address, 002B:12A2, is a 16-bit code segment and contains just a RETF. It has to be a 32-bit RETF, however, so there's a 66h byte missing before the RETF.

---
MS-DOS forever!

 

Complete thread:

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