Almost hello world
This commit is contained in:
2
.vscode/launch.json
vendored
2
.vscode/launch.json
vendored
@@ -6,7 +6,7 @@
|
||||
"type": "lldb-dap",
|
||||
"request": "launch",
|
||||
"program": "${command:cmake.launchTargetPath}",
|
||||
"args": ["-v", "${workspaceFolder}/samples/test.brc"],
|
||||
"args": ["-v", "${workspaceFolder}/samples/hello.brc"],
|
||||
"cwd": "${workspaceFolder}",
|
||||
"internalConsoleOptions": "openOnSessionStart",
|
||||
}
|
||||
|
||||
12
samples/hello.brc
Normal file
12
samples/hello.brc
Normal file
@@ -0,0 +1,12 @@
|
||||
@extern putchar fun: character sint32 -> sint32
|
||||
|
||||
main fun -> sint32
|
||||
text data<sint32> <- "Hello string!\n"
|
||||
|
||||
rep i sint32 <- 0, i < 14:
|
||||
putchar(text[i])
|
||||
i <- i + 1
|
||||
;
|
||||
|
||||
ret 0
|
||||
;
|
||||
Reference in New Issue
Block a user