Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我在 Big Endian 处理器上的 modula-2 中有这行代码:
Ptr := ADR(My_32_Bits_Integer)
我想知道 Ptr 是否等于最高有效字节的地址(即最小地址)或次要字节(即最大地址)?
32 位数字的地址始终是最先分配的字节的地址。在 Big Endian 系统上,这是 MS 字节,在 Little Endian 上是 LS 字节。
给定 32 位整数 12345678h,那么它将像这样存储:
大端:
Offset Data 0 12 1 34 2 56 3 78
小端:
Offset Data 0 78 1 56 2 34 3 12