4.2 ProcessorFundamentals.assembly_language Flashcards
(73 cards)
What is machine code?
Machine code is the programming language used by the CPU.
What is an instruction in the context of machine code?
An instruction is a single operation performed by the CPU.
What is assembly language?
Assembly language is a low-level, chip-specific programming language that uses mnemonics.
Define opcode.
Opcode, short for operation code, is the part of a machine code instruction that identifies the action the CPU will perform.
Define operand.
Operand is the part of a machine code instruction that specifies the data to be used by the CPU.
What is source code?
Source code is a computer program before it is translated into machine code.
What is an assembler?
An assembler is a program that translates assembly language into machine code. Assemblers can be one pass or two pass.
What is an instruction set?
The instruction set is the complete set of machine code instructions used by a CPU.
What is object code?
Object code is a computer program after it has been translated into machine code.
What are addressing modes?
Addressing modes are methods of using the operand part of a machine code instruction as a memory address.
What is absolute addressing?
Absolute addressing is a mode where the contents of the memory location specified in the operand are used.
What is direct addressing?
Direct addressing is the same as absolute addressing, where the contents of the memory location specified in the operand are used.
What is indirect addressing?
Indirect addressing is a mode where the contents of the contents of the memory location specified in the operand are used.
What is indexed addressing?
Indexed addressing is a mode where the contents of the memory location found by adding the contents of the index register (IR) to the address specified in the operand are used.
What is immediate addressing?
Immediate addressing is a mode where only the value of the operand is used.
What is relative addressing?
Relative addressing is a mode where the memory address used is the current memory address added to the operand.
What is symbolic addressing?
Symbolic addressing is a mode used in assembly language programming where a label is used instead of a value.
What is the only programming language a CPU can use?
Machine code
Why does each computer or chip have its own machine code instructions?
Because machine code instructions are specific to the architecture of the computer or chip.
What is stored in main memory for a CPU to carry out during the fetch-execute cycle?
A series of machine code instructions.
What does each machine code instruction perform?
Each instruction performs one simple task, such as storing a value in a memory location at a specified address.
How is machine code typically displayed to make it easier for programmers to understand?
Machine code is often displayed as hexadecimal.
What are the drawbacks of writing programs in machine code?
It is time-consuming, error-prone, and testing is only possible by running the program to see what happens.
Why were programming languages other than machine code developed?
To shorten development time and make instructions easier to learn and understand.