Hi friends, i have a doubt, in most of the 16 bit compiler like MSVC1.5,

all the far pointers are 32 bit address but they are converted to 20 bit

address when accessing data and writing data, how do i tell my compiler

to use the 32 bit address as a flat address and not as (base:segment). i

have a program in which i would like to hardcode the address greater than

1MB, after enabling A20, and ask the compiler to use all the pointers

that i hardcode the address above 1MB to access directly with out

considering it as base:offset.

>>how do i tell my compiler to use the 32 bit address as a flat address and not as (base:segment).

You don't

>>have a program in which i would like to hardcode the address greater than 1MB, after enabling A20, and ask the compiler to use all the pointers that i hardcode the address above 1MB to access directly with out considering it as base:offset.

You can't do that directly either. But you are in luck because you can use an EMS driver if you are running true MS-DOS Version 6.X or earlier. Otherwise if you are using Windows XP you might consider using the XP Ramdisk

Another option if you are using Windows 2000 or newer is to upgrade your program to use modern 32-bit compiler then your program will not have the memory restrictions that VC1.52C has. Nice compiler -- I used it for several years. But its an old ancient fossel that doesn't work well on modern computers.

Thanks for the reply Ancient Dragon

but the thing is, the program is running in a dos environment and need to build the file for 386 machine type.. and i have dos 622 running in the machine.. and i do use the MSVC1.5 which is the known last 16 bit compiler.. do i have any option in MSVC for the same..

or else, which other compiler do i need to use if i still want to be in DOS and use every code of my own instead of using XMS.

the running environment do not have any 3rd party application other than my own application

http://www.delorie.com/djgpp/
This will get you a nice flat address space, and still be able to access DOS.

The next bit depends on how portable your code actually is as to how much work it would take to compile with a new compiler.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.