2: Assembly Language
( \newcommand{\kernel}{\mathrm{null}\,}\)
- 2.1: What is Assembly Language
- Assembly language is a very low level, human readable and programmable, language where each assembly language instruction corresponds to a computers machine code instruction. Assembly language programs translate directly into machine code instructions, with each assembly instruction translating into a single machine code instruction1.
- 2.2: Assembly Language Caveats
- Programmers who have learned higher level language, such as Java, C/C++, C#, or Ada, often have developed ways of thinking about a program that are inappropriate for low level languages and systems such as assembly language. This section will give some suggestions to programmers approaching assembly language for the first time.
- 2.3: Assembler Directives
- Assembler directives are directions to the assembler to take some action or change a setting. Assembler directives do not represent instructions, and are not translated into machine code.
- 2.4: Data types
- While an assembly language has no explicit data types, there are rules for how the data is accessed and stored. This section defines the rules for data access.
- 2.5: Designing an Assembly Language
- The amount of memory directly accessible to a programmer on the CPU (e.g. registers) is very limited. In the case of the one-address architecture, only one memory slot, the $ac, is directly useable by a programmer. Therefore programs need to rely on main memory to store program instructions and data.
- 2.6: Assembler Programs
- The following assembly programs illustrate how the assembly language defined in this chapter can be used to implement some simple programs.