From a7b35d73026e169d203bce4996aae5c189a5c53d Mon Sep 17 00:00:00 2001 From: pantonshire Date: Wed, 24 Jul 2024 20:59:29 +0100 Subject: [PATCH] vga segment define --- boot1.s | 6 +++--- defines.s | 2 ++ 2 files changed, 5 insertions(+), 3 deletions(-) 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