1 - How Assembly Language Works Flashcards
What are assemblers?
An assembler is a utility program that converts source code programs from assembly language into machine language.
What are linkers?
A linker is a utility program that combines individual files created by an assembler into a single executable program.
What is a debugger?
It lets you step through a program while it’s running and examine registers and memory.
What is a “one-to-many relationship”?
In a one-to-many relationship, a single statement expands into multiple assembly language or machine instructions.
Give an example of an embedded systems application.
Automobile fuel and ignition systems, AC control, security, flight control, printers, etc.
What is a device driver?
Device drivers are programs that translate general operating system commands into specific references to hardware details that only the manufacturer knows.
Is there type checking on pointer variables in assembly language?
No, there is no type checking!
Translate the following to assembly language: X = (Y*4)+3
mov eax, Y mov ebx, 4 imul ebx add eax, 3 mov X, eax
How is a computer made up of “virtual machines”?
Each layer represents a translation layer from a higher-level instruction set to a lower-level instruction set.
Why is a translated program often faster than an interpreted one?
Translated programs are coded in a language that can be directly executed, but interpreted programs must be translated while they are running.
Name the four virtual machine levels, from lowest to highest.
- Digital logic
- Instruction set architecture (ISA), or machine language
- Assembly language
- High-level language
Why don’t programmers write applications in machine language?
Machine language provides no visual clues relating to the instruction syntax, so it is difficult to understand.
How do you translate unsigned binary integers into decimal?
You just add up all the powers of 2 to the position values (right most 0, increasing to the left). For example, 00001001 is (2^3 + 2^0 ) = 9.
How do you translate unsigned decimal integers to binary?
Repeatedly divide the integer by 2, saving each remainder as a binary digit in reverse order.
For example, 9/2 is 4 with a remainder of 1, so put 1 at the right. Then 4/2 is 0, 2/2 is 0, and finally 1/2 is 0 with a remainder of 1, so put that on left. 9 becomes 1001.
How do you add binary digits?
You just add them like whole numbers, carrying the 1 (from 1+1 = 10) to the top of the next left column..
For example,
100
+ 1 1 1
= 1011.