| www.delorie.com/archives/browse.cgi | search |
| Xref: | news-dnh.mv.net comp.os.msdos.djgpp:1079 |
| Newsgroups: | comp.os.msdos.djgpp |
| Path: | news-dnh.mv.net!mv!news.sprintlink.net!howland.reston.ans.net!ix.netcom.com!netcom.com!mictali |
| From: | mictali AT netcom DOT com (Jere McDevitt) |
| Subject: | Byte Order |
| Organization: | NETCOM On-line Communication Services (408 261-4700 guest) |
| Date: | Thu, 20 Jul 1995 20:55:31 GMT |
| Lines: | 17 |
| Sender: | mictali AT netcom23 DOT netcom DOT com |
| To: | djgpp AT sun DOT soe DOT clarkson DOT edu |
| Dj-Gateway: | from newsgroup comp.os.msdos.djgpp |
This may be covered in the manuals or the FAQ but I can't find it. Any direction as to where to look will be greatly appreciated. Simply put, I have a program that uses a structure with a LONG variable. I set the variable to a value in a DJGPP compiled application and write the structure to a file. When I read the same structure back in using a Dos application (16 bit ) compiled with Borlandc 3.1 (variable sizes match - used short not int) then the byte order of the LONG variable is reversed. What was written out as 0x00000084 comes in as 0x84000000. I saw in the gcc manual something about xm-machine.h, machine.h and define for ?BIG_ENDIAN?, only I can't find out how to make use of this information. Any help would be greatly appreciated Jere (mictali AT netcom DOT com)
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |