forked from starnakin/IronGOLEM
add: strlen, putchar, putstr
This commit is contained in:
parent
5fbf3f7e5a
commit
4e65a7f1c0
3
src/putchar.🗿
Normal file
3
src/putchar.🗿
Normal file
@ -0,0 +1,3 @@
|
||||
putchar(c){
|
||||
wrt c;
|
||||
}
|
11
src/putstr.🗿
Normal file
11
src/putstr.🗿
Normal file
@ -0,0 +1,11 @@
|
||||
putstr(str)
|
||||
{
|
||||
local i;
|
||||
i = 0;
|
||||
loop {
|
||||
if ([str + i] == 0)
|
||||
return;
|
||||
putchar([str + i]);
|
||||
i = i + 1;
|
||||
}
|
||||
}
|
9
src/strlen.🗿
Normal file
9
src/strlen.🗿
Normal file
@ -0,0 +1,9 @@
|
||||
strlen(str) {
|
||||
local i;
|
||||
i = 0;
|
||||
loop {
|
||||
if ([str + i] == 0)
|
||||
return (i);
|
||||
i = i + 1;
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user