/learning-c

Sample code for demonstrating low lovel concepts in C

Primary LanguageCMIT LicenseMIT

What are we learnign?

  • pointers
  • memory layout
  • the stack
  • how a program is layed out

Memory layout

  • labled mailboxes 1 byte in size
  • adresses are numbers too

Pointers

  • figureing out where stuff is (& operator)
  • getting to stuff (* operator)
  • math, with addresses!
  • assignment (through a pointer)
  • arrays (are almost pointers)

The stack

  • what is it for?
  • where is it?
  • what does it look like

Usefull commands

gcc -g -c return.c -o return.o objdump -d return.o >> return.S