To: djgpp AT delorie DOT com Subject: Re: dos data segment Message-ID: <19961221.171924.8327.1.chambersb@juno.com> References: From: chambersb AT juno DOT com (Benjamin D Chambers) Date: Fri, 20 Dec 1996 20:15:45 EST On Thu, 19 Dec 1996 18:34:12 -0800 Tudor writes: >mwallace AT skyler DOT wiltel DOT com wrote: >> >> I have read the FAQ and I still don't completely >> understand what the DOS datasegment (_dos_ds) is. Can >> someone explain it to me in a different way? Thanks. >> >> Mike >I've got no ideea either,but: >An exe file should have (in dos,anyway) a code segment where the >actual >code is and a data segment where data is kept. >BTW:is "data" plural or singular?according to the dictionary data is >plural. >So wadda ya say: >Tha DATA IS in a file or Tha DATA ARE in a file?? You're supposed to say the data are, but nobody ever does :) I believe the _dos_ds segment points to the lower meg of memory. This is due to a rather sucky bug on the Intel chips known as Real (pain in the arss :) Mode. In Real Mode, in addition to having segments and all that, you could only access the first megabyte of memory. To access above that, you had to use EMS or XMS. Anyways, in Protected Mode, you don't worry about any of that - unless you need to access data in the lower meg. To do this, use _dos_ds. Not a very good description, but I'm a little short on time right now, and you can figure everything else out from the FAQ and Info pages. ...Chambers