diff --git a/mbv/apps/app.ld b/mbv/apps/app.ld
index decf721..c513779 100644
--- a/mbv/apps/app.ld
+++ b/mbv/apps/app.ld
@@ -5,6 +5,11 @@ MEMORY
 
 _vector_table = 0x0;
 
+BiosUartRead = 0x0d4;
+BiosUartWrite = 0x22c;
+BiosWozmon = 0x340;
+BiosUartWriteNibble = 0x324;
+
 SECTIONS
 {
     .text :
diff --git a/mbv/hal/debug.cc b/mbv/hal/debug.cc
new file mode 100644
index 0000000..d2c976a
--- /dev/null
+++ b/mbv/hal/debug.cc
@@ -0,0 +1,26 @@
+#include <cstdint>
+
+extern "C" {
+
+uint8_t BiosUartRead();
+void BiosUartWrite(uint8_t);
+void BiosWozmon();
+void BiosUartWriteNibble(uint8_t n);
+
+__attribute__((used))
+void UartWriteU32(uint32_t a) {
+    for (int i = 0; i < 8; i++) {
+        BiosUartWriteNibble(a >> 28);
+        a <<= 4;
+    }
+}
+
+__attribute__((used))
+void UartWriteString(const char* s) {
+    while (*s) {
+        BiosUartWrite(*s);
+        s++;
+    }
+}
+
+}