test: 添加 Bug5 模块进行操作系统交互测试
This commit is contained in:
parent
b7e9c8121e
commit
e1a7f3310c
16
playground/BugFarm/Bug5/Main.snow
Normal file
16
playground/BugFarm/Bug5/Main.snow
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
module: Main
|
||||||
|
import: os
|
||||||
|
globals:
|
||||||
|
declare sum: int = 0
|
||||||
|
function: main
|
||||||
|
parameter:
|
||||||
|
return_type: int
|
||||||
|
body:
|
||||||
|
sum = 20
|
||||||
|
|
||||||
|
os.print(sum)
|
||||||
|
|
||||||
|
return 0
|
||||||
|
end body
|
||||||
|
end function
|
||||||
|
end module
|
||||||
11
playground/BugFarm/Bug5/OS.snow
Normal file
11
playground/BugFarm/Bug5/OS.snow
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
module: os
|
||||||
|
import: os
|
||||||
|
function: print
|
||||||
|
parameter:
|
||||||
|
declare i1: int
|
||||||
|
return_type: void
|
||||||
|
body:
|
||||||
|
syscall("PRINT",i1)
|
||||||
|
end body
|
||||||
|
end function
|
||||||
|
end module
|
||||||
Loading…
x
Reference in New Issue
Block a user