aboutsummaryrefslogtreecommitdiffstats
path: root/include/gbos.inc
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--include/gbos.inc11
1 files changed, 8 insertions, 3 deletions
diff --git a/include/gbos.inc b/include/gbos.inc
index 770bd55..c4804c4 100644
--- a/include/gbos.inc
+++ b/include/gbos.inc
@@ -85,6 +85,7 @@ DEF PROC_EXIT RB 1 ; exit code (valid when PS_ZOMBIE)
DEF PROC_STDIN RB 1 ; $FF = console, else an open-file fd
DEF PROC_STDOUT RB 1 ; $FF = console, else an open-file fd
DEF PROC_PROG RB 1 ; program id currently running ($FF = none), for ps
+DEF PROC_CWD RB 1 ; current working directory (inode #)
DEF PROC_SIZE RB 0
DEF KILL_CODE EQU 137 ; exit status of a killed process (128 + SIGKILL)
@@ -118,8 +119,11 @@ DEF SYS_PS EQU 20 ; process table entry (B=slot, DE=buf3 -> A=
DEF SYS_PROGNAME EQU 21 ; program id -> name (B=id, DE=namebuf)
DEF SYS_REAP EQU 22 ; reap a zombie child, nohang (-> A=pid or 0)
DEF SYS_BFILL EQU 23 ; [debug] fill a disk block (B=block, E=byte)
-DEF SYS_BPEEK EQU 24 ; [debug] read a disk block[0] (B=block -> A)
-DEF SYS_MAX EQU 25
+DEF SYS_BPEEK EQU 24 ; [debug] read a disk block (B=block, E=off -> A)
+DEF SYS_MKDIR EQU 25 ; make a directory (DE=path -> A=0/$FF)
+DEF SYS_CHDIR EQU 26 ; change directory (DE=path -> A=0/$FF)
+DEF SYS_OPENDIR EQU 27 ; point ls at a directory (DE=path -> A=0/$FF)
+DEF SYS_MAX EQU 28
; SYS_KILL (9) is now implemented (B=pid -> A=0/$FF; pid 1 is immortal)
; (SYS_OPEN=4 / SYS_CLOSE=5 are now implemented by the filesystem)
@@ -136,7 +140,7 @@ DEF BLK_SUPER EQU 0
DEF BLK_BITMAP EQU 1
DEF BLK_INODE0 EQU 2 ; inode table = blocks 2,3
DEF BLK_DATA0 EQU 4 ; first data block
-DEF FS_VERSION EQU 2
+DEF FS_VERSION EQU 3 ; bumped: dirs now carry "."/".." entries
DEF NINODES EQU 32
DEF ROOT_INO EQU 1
DEF NDIRECT EQU 8 ; direct block pointers per inode -> files <= 2 KiB
@@ -196,5 +200,6 @@ DEF PROG_PS EQU 16
DEF PROG_KILL EQU 17
DEF PROG_SPIN EQU 18
DEF PROG_BLK EQU 19
+DEF PROG_MKDIR EQU 20
ENDC