runkernel: add print_int debug function

This commit is contained in:
Sebastien Bourdeauducq 2021-11-10 17:34:13 +08:00
parent b57b869c49
commit 7fc04936cb
1 changed files with 6 additions and 0 deletions

View File

@ -33,6 +33,12 @@ pub extern "C" fn rtio_output(target: i32, data: i32) {
println!("rtio_output @{} target={:04x} data={}", unsafe { NOW }, target, data); 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() { fn main() {
let filename = env::args().nth(1).unwrap(); let filename = env::args().nth(1).unwrap();
unsafe { unsafe {