Mercurial > lcfOS
view user/lib.c3 @ 399:a7c444404df9
Fix hexwrite
author | Windel Bouwman |
---|---|
date | Fri, 20 Jun 2014 16:36:49 +0200 |
parents | 6ae782a085e0 |
children |
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; } }