Course Review
CS 301 Lecture, Dr. Lawlor
Here's basically everything we've covered so far this semester:
- Number representation and base conversion
- Binary numbers
- Octal
- Decimal
- Hex
- Instruction encoding as bits:
- Bits per register field
- Bits per opcode field
- Mapping C/C++ code to assembly
- Local variables (as registers, or on the stack)
- Arrays (as pointers, with pointer arithmetic)
- Converting for, while, if, &&, || into "if (something) goto somewhere;"
- Working with the stack
- Pushing and popping
- Moving the stack pointer
- Calling subroutines
- Memory allocation
- With malloc
- On the stack
- In the executable file
- x86 specifics
- Names of registers
- Saved registers
- Operation of MOV, ADD, PUSH, POP, CALL, RET, etc.
- You should be able to read and write simple x86 assembly code!
Here's the print_stack example we wrote in class, although I've flipped it around so it prints the highest addresses first.
Here's what we have coming up in the next few weeks:
- Floating point
- Performance optimization
- Assembly for other weirder machines