chore: flat out the file structure

This commit is contained in:
2026-09-11 18:48:16 +02:00
parent 959d0a7773
commit 3b98f77c08
78 changed files with 76 additions and 40 deletions
+35
View File
@@ -0,0 +1,35 @@
type arr = array $s8 10
func println $arr = native println
public func main = #main
main:
array $arr
dup
store %0
lenof
store %1
push $s32 0
loop:
dup
load %1
ge
jnz #end
body:
dup
load %0
swap
push $s8 69
set
push $s32 1
add
jmp #loop
end:
drop
load %0
call $arr println
ret
+38
View File
@@ -0,0 +1,38 @@
type arr = array $s8 10
type arrSlice = slice $s8
func println $arrSlice = native println
public func main = #main
main:
array $arr
store %0
push $s32 2
store %1
push $s32 0
loop:
dup
load %1
ge
jnz #end
body:
dup
load %0
swap
push $s8 69
set
push $s32 1
add
jmp #loop
end:
drop
load %0
push $u32 0
load %1
slice
call $arrSlice println
ret
+25
View File
@@ -0,0 +1,25 @@
func println $u32 = native println
allocate uwu
public func main = #main
main:
push $u32 0
storeg %uwu
loop_header:
loadg %uwu
push $u32 10
ge
jnz #loop_end
loop_body:
loadg %uwu
call $u32 println
loadg %uwu
push $u32 1
add
storeg %uwu
jmp #loop_header
loop_end:
ret
+7
View File
@@ -0,0 +1,7 @@
func println $s32 = native println
public func main = #main
main:
push $s32 69
call $s32 println
ret