aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/gbos.inc10
1 files changed, 9 insertions, 1 deletions
diff --git a/include/gbos.inc b/include/gbos.inc
index 7c3f325..6aaaf73 100644
--- a/include/gbos.inc
+++ b/include/gbos.inc
@@ -67,8 +67,12 @@ DEF PROC_RAMB RB 1 ; data/stack cart-RAM bank
DEF PROC_WRAMB RB 1 ; u-area SVBK bank (1..7)
DEF PROC_PARENT RB 1
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_SIZE RB 0
+DEF STD_CONSOLE EQU $FF
+
; -----------------------------------------------------------------------------
; Syscall numbers (passed in C; args in DE/HL/B per call, ret in A)
; -----------------------------------------------------------------------------
@@ -88,7 +92,11 @@ DEF SYS_GETB EQU 12 ; read a byte from an open file (B=fd -> A, CF=EOF)
DEF SYS_PUTB EQU 13 ; append a byte to an open file (B=fd, E=byte)
DEF SYS_LIST EQU 14 ; list a directory slot (B=slot, DE=namebuf)
DEF SYS_REMOVE EQU 15 ; delete a file (DE=name)
-DEF SYS_MAX EQU 16
+DEF SYS_PUTC EQU 16 ; write a byte to stdout (E=byte)
+DEF SYS_SETIN EQU 17 ; set current stdin fd (B=fd, $FF=console)
+DEF SYS_SETOUT EQU 18 ; set current stdout fd (B=fd, $FF=console)
+DEF SYS_LOOKUP EQU 19 ; program id for a command name (DE=name -> A=id/$FF)
+DEF SYS_MAX EQU 20
; (SYS_OPEN=4 / SYS_CLOSE=5 are now implemented by the filesystem)
; -----------------------------------------------------------------------------