Hacker News new | ask | show | jobs
by Reason077 1903 days ago
> "So Apple did develop for and ship little endian CPUs way before the iPod."

ARM was always little-endian by default. It has a big-endian mode, too, but now days it's virtually never used.

But did Apple actually use the big endian mode in the Newton, which shipped in 1993? Google hasn't been able to give me a clear answer on this.

1 comments

I was curious too, so I took a quick read through a Newton ROM hex dump. I'm pretty sure it's running in big endian mode.

   00000000  ea 00 06 2c ea 68 00 01 ea 6c ff ef ea 68 00 00
   00000010  ea 67 ff fc ea 67 ff fb ea 67 ff f9 ea 67 ff f7
Those e nybbles you see at the top of each word are pretty standard arm32, meaning "execute always" in it's ubiquitous conditional execution of instructions. Them being in byte 0 rather than byte 3 of each word means that it's stored in big endian order. The rest of the instruction makes sense too as branch offsets in big endian (since this would be the cpu exception vector table).

There for sure could be some weird other piece of information I'm missing (like maybe the rom image is pre swapped for efficient emulation on big endian systems like Mac/PowerPC?), but barring that it really looks like Newton was a big endian system.

I believe you're right. Looking at Makefiles for open source Newton projects, -mbig-endian is passed into GCC:

https://github.com/pguyot/DCL/blob/master/Sample_Code/Toolch...

MACHINEFLAGS := -march=armv3 -mbig-endian