diff --git a/Makefile b/Makefile index ec27cdb..bc289ee 100644 --- a/Makefile +++ b/Makefile @@ -17,6 +17,10 @@ run: image.bin run-nox: image.bin qemu-system-i386 -nographic -drive format=raw,file=$< -serial mon:stdio +ejudge.sh: image.bin + echo >$@ "#!/bin/sh\nexec qemu-system-i386 -nographic -drive format=raw,file=$< -serial mon:stdio" + chmod +x $@ + debug-boot-nox: image.bin mbr.elf qemu-system-i386 -nographic -drive format=raw,file=$< -s -S & $(GDB) mbr.elf \ diff --git a/drivers/vga.c b/drivers/vga.c index 5a605cd..274a653 100644 --- a/drivers/vga.c +++ b/drivers/vga.c @@ -1,6 +1,8 @@ #include "port.h" #include "vga.h" +char* const video_memory = (char*) 0xb8000; + static unsigned char get_color(unsigned char fg, unsigned char bg) { return (bg << 4) + fg; } diff --git a/drivers/vga.h b/drivers/vga.h index dc21424..9307fa6 100644 --- a/drivers/vga.h +++ b/drivers/vga.h @@ -1,6 +1,6 @@ #pragma once -static char* const video_memory = (char*) 0xb8000; +extern char* const video_memory; enum { ROWS = 25,