3 ms·
Weird? 68000 is hardly weird -- the original Sun machines were 68Ks. The MIPS CPUs were designed to run C from the get go. And the reference in the manual to
by gumby 8y ago
Weird? 68000 is hardly weird -- the original Sun machines were 68Ks. The MIPS CPUs were designed to run C from the get go.
And the reference in the manual to the Unisys machine not having byte pointers: the PDP-6 (the original 36-bit machine as far as I know) had byte pointers that allowed you to specify bytes in the width 1 to 63 bits wide. It was common to have six-bit characters (you could pack six to a word) as well as 7-bit ASCII characters (you could pack 5 to a word).
- eesmith 8y ago"Weird" with respect to the current homogeneity, at least outside of microcontrollers and DSPs.
- rjsw 8y agoThe PDP-6 and PDP-10 were word addressed, you could then extract any bitfield from a word with a single instruction, there wasn't a true "pointer" to that bitfield.
- drfuchs 8y agoThe PDP-6 and -10 hardware absolutely did have true bitfield pointers as a major feature of the instruction set. A single instruction ("ILDB") would do the equivalent of Rn=* cp++ (where Rn is a register, and cp is a char* ). Even better, the pointer itself specified how many bits were being addressed, and the ++ part of the operation would move forward that many bits. See "Byte instructions" at http://hakmem.org/pdp-10.html http://hakmem.org/pdp-10.html
- rjsw 8y agoI know how the byte instructions worked, they were copied to the Lisp Machine. You still don't get a single pointer to part of a machine word.
- gumby 8y agoI don’t know why you would say that if you didn’t program a -6 or a -10. Byte pointers could e e incremental to move though memory just like word pointer, using the IBP instruction (increment byte pointer). If the byte spanned a word it would increment the word address. Http://pdp10.nocrew.org/docs/instruction-set/Byte.html
- sehugg 8y agoIf unaligned access traps are weird, then so is ARM: https://medium.com/@iLevex/the-curious-case-of-unaligned-access-on-arm-5dd0ebe24965 https://medium.com/@iLevex/the-curious-case-of-unaligned-acc...
- vardump 8y agoAlso x86 can trap on unaligned access, if "Alignment Check" (eflags bit 18) is 1 and CR0 "Alignment Mask" (coincidentally also bit 18) is 1. Then misaligned access will trap on x86. Can be useful for emulating architectures that don't support misaligned access.
- icedchai 8y agoI learned C on a 68000 system (Amiga.) Later I worked on Sparc, MIPS, and POWER boxes. The 90's were fun. Sadly, in today's world, if it's not Intel or ARM, it may as well be "weird."
- kayamon 8y agoFurthermore, MIPS was specifically designed to be friendly as a compiler target (e.g. 3-operand form by default)