Less confusing branches #1

Open
able wants to merge 10 commits from something into master
3 changed files with 42 additions and 0 deletions
Showing only changes of commit 13437e49bc - Show all commits

View file

@ -0,0 +1,20 @@
var (error,warn,info,debug,trace) = io.log.(error,warn,info,debug,trace);
// TODO: define and add in IDL shenanigans for a proper IPC Protocol
func make_ipc_buffer(bounded: bool, length: u64) {
match bounded{
true -> match length {
0 -> error("Bound array has length of zero")
}
}
asm {
li r254, bounded
li r253, length
}
// Return a pointer to a memory address with `length`
return (123, 456);
}

View file

@ -1,4 +1,6 @@
var io = include "io"; var io = include "io";
var math = include "math"; var math = include "math";
var ecalls = include "ecalls";
var print = io.print; var print = io.print;

View file

@ -0,0 +1,20 @@
var ecalls = include "ecalls";
var make_ipc_buffer = ecalls.make_ipc_buffer;
var terminal;
terminal.init = terminal_init;
terminal.write = terminal_write;
func terminal_init(){
// setup a buffer with the TextIO protocol
var buffer = make_ipc_buffer(false, 0);
terminal.buffer = buffer;
}
func terminal_write(value: String){
// TODO: write value into buffer according to TextIO protocol
}