diff --git a/.zk/notebook.db b/.zk/notebook.db index 810fafd..53d16bd 100644 Binary files a/.zk/notebook.db and b/.zk/notebook.db differ diff --git a/stack_data_structure.md b/stack_data_structure.md deleted file mode 100644 index e69de29..0000000 diff --git a/zk/Stack_memory.md b/zk/Stack_memory.md index bdc49fd..c39abc9 100644 --- a/zk/Stack_memory.md +++ b/zk/Stack_memory.md @@ -12,18 +12,19 @@ of programs. ## Stack memory -Similarly to the [[Stacks|stacks]], it works on the basis of LIFO: the last item -put on the stack is the first item to be withdrawn. +Similarly to the [[Stacks|stack data structure]], it works on the basis of LIFO: +the last item put on the stack is the first item to be withdrawn. Note, this doesn't mean that the data at the memory addresses that comprise the stack can _only_ be accessed in a LIFO manner. Any item currently on the stack can be accessed (be read or modified) at any time. LIFO applies when it is is -time to clear memory from the stack: the most recent addition is cleared first. +time to clear memory from the stack: the most recent addition is cleared first +from the top down. ### Stack pointer A **stack pointer** is used to manage the items in the stack. This value is -stored in a [[processor register]] and its value is the memory address of the -item currently on the top of the stack. +stored in a [[CPU_architecture#registers|register]] and its value is the memory +address of the item currently on the top of the stack. ## Related notes