From 55fb99f0e12ec0b4bcf11b66bb2849e48aaf7d90 Mon Sep 17 00:00:00 2001 From: Jarkko Toivanen Date: Wed, 6 Sep 2023 20:28:25 +0300 Subject: [PATCH] Not the whole screenbuffer width was accessible --- src/framebuffer.asm | 3 ++- src/start32.asm | 9 +++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/src/framebuffer.asm b/src/framebuffer.asm index 7d14615..d831dec 100644 --- a/src/framebuffer.asm +++ b/src/framebuffer.asm @@ -17,7 +17,8 @@ putpixel: add edi, eax mov eax, [ebp+8] ;x - mul byte [mbootinfo.fb_bytespp] + movzx ebx, byte [mbootinfo.fb_bytespp] + mul ebx add edi, eax diff --git a/src/start32.asm b/src/start32.asm index 8577d67..fc3ae85 100644 --- a/src/start32.asm +++ b/src/start32.asm @@ -98,6 +98,15 @@ start: add esp, 36 ;Clean reserved uitoa return string from stack + ; Draw a test pixel to bottom right corner + mov eax, 0xff + mov ebx, 767 + mov ecx, 1023 + push 0xff + push 767 + push 1023 + call putpixel + add esp, 3*4 rOSkalogodraw: mov esi, roskalogo