At 08:41 PM 12/11/2011, David Griffith wrote:
>Would someone take a look at this test code
>and give me some advice?  An unsigned long is four bytes under both Linux
>and 16-bit DOS.  Why then do my unsigned longs get chopped off when
>running under DOS?

It seems that at least the Borland compiler uses only the (last) 16 
bit of the defines, and "UMem" and "CMem" have both "em" as the last 
two bytes, while all others are different in those two. Hence the 
same 16 bit integer output.

>  Changing to an unsigned long long doesn't do any good.

That's not surprising, as the "long long" data type exists only since 
C99, which came out years after the latest true DOS compiler

>How can I get this code to do the Right Thing?

I have been out all day and just came back home, don't feel like 
spending hours on the computer tonight anymore. If work is slow, I 
will have some time to look into this.

Btw, I could quickly reproduce your problem with the latest version 
of Borland C++ 3.11, not sure which version you're using...

Ralf 


------------------------------------------------------------------------------
Learn Windows Azure Live!  Tuesday, Dec 13, 2011
Microsoft is holding a special Learn Windows Azure training event for 
developers. It will provide a great way to learn Windows Azure and what it 
provides. You can attend the event by watching it streamed LIVE online.  
Learn more at http://p.sf.net/sfu/ms-windowsazure
_______________________________________________
Freedos-user mailing list
Freedos-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freedos-user

Reply via email to