Mercurial > lcfOS
view user/lib/lib.c3 @ 408:ad6be5454067
Added image build task
author | Windel Bouwman |
---|---|
date | Sat, 21 Feb 2015 12:17:47 +0100 |
parents | 0fb6633c42f6 |
children | 6aa9743ed362 |
line wrap: on
line source
module lib; import ipc; /* Runtime library. */ // Hack until something better exists: function void putc(int c) { var int *UART0DR; UART0DR = cast<int*>(0x109000); // UART0 DR register when remapped at 1MB *UART0DR = c; } function void print(string txt) { // TODO var ipc.Msg msg; ipc.SendMessage(&msg); // TBD: send text to putc or via send message?? var int i; i = 0; while (i < txt->len) { putc(cast<int>(txt->txt[i])); i = i + 1; } }