Hacker News new | ask | show | jobs
by monocasa 1900 days ago
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.

1 comments

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