Status: Tags: Links: ) CMPT 295 - Introduction to Computer Systems
CMPT 295 Course Outline
- Von Neumann Architecture
- Data Representation
- Shannon’s master thesis
- Claude Shannon applied boolean algebra onto design and anlysis of digital systems/circuits
Machine Level Programming
Makefile Syntax
- gcc -E main.c > main.i
- implements include files into program
- E
- S is assembly
- g allows to use debugger
- Wall is show all warnings
- c converts assembly to object file
- o is executable
- ss some store
Questions
How does c program become stored in memory?
- Loader
How is c program executed by microprocessor?
-
First it looks at
%rip
to see what instruction needs to be called -
Run function, then increment PC
-
Have visuals for each register to help with hand tracing
Steps of call instruction
-
When callq, add return address (%rip) to stack to return later
-
%rip is set to callq, runs the new called function
-
When coming across a ret, it grabs from stack and puts into %rip
-
When calling a function inside a function, its return value will be stored in %rax
Backlinks
|
|
References:
Created:: 2022-01-10 14:42