× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.


  • Subject: Re: Retrieving JPG and GIF file data in an AS/400 program
  • From: John Hall <jhall@xxxxxxxxxxx>
  • Date: Thu, 31 Aug 2000 17:28:39 -0400



Bob Crothers wrote:
> 
> Rob,
> 
> Little/Big Endian refers to the byte ordering.
> 
> In the AS/400 world (Aka: Big Endian), integer data is stored with the high
> order bytes first and low order bytes last.  As you would expect.
> 
> In the Intel (and others) world, they use little endian.  Eg: the LOW order
> bytes come first followed by the high order bytes...in reverse order than
> you would expect.
> 
> The result is in the as/400 world, a integer (binary) 16 bit value of 1
> looks like hexadecimal x'0001' in memory/disk.  In the Intel or little
> endian world, the same data would be x'0100'.
> 
> These issues become very important when doing cross platform stuff.
> 
> Why is this done?  Beats me.  Has something to do with the hardware level
> and efficiency.  I just know this is the way the world is.
> 

I believe this can be traced back to the original 8 bit processors for
intel.  The first one I worked on was an 8008.  It was all direct coding
in octal.  As I recall to process two numbers you had to load the low
order bytes first and then use the carry flag on the high order bytes. 
So the little endian order made more sense.  All the intel processors
after that kept the same byte order (Z80, 8080, 8088, 8086, 80286,
etc.).   

John Hall 
Home Sales Co.
+---
| This is the Midrange System Mailing List!
| To submit a new message, send your mail to MIDRANGE-L@midrange.com.
| To subscribe to this list send email to MIDRANGE-L-SUB@midrange.com.
| To unsubscribe from this list send email to MIDRANGE-L-UNSUB@midrange.com.
| Questions should be directed to the list owner/operator: david@midrange.com
+---

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.