rhea/assets/examples/inline.rhea

18 lines
294 B
Plaintext
Raw Permalink Normal View History

2023-08-31 17:50:25 -05:00
func main() {
2023-10-02 17:16:27 -05:00
var abc = 0;
// an asm block may use variables outside of the asm scope
2023-08-31 17:50:25 -05:00
asm {
2023-10-02 17:16:27 -05:00
li r1, abc
2023-08-31 17:50:25 -05:00
}
2023-10-02 17:16:27 -05:00
// This is not really a requirement
2023-08-31 17:50:25 -05:00
opcode {
01
}
2023-10-02 17:16:27 -05:00
// Exit
var exit_status = 0;
asm {
li r255, exit_status
tx
}
2023-08-31 17:50:25 -05:00
}