summaryrefslogtreecommitdiff
path: root/samples/helloworld.golem
diff options
context:
space:
mode:
Diffstat (limited to 'samples/helloworld.golem')
-rw-r--r--samples/helloworld.golem15
1 files changed, 15 insertions, 0 deletions
diff --git a/samples/helloworld.golem b/samples/helloworld.golem
index d1758ac..aac5202 100644
--- a/samples/helloworld.golem
+++ b/samples/helloworld.golem
@@ -3,6 +3,9 @@ global str[32];
main() {
local i;
+ print("uwu");
+ wrt '\n';
+
strappend(str, 'H');
strappend(str, 'e');
strappend(str, 'L');
@@ -27,6 +30,18 @@ main() {
}
}
+strcpy(dst, src) {
+ local rv;
+ rv = dst;
+ loop {
+ [dst] = [src];
+ src = src + 1;
+ if ([src] == 0)
+ return rv;
+ dst = dst + 1;
+ }
+}
+
strappend(s, c) {
loop {
if ([s] == 0) {