1
0
Fork 0
forked from AbleOS/ableos
ableOS_v1Change/sysdata/test-programs/serial_driver.rhai
able 65b6f52d2e POC serial driver for arm
Does not work for x86 yet
2023-11-21 03:56:18 -06:00

27 lines
430 B
Plaintext

import "sysdata/test-programs/hblib/std" as std;
fn main(){
let ADDR = 0;
// FIXME: Actually check the arch argument
let architecture = "ARM";
if architecture == "ARM" {
std::Info("Arm Serial Driver");
ADDR = 0x09000000;
}
lra(r3, r0, ADDR);
li64(r1, 0);
li8(r1, 65);
st(r1, r0, ADDR, 1);
// New Line
li8(r1, 12);st(r1, r0, ADDR, 1);
tx();
}
main();