added some functions to the stdlib

This commit is contained in:
igor
2026-03-18 15:27:01 +01:00
parent 78bf6c132f
commit cda34e61bd
3 changed files with 82 additions and 0 deletions

View File

@@ -442,6 +442,14 @@
}
;
:asm rswap {
mov rax, [r13] ; get top
mov rbx, [r13 + 8] ; get second
mov [r13], rbx ; swap
mov [r13 + 8], rax
}
;
#pick [* | n] -> [* | x]
:asm pick {
mov rcx, [r12] ; get index