Fixed values handling

This commit is contained in:
Rafał Grodziński
2025-08-01 12:22:02 +09:00
parent 7dfa6bcffe
commit d3f45e7298
5 changed files with 16 additions and 12 deletions

View File

@@ -1,9 +1,9 @@
@extern putchar fun: character sint32 -> sint32
@extern putchar fun: character u32 -> u32
main fun -> sint32
text data<sint32> <- "Hello, world!\n"
main fun -> u32
text data<u32> <- "Hello, world!\n"
rep i sint32 <- 0, text[i] != 0:
rep i u32 <- 0, text[i] != 0:
putchar(text[i])
i <- i + 1
;

View File

@@ -49,11 +49,13 @@ i u32 <- 0, rep text[i] != 0:
;*/
main fun -> u32
/*num1 u8 <- 42
num1 u8 <- 42
num2 s8 <- 3 - +15
num3 u32 <- 1234123
num4 s32 <- -345345*/
num4 s32 <- -345345
num5 r32 <- -42.58
num5 + num3
ret 0
;