4 ms·
The hardware access routines, real time operating system, and bottom level I/O can't be written in ADA. CPUs accept only machine code, so those programs have to
by WildUtah 12y ago
The hardware access routines, real time operating system, and bottom level I/O can't be written in ADA. CPUs accept only machine code, so those programs have to be written at least partly in machine code.
Likewise the compiler has to generate CPU instructions,the opcodes and operands of which are embedded in the code generator as binary data. That is code that isn't in ADA either.
- amock 12y agoAda get compiled to machine code, so of course it can run directly on the CPU. There's also no reason it can't be used to write a compiler and there's probably several Ada compilers written in Ada. I'm not sure what you mean about binary data having to be embedded in the code generator; you can easily generate arbitrary binary data from almost any language.
- axman6 12y ago> The hardware access routines, real time operating system, and bottom level I/O can't be written in ADA. I disagree, Ada has fantastic tools for writing these sorts of code; you can precisely define data types down to the bit level and their precise locations and endianess in memory. Have a look at pages 50-68 of [1] to see these in action. you don't have to know Ada to be able to see what's being defined, and that's it exactly matches the specification of the memory mapped IO registers. Some reference c code is given, but there is no guarantee that the compiler will do what you want; the Ada language does guarantee it. [1] http://cs.anu.edu.au/student/comp4330/Lectures/RTES-03%20Interfaces.01.pdf http://cs.anu.edu.au/student/comp4330/Lectures/RTES-03%20Int...
- pjmlp 12y agoIt seems you never programmed in Ada...