1
0
Fork 0
forked from AbleOS/ableos

this ia bad way to handle this but oh well

This commit is contained in:
Able 2024-08-12 08:21:31 -05:00
parent f4246ae387
commit fb8a835926
6 changed files with 11 additions and 7 deletions

View file

@ -7,7 +7,7 @@ use {
},
alloc::string::String,
hashbrown::HashMap,
log::info,
log::{info, trace},
spin::{lazy::Lazy, Mutex},
};
pub struct Services(HashMap<u64, Protocol>);

View file

@ -1,5 +1,5 @@
[package]
name = "serial_driver"
name = "a_serial_driver"
authors = ["Able"]
[dependants.libraries]

View file

@ -19,11 +19,13 @@ serial_println := fn(ptr: ^u8): void {
}
main := fn(): int {
serial_println("Starting Serial Driver.\0")
// Note that the first byte is reserved, pad accordingly.
// This must be done first and foremost to prevent racing
a := buffer.create("XNumber\0")
serial_println("Starting Serial Driver.\0")
// Note that the first byte is reserved, pad accordingly.
b := buffer.search("XNumber\0")
if a == b {
serial_println("Stopping Serial Driver.\0")
}

View file

@ -8,5 +8,7 @@ main := fn(): int {
a := memory.inb(0, 70)
b := memory.inb(0, 71)
c := buffer.search("XNumber\0")
return 0
}

View file

@ -19,8 +19,8 @@ resolution = "1024x768x24"
# [boot.limine.ableos.modules.tests]
# path = "boot:///tests.hbf"
[boot.limine.ableos.modules.serial_driver]
path = "boot:///serial_driver.hbf"
[boot.limine.ableos.modules.a_serial_driver]
path = "boot:///a_serial_driver.hbf"
[boot.limine.ableos.modules.diskio_driver]