CS 106B Lecture Notes - Lecture 5: Opcode, Machine Code, Memory Address

34 views2 pages

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.

Get access

Grade+20% off
$8 USD/m$10 USD/m
Billed $96 USD annually
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
40 Verified Answers
Class+
$8 USD/m
Billed $96 USD annually
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
30 Verified Answers

Related Documents