Back to home page

DOS ain't dead

Forum index page

Log in | Register

Back to the forum
Board view  Mix view

File Reading AH=3Fh, int 21h under DPMI not working (Developers)

posted by Japheth Homepage, Germany (South), 17.03.2013, 02:45

> Hello Everyone,
> mov AH, 3Fh ;Read from file
> mov BX, word [DS:FileHandle] ;File successfully Opened prior to this
> mov ECX, 1000h ;Read 4096 Bytes from File
> mov EDX, 300000h ;Buffer to store 1000h bytes to.
> int 21h

>
> I thought HDPMI32 would somehow intercept int 21h/AH=3F in protected mode

Yes, it does. But the address in DS:EDX must point to a valid buffer. "Valid" in this context means: either an address in the first MB ( conventional memory ) or the address of a - committed - memory block allocated with one of the DPMI memory functions. Address 300000h does not actually look like belonging to this set.

---
MS-DOS forever!

 

Complete thread:

Back to the forum
Board view  Mix view
22762 Postings in 2122 Threads, 402 registered users (0 online)
DOS ain't dead | Admin contact
RSS Feed
powered by my little forum