diff options
| author | kotorifan <kotorifan05@gmail.com> | 2026-03-08 16:37:02 +0100 |
|---|---|---|
| committer | kotorifan <kotorifan05@gmail.com> | 2026-03-08 16:37:02 +0100 |
| commit | 8b00afe1b255682cf8c219ab44a3d9fc590cc003 (patch) | |
| tree | 8584052a79557f9ccb0c1b77d70203addccbf6bb /src/common/common.protmode.print.asm | |
| parent | ceedd4f2c7e990162f1b619f0d60471eea3aed1f (diff) | |
| download | kotori-os-8b00afe1b255682cf8c219ab44a3d9fc590cc003.tar.gz | |
Clear message at bootup without extra ascii characters
Diffstat (limited to 'src/common/common.protmode.print.asm')
| -rw-r--r-- | src/common/common.protmode.print.asm | 24 |
1 files changed, 15 insertions, 9 deletions
diff --git a/src/common/common.protmode.print.asm b/src/common/common.protmode.print.asm index 5995e69..82ed3f4 100644 --- a/src/common/common.protmode.print.asm +++ b/src/common/common.protmode.print.asm @@ -1,11 +1,13 @@ ;; common.protmode.print.asm +%ifndef COMMON_PROTMODE_PRINT_ASM +%define COMMON_PROTMODE_PRINT_ASM %include "common.asm" _print_string_pm_vga: pusha mov edi, VGA_BUFFER - mov ah, WB_COLOR + mov ah, VGA_WHITE_ON_BLACK xor ecx, ecx xor edx, edx @@ -14,22 +16,26 @@ _print_string_pm_vga: test al, al jz .done - push eax - mov eax, edx - imul eax, eax, 160 - lea edi, [VGA_BUFFER + eax] - lea edi, [edi + ecx * 2] - pop eax + mov ebx, edx + imul ebx, ebx, 160 + lea ebx, [VGA_BUFFER + ebx + ecx * 2] + + mov ah, VGA_WHITE_ON_BLACK + mov [ebx], ax ;; Advance cursor inc cl - cmp cl, 80 - jb .print_loop + cmp cl, 80 ; Check if screen is full X pos + jne .print_loop xor cl, cl inc dl + cmp dl, 25 + jb .print_loop ; Check if screen is full Y pos jmp .print_loop .done: popa ret + +%endif |
