Skip to content

Commit 07bbab0

Browse files
committed
Move blank to userspace
1 parent 5971a69 commit 07bbab0

File tree

6 files changed

+15
-7
lines changed

6 files changed

+15
-7
lines changed

Makefile

+1
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ user-rust:
4949
basename -s .rs src/bin/*.rs | xargs -I {} \
5050
cargo rustc $(user-cargo-opts) --bin {}
5151
cargo rustc $(user-cargo-opts) --bin exec -- $(linker-opts)
52+
cargo rustc $(user-cargo-opts) --bin blank -- $(linker-opts)
5253
cargo rustc $(user-cargo-opts) --bin hello -- $(linker-opts)
5354
cargo rustc $(user-cargo-opts) --bin geocal -- $(linker-opts)
5455
cargo rustc $(user-cargo-opts) --bin geodate -- $(linker-opts)

dsk/var/pkg/blank

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/bin/blank

dsk/var/pkg/index.html

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
beep
2+
blank
23
chess
34
exec
45
fonts
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,20 @@
1-
use crate::api::io;
2-
use crate::api::process::ExitCode;
3-
use crate::api::vga;
1+
#![no_std]
2+
#![no_main]
43

5-
pub fn main(_args: &[&str]) -> Result<(), ExitCode> {
4+
extern crate alloc;
5+
6+
use moros::print;
7+
use moros::api::io;
8+
use moros::api::vga;
9+
use moros::entry_point;
10+
11+
entry_point!(main);
12+
13+
fn main(_args: &[&str]) {
614
vga::graphic_mode();
715
print!("\x1b]R\x1b[1A"); // Reset palette
816
while io::stdin().read_char().is_none() {
917
x86_64::instructions::hlt();
1018
}
1119
vga::text_mode();
12-
Ok(())
1320
}

src/usr/mod.rs

-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
pub mod beep;
2-
pub mod blank;
32
pub mod calc;
43
pub mod chess;
54
pub mod copy;

src/usr/shell.rs

-1
Original file line numberDiff line numberDiff line change
@@ -517,7 +517,6 @@ fn dispatch(args: &[&str], config: &mut Config) -> Result<(), ExitCode> {
517517
"2048" => usr::pow::main(args),
518518
"alias" => cmd_alias(args, config),
519519
"beep" => usr::beep::main(args),
520-
"blank" => usr::blank::main(args),
521520
"calc" => usr::calc::main(args),
522521
"chess" => usr::chess::main(args),
523522
"copy" => usr::copy::main(args),

0 commit comments

Comments
 (0)