From ceedd4f2c7e990162f1b619f0d60471eea3aed1f Mon Sep 17 00:00:00 2001 From: kotorifan Date: Sun, 8 Mar 2026 15:33:02 +0100 Subject: Made a common directory, moved the protmode print there --- src/common/common.asm | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 src/common/common.asm (limited to 'src/common/common.asm') diff --git a/src/common/common.asm b/src/common/common.asm new file mode 100644 index 0000000..a98ef67 --- /dev/null +++ b/src/common/common.asm @@ -0,0 +1,27 @@ +;; common.asm +%ifndef COMMON_ASM +%define COMMON_ASM + +;; Real mode constants +%define READ_SECTORS_NUM 16 +%define BOOT_LOAD_ADDR 0x7c00 +%define STAGE2_ADDR 0x7e00 +%define SECTOR_SIZE 512 +%define STACK_ADDR 0x9c00 + +;; Mostly kernel and protected mode constants +%define VGA_COLOR_BLACK 0 +%define VGA_COLOR_GREEN 2 +%define VGA_COLOR_RED 4 +%define VGA_WHITE_ON_BLACK 0x0f20 +%define VGA_BUFFER 0xb8000 +%define VGA_SCREEN_X 80 +%define VGA_SCREEN_Y 25 +%define VGA_SCREEN (VGA_SCREEN_X*VGA_SCREEN_Y) + +;; Forth-specific constants +%define FS_DATA_STACK 0x80000 +%define FS_RET_STACK 0x90000 +%define FS_DICT_BASE 0xa0000 + +%endif -- cgit v1.3