Xref: news2.mv.net comp.os.msdos.djgpp:3961 From: rick AT efn DOT org (Rick Bronson) Newsgroups: comp.os.msdos.djgpp Subject: Why does __dpmi_map_device_in_memory_block() always return 0x8025? Date: 15 May 1996 21:26:43 GMT Organization: Invivo Research Inc. Lines: 42 Distribution: world Message-ID: NNTP-Posting-Host: dynip83.efn.org To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Hi, Could someone please help me out here? I always seem to get "invalid linear address" (0x8025) returned on the call to __dpmi_map_device_in_memory_block(). Here's the code: #define PAGE_SIZE 4096 unsigned long addr_pg_align, rem_pg_align, size_pg_align; size_pg_align = 0x1000; meminfo.size = size_pg_align; meminfo.address = 0; /* any address is acceptable */ ret_val = __dpmi_allocate_memory(&meminfo); /* COMMIT is 1 for DPMI 1.0 AX=0501 */ meminfo.size = size_pg_align / PAGE_SIZE; /* I've tried it without " / PAGE_SIZE" in */ ret_val = __dpmi_map_device_in_memory_block (&meminfo, addr_pg_align); /* 508 */ Here I always get -1 returned and __dpmi_error set to 0x8025. Any help greatly appreciated. If anone can point me to any examples using any of the following, that would be greatly appreciated too. __dpmi_physical_address_mapping(); __dpmi_allocate_memory(); __dpmi_map_device_in_memory_block(); __djgpp_map_physical_memory(); Rick _ | | / /__ ..------------------------------------------------------------._______/ (___) | Rick Bronson rick AT efn DOT org Tel 541-465-9008 _o_ | (___) | Invivo Research http://www.efn.org/~rick \|/ |_______ (___) | 745 Foothill Drive "Onde esta dinheiro?" `---' | \_(___) | Eugene, OR 97405-4651 -- Gal Costa Disk | Golf| `------------------------------------------------------------'