File Reading AH=3Fh, int 21h under DPMI not working (Developers)
> 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:
- File Reading AH=3Fh, int 21h under DPMI not working - x86Novice, 17.03.2013, 01:14 ![Open in board view [Board]](img/board_d.gif) ![Open in mix view [Mix]](img/mix_d.gif) - File Reading AH=3Fh, int 21h under DPMI not working - Japheth, 17.03.2013, 02:45
- File Reading AH=$3F, INT $21 under DPMI | True DPMI - DOS386, 27.03.2013, 09:01
 
 Board view
Board view Mix view
Mix view
