Mail Archives: djgpp/2001/06/30/00:47:43
> As for cwsdpmi, prior to my original post I attempted mapping A000:0000
> through the following code (My code actually checks return values, but I
> figured it was best to keep the post shorter):
> __dpmi_meminfo info;
> info.address = 0;
> info.size = (320 * 200);
> __dpmi_allocate_linear_memory(&info);
> __dpmi_map_conventional_memory_in_memory_block(&info, 0xA0000);
>
> The first call failed with error code 1284 (504h). I looked in the DPMI spec
> for function ax=504h and this is not listed as an error code. The DPMI
> server doesn't set an error code, but it sets the carry flag indicating an
> error. I made absolutely sure of this by attempting the same call using
> int386.
> I don't see what I'm doing wrong, if this is supposed to work?
First, don't use the allocate_linear_memory call. It's not supported. I
would suggest malloc'ing a buffer (add an extra 4095 bytes), align it to
be 4K aligned with a mask, add __djgpp_base_address to correct for the
selector base. Then pass this address and truncated size to the
map conventional memory call. I don't have an example handy.
- Raw text -