CS 106B Lecture Notes - Lecture 5: Opcode, Machine Code, Memory Address
Document Summary
Anatomy of an individual instruction: operation name on left (sometimes called opcode, operands on right (like arguments) Alu contains hardware that performs arithmetic operations on binary. Registers are located next to alu and are limited in number, around 5. Pc is another register known as the program counter. One pointer value to command currently being executed. Bus interface communicates with other parts of hardware: main memory. Stores the stack, heap, read-only and all other memory. Assembly programming (cont. : the mov instruction. Optional suffix: b = 1 byte, q= 8 bytes, etc. Does a copy from source to destination. Immediate (constant value: basic addressing modes (assembly version of variables) Don"t get to choose variable names, we have to talk directly. Addressing modes are allowable ways of naming these places. Actual address literal (cid:523)don"t need $ in front(cid:524) named, find an address there, and use it. (name of register), which means look in the register.