From 3ef8cbbf8ce2aec2e40c6a5a04003ab46110bb0f Mon Sep 17 00:00:00 2001 From: Greg Shuflin Date: Wed, 9 Feb 2022 23:41:17 -0800 Subject: [PATCH] Add os runner to justfile --- justfile | 6 ++++++ os-in-rust/src/main.rs | 5 +++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/justfile b/justfile index adda797..c8199d3 100644 --- a/justfile +++ b/justfile @@ -1,6 +1,12 @@ default: just --list +execute_rust_os: + #!/usr/bin/env bash + cd os-in-rust + cargo bootimage + qemu-system-x86_64 -drive format=raw,file=target/x86_64_target/debug/bootimage-os-in-rust.bin + run_gamarjoba: build_gamarjoba ./gamarjoba_munde/gamarjoba diff --git a/os-in-rust/src/main.rs b/os-in-rust/src/main.rs index 7f2489c..858b5f6 100644 --- a/os-in-rust/src/main.rs +++ b/os-in-rust/src/main.rs @@ -8,7 +8,7 @@ fn panic(_info: &PanicInfo) -> ! { loop {} } -static GAMARJOBA: &[u8] = b"Gamarjoba, munde!"; +static GAMARJOBA: &[u8] = b"Gamarjoba, MVNDE!"; #[no_mangle] pub extern "C" fn _start() -> ! { @@ -18,7 +18,8 @@ pub extern "C" fn _start() -> ! { let i = i as isize; unsafe { *vga_buffer.offset(i * 2) = byte; - *vga_buffer.offset(i * 2 + 1) = 0xb; + *vga_buffer.offset(i * 2 + 1) = 0xd; + }