diff options
| author | kotorifan <kotorifan05@gmail.com> | 2026-02-03 22:50:32 +0100 |
|---|---|---|
| committer | kotorifan <kotorifan05@gmail.com> | 2026-02-04 09:01:10 +0100 |
| commit | 8a0ab6de92c0e2b4260d6a149c43c58d004d74d9 (patch) | |
| tree | b1bfdc5d119dd01e6c603ddcb40b922e672b6c24 /src/common.asm | |
| parent | 7ce57a428f4c85771582c7f486c3553cacf80c15 (diff) | |
| download | kotori-os-8a0ab6de92c0e2b4260d6a149c43c58d004d74d9.tar.gz | |
Added common.asm
Diffstat (limited to 'src/common.asm')
| -rw-r--r-- | src/common.asm | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/src/common.asm b/src/common.asm new file mode 100644 index 0000000..7972b75 --- /dev/null +++ b/src/common.asm @@ -0,0 +1,22 @@ + ;; common.asm + %ifndef COMMON_ASM + %define COMMON_ASM + + ;; Real mode constants + %define READ_SECTORS_NUM 1 + %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) + + %endif |
