dev #4
Generated
+7
@@ -49,6 +49,13 @@ dependencies = [
|
|||||||
"spin",
|
"spin",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "lib_application"
|
||||||
|
version = "0.1.0"
|
||||||
|
dependencies = [
|
||||||
|
"lib_ascii",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "lib_ascii"
|
name = "lib_ascii"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
|
|||||||
+1
-1
@@ -4,7 +4,7 @@ members = [
|
|||||||
"lib/lib_serial",
|
"lib/lib_serial",
|
||||||
"lib/lib_ascii",
|
"lib/lib_ascii",
|
||||||
"kernel"
|
"kernel"
|
||||||
]
|
, "lib/lib_application"]
|
||||||
resolver = "2"
|
resolver = "2"
|
||||||
|
|
||||||
[workspace.package]
|
[workspace.package]
|
||||||
|
|||||||
+5
-1
@@ -4,7 +4,7 @@
|
|||||||
use core::arch::asm;
|
use core::arch::asm;
|
||||||
|
|
||||||
use lib_serial::{serial_println, serial_read};
|
use lib_serial::{serial_println, serial_read};
|
||||||
use lib_ascii::{println, WRITER};
|
use lib_ascii::{print, println, WRITER};
|
||||||
|
|
||||||
use limine::request::{RequestsEndMarker, RequestsStartMarker};
|
use limine::request::{RequestsEndMarker, RequestsStartMarker};
|
||||||
use limine::BaseRevision;
|
use limine::BaseRevision;
|
||||||
@@ -63,6 +63,10 @@ unsafe extern "C" fn kmain() -> ! {
|
|||||||
\\______/ \\______/ \\_/ \\______|
|
\\______/ \\______/ \\_/ \\______|
|
||||||
");
|
");
|
||||||
|
|
||||||
|
for i in 0u8..128 {
|
||||||
|
print!("{}", i as char);
|
||||||
|
}
|
||||||
|
|
||||||
hcf();
|
hcf();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,7 @@
|
|||||||
|
[package]
|
||||||
|
name = "lib_application"
|
||||||
|
version.workspace = true
|
||||||
|
edition.workspace = true
|
||||||
|
|
||||||
|
[dependencies]
|
||||||
|
lib_ascii = { path = "../lib_ascii" }
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
|
||||||
|
pub trait Application {
|
||||||
|
fn run(&mut self, args: [&'static str; 5]) -> Result<(), Error>;
|
||||||
|
}
|
||||||
|
|
||||||
|
pub enum Error {
|
||||||
|
OsError(&'static str),
|
||||||
|
ApplicationError(&'static str),
|
||||||
|
}
|
||||||
|
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
#![no_std]
|
||||||
|
|
||||||
|
pub mod application;
|
||||||
|
pub mod frame;
|
||||||
|
pub mod window;
|
||||||
@@ -0,0 +1,14 @@
|
|||||||
|
|
||||||
|
pub struct Window {
|
||||||
|
width: usize,
|
||||||
|
height: usize
|
||||||
|
}
|
||||||
|
|
||||||
|
impl Window {
|
||||||
|
pub fn new() -> Self {
|
||||||
|
Self {
|
||||||
|
width: 0,
|
||||||
|
height: 0
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,3 +1,6 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
pub static FONT: [u8; 128 * 16] = [
|
pub static FONT: [u8; 128 * 16] = [
|
||||||
// ASCII 0-31 (Control Characters) - Using simple box patterns
|
// ASCII 0-31 (Control Characters) - Using simple box patterns
|
||||||
// NUL (0)
|
// NUL (0)
|
||||||
|
|||||||
Reference in New Issue
Block a user