delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/03/17/10:45:39

From: Yoav Shadmi <yoav AT nettaxi DOT com>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: order of bytes written to files...
Date: Tue, 17 Mar 1998 14:41:08 +0200
Organization: NetVision LTD.
Lines: 25
Message-ID: <350E6F64.2ECC@nettaxi.com>
References: <350EC38F DOT BD6 AT sap-ag DOT de>
NNTP-Posting-Host: ts016p13.pop9a.netvision.net.il
Mime-Version: 1.0
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

Matthias Ho Chui Shiong wrote:
> 
> Hi, i am matthias. I have a problem.
> 
>    when i write the long value 49478 to a binary file using borland as
> the compiler, the hexa
>    content of the file turn out to be 46 C1 00 00 which is out I want.
> 
>    However when I compile the same program under RHIDE with only
> compiler option -m486, the
>    result written to the binary file is 00 00 46 C1.
> 
>    Can someone one plse advise me on this.
> 
>    Thank you very much.

If I'm not mistaken the COFF binaries (produced by DjGPP) have
big-endian
byte ordering (i.e. the most significant byte/word comes first) in them,
while 
most x86 binaries (Like those produced by Borland C) use the
little-endian
ordering.

Yoav

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019