3 ms·
Wow, that sent me on a goose chase. That thing is cool. Wikipedia linked to here: http://datamuseum.dk/wiki/Rational/R1000s400/Logbook#2019-10-29 http://datamu
by PostOnce 6y ago
Wow, that sent me on a goose chase. That thing is cool.
Wikipedia linked to here: http://datamuseum.dk/wiki/Rational/R1000s400/Logbook#2019-10-29 http://datamuseum.dk/wiki/Rational/R1000s400/Logbook#2019-10...
and there it says:
---
The Ada language was originally designed for embedded systems, in particular for embedded systems in, around and in control of military weapons, and it dates back where state-of-the-art in radiation-hardened microcomputers was the RCA1802 and a few kilobytes of ROM and RAM was the norm, so being parsimonious with memory space is deeply embedded in the genes of Ada.
For instance, when you define:
subtype MISSILE_NUMBER is INTEGER range 1 .. 8;
The Ada compiler will know that only three bits will be needed to store that type.
And five bits saved here and four bits saved there, it adds up.
The R1000 is a true-blooded Ada computer, so the fundamental unit of addressing is a bit, and just because your field may happen to be 16 bits wide, does not mean that it is going to be aligned at a 16-bit boundary. (There is a notable exception: Instructions are 16 bit wide and must be aligned to 16 bit boundaries.)
---
Now, my friend told me that usually it'll align at 8 or 32 nowadays, but still, this is fascinating. I don't know if any other languages do that because I don't work on embedded stuff which might be the only place its done now if at all? Fascinating enough that I'm reading about it when I should be working!