From 7fc04936cb4bca8cf9457607e243b02b60878cbe Mon Sep 17 00:00:00 2001 From: Sebastien Bourdeauducq Date: Wed, 10 Nov 2021 17:34:13 +0800 Subject: [PATCH] runkernel: add print_int debug function --- runkernel/src/main.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/runkernel/src/main.rs b/runkernel/src/main.rs index c869a686..e639276e 100644 --- a/runkernel/src/main.rs +++ b/runkernel/src/main.rs @@ -33,6 +33,12 @@ pub extern "C" fn rtio_output(target: i32, data: i32) { println!("rtio_output @{} target={:04x} data={}", unsafe { NOW }, target, data); } +#[no_mangle] +pub extern "C" fn print_int(x: i32) { + println!("print_int: {}", x); +} + + fn main() { let filename = env::args().nth(1).unwrap(); unsafe {