summaryrefslogtreecommitdiff
path: root/sanctuary.s
diff options
context:
space:
mode:
authorkitty <nepeta@canaglie.net>2026-03-18 16:11:37 +1100
committerkitty <nepeta@canaglie.net>2026-03-18 16:11:37 +1100
commit6392033c9bee3da55f4e755059331ebf37c1b1c5 (patch)
tree7fdd6db718f7a09a08fffac7fae299d3590f076b /sanctuary.s
parent9d2f471ed1cde0c6e448ab6af29e734b49abe972 (diff)
syscalls
Diffstat (limited to 'sanctuary.s')
-rw-r--r--sanctuary.s37
1 files changed, 37 insertions, 0 deletions
diff --git a/sanctuary.s b/sanctuary.s
index a2ba5dd..89db85f 100644
--- a/sanctuary.s
+++ b/sanctuary.s
@@ -551,10 +551,47 @@ defcode "number", number, 0 ; ( c-addr u -- ?n flag )
ret
; }}}
+; syscall {{{
+defcode "syscall0", syscall0, 0
+ pspop rax
+ syscall
+ pspush rax
+ ret
+
+defcode "syscall1", syscall1, 0
+ pspop rax
+ pspop rdi
+ syscall
+ pspush rax
+ ret
+
+defcode "syscall2", syscall2, 0
+ pspop rax
+ pspop rdi
+ pspop rsi
+ syscall
+ pspush rax
+ ret
+
+defcode "syscall3", syscall3, 0
+ pspop rax
+ pspop rdi
+ pspop rsi
+ pspop rdx
+ syscall
+ pspush rax
+ ret
+; }}}
+
+; stack {{{
defcode "dup", dup, 0
mov r11, [r15]
pspush r11
ret
+; }}}
+
+; math + comparison {{{
+; }}}
; TEMPORARY WONKY DEBUGGING FUNCTIONS {{{
; .s {{{