Replaced builtin store function with a new syntax

This commit is contained in:
Eduard Urbach 2025-04-11 14:21:51 +02:00
parent 013d3dd8cd
commit 3da61f5c69
Signed by: eduard
GPG key ID: 49226B848C78F6C8
12 changed files with 54 additions and 46 deletions

View file

@ -4,9 +4,9 @@ import sys
create(func *any) -> int {
stack := sys.mmap(0, 4096, 0x1|0x2, 0x02|0x20|0x100)
stack += 4096 - 8
store(stack, 8, core.exit)
[stack] = core.exit
stack -= 8
store(stack, 8, func)
[stack] = func
return sys.clone(clone.vm|clone.fs|clone.files|clone.sighand|clone.parent|clone.thread|clone.io, stack, 0, 0, 0)
}