|
#![no_std]
|
|
#![no_main]
|
|
|
|
extern crate riscv_rt;
|
|
extern crate panic_halt;
|
|
|
|
use riscv_rt::entry;
|
|
|
|
fn print(string: &str) {
|
|
for c in string.chars() {
|
|
let mem = 0x00400000 as *mut u8;
|
|
unsafe { *mem = c as u8 }
|
|
}
|
|
}
|
|
|
|
#[entry]
|
|
fn main() -> ! {
|
|
loop {
|
|
print("hello2");
|
|
}
|
|
}
|