3.4 Assembly Language Flashcards
Assembly language
- Uses mnemonics to represent the operation codes and addresses
- Typically 2, 3, 4 character mnemonics are used to represent all the machine code instructions
Assembler
Translates the assembly language program into the machine code for execution
How can the flow of the program be changed?
Different conditionals
Give some examples of conditional
- BRP
- BRA
- BRZ
Why can’t the same assembly language be used for different CPU’s?
CPU’s have slightly different forms of assembly language
What determines the addressing mode
The 2 bits in the opcode
4 different types of addressing modes
- Immediate
- Direct
- Indirect
- Indexed
Immediate addressing
Operand is the actual value to be operated on
Direct adressing
The operand holds the memory address of the value to be operated on
Indirect addressing
Operand is usually the location (typically a register) which holds the address of the data that needs to be used
Indexed addressing
The address of the operand is obtained by adding to the contents of a general register a constant value