From 59dcc299077eb7c01d960c4b3e102fe2590668e3 Mon Sep 17 00:00:00 2001 From: kitty Date: Thu, 22 Jan 2026 17:34:19 +1100 Subject: =?UTF-8?q?namechange=20SP=20=E2=86=92=20NOS;=20start=20stack=20ac?= =?UTF-8?q?tually=20empty?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- jefs.s | 2 +- readme.md | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/jefs.s b/jefs.s index 40ba54d..b6b765f 100644 --- a/jefs.s +++ b/jefs.s @@ -64,7 +64,7 @@ section .text global _start _start: ; init - mov r14, wstack + mov r14, wstack + 16 xor r15, r15 mov rdi, 0 diff --git a/readme.md b/readme.md index 64af573..a4d38f3 100644 --- a/readme.md +++ b/readme.md @@ -29,12 +29,12 @@ there are a set of 'virtual registers' (see moving forth part 1) - W, the working register, is r11. - X, the secondary working register, is r12. - IP, the instruction pointer, is r13. (this will only be needed if we switch to DTC, otherwise this can be Y, a third general purpose register) -- SP, the working stack pointer, is r14. +- NOS, the next-on-stack pointer, is r14. - TOS, the top of the stack, is r15. - RSP, the return stack pointer, is rsp. -on SP (r14): note that since TOS is kept in a register, -SP points to the *second* item in the stack. +on NOS (r14): TOS is kept in a register, +NOS points to the *second* item in the stack. ## miscellaneous notes and stuff -- cgit v1.2.3