Files
bits-runner-builder/samples/test.brc
Rafał Grodziński 5616036c17 Pass in constraints
2025-07-14 21:40:18 +09:00

39 lines
519 B
Plaintext

@extern putchar fun: character sint32 -> sint32
// ./build/brb samples/test.brc -S -x86-asm-syntax=intel
/*
User type
name data<u8, 32>
age u32
successRatio r32
isActive bool
;
*/
/*
i u32 <- 0, rep text[i] != 0:
putchar(text[i])
i++
;
*/
// text data<u8> <- "Hello world!"
/*addStuff asm<"+r, r">: num1 u32, num2 u32 -> u32
add $1, $0
;*/
rawAdd raw<"~{ebx}">
//push rbx
mov ebx, 5
//pop rbx
mov eax, 42
add eax, ebx
;
main fun -> sint32
rawAdd()
ret 0
;