test: 重构 Demo14 演示代码

- 移除了 Main.snow 文件中的直接系统调用
- 新增 OS.snow 文件,实现 print 函数封装
- 修改 Main.snow,使用新的 print 函数替代系统调用
This commit is contained in:
Luke 2025-07-21 22:52:40 +08:00
parent b30b6aeaaa
commit a454eed26f
2 changed files with 12 additions and 2 deletions

View File

@ -1,10 +1,9 @@
module: Main
import: os
function: main
return_type: void
body:
syscall("PRINT",2222+1)
print(222)
end body
end function
end module

View File

@ -0,0 +1,11 @@
module: Main
import: os
function: print
parameter:
declare i1: int
return_type: void
body:
syscall("PRINT",i1)
end body
end function
end module