Assembly

At the heart of computer is traditionally a piece of electronic circuitry that executes instructions in sequence, as fetched from memory where they are encoded in bit patterns. Assembly language (or just assembler) is a term for the human-readable description of a computer's instruction set, that can then be straightforwardly translated into bit patterns, which process is called assembling (hence assembly language), and can be done manually or by a program called an assembler.

Assembly is generally the most direct way used by humans to program a computer, and is the only tool that ultimately (or rather initially) allows complete control over what the computer does. This is why it is to use for the founding items of an operating system, and critical parts of programs. Moreover, even when not strictly necessary, the use of assembly can yield substantial performance with respect to time, memory, or other resource usage, that will turn otherwise sluggish or obsolete computers into useful hardware, and make the most out of powerful hardware, thus saving incredible amounts of human work, and enabling useful human activity. Therefore, it is necessary that in any operating system, the use of assembly, and its interfacing with the rest of the system be made possible and as easy as possible.

However, assembly programming is quite unportable, as different computers have different instruction sets, and even computers with common or similar instruction sets have different performance constraints. It is also the most low-level kind of programming, too, with all the according disadvantages (lack of evolutivity, maintainability, scalability, difficulty to read, write and check, and more generally, lack of adaptation to the way humans express problems). Actually, in everyday life, using assembly is the typical kind of long stubborn hassle that humans can be relieved of by automatic programs called compilers.

For these reasons, once a system is developed enough, manual direct assembly programming eventually proves a quite suboptimal tool for most task, and people will tend to rather use a high-level language, in which they can express the problems they tackle independently from the particular constraints of the internal representation used. But there is no reason (on the contrary) why all the expressive power of assembly be dropped, as is done in nowadays operating systems. Sure, the use of assembly should be automated, through the use of compilers, but the assembly code generation done by these compilers should be completely controllable and programmable by the user, which is meta-programmed code generation.

We, at the TUNES project, believe that such metaprogramming is the most useful way to go, and that it will thus eventually overcome and succeed.


Pages in this topic: New Jersey Machine Code Toolkit   TAL  


Also linked from: Agnix   C--   Charles Childers   Continuation-Passing Style   DERIVE   Foreign Function Interface   Forth   Forth OSes   hOp   Libero   MenuetOS   Meta-System Transition   NASM   OCAML   Python   ShawnOS   Synthesis   Unununium   V2_OS