Almost hello world

This commit is contained in:
Rafał Grodziński
2025-07-08 22:49:04 +09:00
parent 707a282704
commit 870ecce8e4
2 changed files with 13 additions and 1 deletions

2
.vscode/launch.json vendored
View File

@@ -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
View 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
;