Chapter 4-6: Machine Language and Assembly Language Flashcards
This will be a mix up of 5 cards from week 6 and information from week 7 which is for Assembly language
The Hack language consists of two generic instructions: an “ “ instruction, also called A-instruction, and a “ “
instruction, also called C -instruction.
Hint: What two things does the computer need to know in order to process the commands? How would a postman know where to send a letter?
Address and compute instructions.
Every operation involving a memory location requires two Hack commands: What are they?
One for selecting the address on which we want to operate, and one for specifying the desired operation.
The instruction @ 5, which is equivalent to 0000000000000101, causes the computer to do?
To store the binary representation of 5 in the A register.
The instruction code is a specification that answers what three questions?
(a) what to compute
(b) where to store the computed value
(c) what to do next?
What are the three sources of symbols in a Hack computer?
Hint: It’s Not psuedo code
- Predefined symbols
- Label symbols
- Variable symbols
These commands like JMP beginWhile specify only the address of the target location.
Unconditional jump
These types of commands must also specify a Boolean condition, expressed in some way. Hint: two words
Conditional jump
Every machine language features the means to jump to selected locations in the program, both conditionally and unconditionally. This is called what?
Flow of Control
What kind of addressing is this?
In this addressing mode the address of the required memory location is not hard coded into the instruction; instead, the instruction specifies a memory location that holds the required address.
Indirect Addressing
What kind of addressing is this?
This form of addressing is used to load constants—namely, load values that appear in the instruction code.
Immediate Addressing
What kind of addressing is this?
The most common way to address the memory is to express a specific address or use a symbol that refers to a specific address.
Direct Addressing
What two categories do Memory Access commands fall into?
- Arithmetic and logical commands
- Load and store commands
Since binary codes are rather cryptic, machine languages are normally specified using both “ “ and “ “.
Binary codes and symbolic mnemonics
Located in the processor’s immediate proximity, the “ “ serve as a highspeed local memory, allowing the processor to manipulate data and instructions quickly.
registers
The “ “ is a device capable of performing a fixed set of elementary operations. These typically include arithmetic and logic operations, memory access operations, and control (also called branching) operations.
Processor, normally called CPU