diff --git a/boot1.s b/boot1.s index ab16baa..c8b1149 100644 --- a/boot1.s +++ b/boot1.s @@ -382,7 +382,7 @@ vga_clear: push ax push cx - mov ax, 0xb800 + mov ax, VGA_SEG mov es, ax mov ax, [GLOBALS + VGA_COL] mov cx, VGA_WIDTH * VGA_HEIGHT @@ -410,7 +410,7 @@ vga_scroll: push es push ds - mov ax, 0xb800 + mov ax, VGA_SEG mov ds, ax mov es, ax @@ -475,7 +475,7 @@ vga_print_raw: mov di, cx shl di, 1 - mov ax, 0xb800 + mov ax, VGA_SEG mov fs, ax mov ah, [GLOBALS + VGA_COL + 1] diff --git a/defines.s b/defines.s index c77ed10..d46b3a4 100644 --- a/defines.s +++ b/defines.s @@ -12,6 +12,8 @@ %define EBDA_START 0x080000 +%define VGA_SEG 0xb800 + %define BOOT1_MAGIC 0x544e4150 %define VGA_WIDTH 80