mirror of
https://github.com/simon987/Much-Assembly-Required.git
synced 2025-04-18 02:06:43 +00:00
Updated Basic Assembly tutorial (markdown)
parent
cc13233cb5
commit
f877bb6b15
@ -179,7 +179,7 @@ NOT 0011 1111 0000 1010
|
||||
## Computers and code
|
||||
### Basic computer architecture
|
||||
Here is a basic diagram of the system design of a modern computer
|
||||
![]()
|
||||

|
||||
We can see that all there is a lot of I/O (input and output) hardware connected to the CPU, but we don't really have to worry about the exact way to access these from within the CPU because it is taken care of by the operating system (Linux, Windows...). In the real world, programmers use **system calls** which are understood by the operating system to request access to certain files on the hard drive or to display text on the screen.
|
||||
Only the CPU, memory and registers (in green) are relevant for the game.
|
||||
|
||||
@ -441,8 +441,5 @@ Visual representation of the stack:
|
||||
We can notice that this implementation of the stack is actually upside-down compared to a real-world stack of items: the stack grows downwards in memory, towards lower addresses. The important thing to remember is that the bottom of the stack is at a fixed address and that the top of the stack changes when an item is *pushed* on the stack or *popped* out. In the game's CPU, the **stack pointer** (SP) register always points to the top of the stack and the **base pointer** always points to the base of the current **stack frame**
|
||||
|
||||
|
||||
|
||||
### System calls
|
||||
//todo: system calls
|
||||
### Exemple code
|
||||
//todo: walk through of exemple code from MAR-Exemple-Code repo
|
Loading…
x
Reference in New Issue
Block a user