Endianism Considerations (from HP document)
来源:互联网 发布:淘宝流量推广 编辑:程序博客网 时间:2024/05/16 14:49
http://h71000.www7.hp.com/doc/82final/6673/6673pro_008.html
Users who are porting from OpenVMS Alpha or OpenVMS VAX to OpenVMS I64 do not need to be concerned with endianism issues; OpenVMS on all platforms uses little-endian for data storage and manipulation. This chapter is being made available more for reference to allow the reader to be aware of issues, in general, when porting between different hardware architectures where endianisms are different.
Endianism refers to the way data is stored and defines how bytes are addressed in multibyte data types. This is important because if you try to read binary data on a machine that is of a different endianism than the machine that wrote the data, the results will be different. This is an especially significant problem when a database needs to be moved to a different endian architecture.
There are two types of endian machines: big-endian (forward byte ordering or most significant first, [MSF]) and little-endian (reverse byte ordering or least significant first, [LSF]). The mnemonics "big end in" and "little end in" can be useful when discussing endianism. Figure 7-1 and Figure 7-2 compare the two byte-ordering methodologies.
Figure 7-1 Big-Endian Byte Ordering
Figure 7-2 Little-Endian Byte Ordering
The Alpha microprocessor provides a little-endian environment for operating systems such as OpenVMS and Tru64 UNIX, while the PA-RISC microprocessor provides a big-endian environment for the HP-UX operating system.
On a little-endian operating system, such as OpenVMS, the little end, or least-significant byte is stored at the lowest address. This means a hexadecimal like 0x1234 is stored in memory as 0x34 0x12. The same is true for a 4-byte value; for example, 0x12345678 is stored as 0x78 0x56 0x34 0x12. A big-endian operating system does this in reverse fashion, so 0x1234 is stored as 0x12 0x34 in memory.
Consider the number 1025 (2 to the tenth power plus 1) stored in a 4-byte integer. This is represented in memory as follows:
little endian: 00000000 00000000 00000100 00000001b big endian: 00000001 00000100 00000000 00000000b
The Intel Itanium processor family architecture supports both big-endian and little-endian memory addressing. There are no problems reading and exchanging data between OpenVMS Alpha and OpenVMS I64 running on Itanium processors. If there is a need to exchange data between OpenVMS on an Alpha or I64 system and HP-UX on PA-RISC or the Itanium processor family, then byte swapping might be required.
Endianism Considerations
- Endianism Considerations (from HP document)
- Considerations when calling Java from PeopleCode
- Initial Considerations for Migrating from Forefront TMG to Forefront UAG
- tmadmin from hp's docs
- tmadmin from hp's docs
- Portability-Processor Endianism
- 规范模式-------From ABP Document
- 规范模式-------From ABP Document
- Architectural considerations
- NTP from HP doc(1/3)
- NTP from HP doc(2/3)
- NTP from HP doc(3/3)
- Invalid response document returned from XmlRpc server
- make工具及makefile规则 |from document
- make工具及makefile规则 |from document .
- external table sample : from oracle document
- Skill Level from Revit2015Api Official Document.Thanks.
- select document library from certain list
- 你能连续70次摸中500万吗?--七、八亿人里面只存活一两个人的疯狂致命游戏
- 牺牲了周末,终于理解了sip
- Endianism-Porting Linux applications to 64-bit systems
- URL重写
- Portability-Processor Endianism
- Endianism Considerations (from HP document)
- 行く手はどこか?
- 2006年10月22日 星期天
- D_FLOAT,G_FLOAT,IEEE_FLOAT
- 方才真正理解了apache的来历,汗颜。。。。
- 访问者模式(Visitor Pattern)
- Caché数据库简介
- 正则表达式
- asp.net学习备忘10。16