Add os runner to justfile

This commit is contained in:
Greg Shuflin
2022-02-09 23:41:17 -08:00
parent 95c8480aac
commit 3ef8cbbf8c
2 changed files with 9 additions and 2 deletions

View File

@@ -1,6 +1,12 @@
default: default:
just --list 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 run_gamarjoba: build_gamarjoba
./gamarjoba_munde/gamarjoba ./gamarjoba_munde/gamarjoba

View File

@@ -8,7 +8,7 @@ fn panic(_info: &PanicInfo) -> ! {
loop {} loop {}
} }
static GAMARJOBA: &[u8] = b"Gamarjoba, munde!"; static GAMARJOBA: &[u8] = b"Gamarjoba, MVNDE!";
#[no_mangle] #[no_mangle]
pub extern "C" fn _start() -> ! { pub extern "C" fn _start() -> ! {
@@ -18,7 +18,8 @@ pub extern "C" fn _start() -> ! {
let i = i as isize; let i = i as isize;
unsafe { unsafe {
*vga_buffer.offset(i * 2) = byte; *vga_buffer.offset(i * 2) = byte;
*vga_buffer.offset(i * 2 + 1) = 0xb; *vga_buffer.offset(i * 2 + 1) = 0xd;
} }