diff --git a/i386/loader/src-asm/utility/display.asm b/i386/loader/src-asm/utility/display.asm index 9b913c3..3046dee 100644 --- a/i386/loader/src-asm/utility/display.asm +++ b/i386/loader/src-asm/utility/display.asm @@ -33,20 +33,21 @@ write_hexadecimal_string: ; character uses 2 bytes and there are 3 characters per byte ; written; the upper nibble, the lower nibble and the padding. - ; Multiply the row with 80, the number of cells per row + ; Multiply the row with 160, the number of bytes per row mov eax, [ebp - 16] - mov edx, 80 + mov edx, 160 mul edx + mov [esi + 4], eax - ; Add the offset within the row ontop - add eax, [ebp - 12] + ; Get the byte offset within the row + mov eax, [ebp - 12] add eax, ecx - - ; Multiply with 2 to get the byte offset - ; from the character index mov edx, 6 mul edx + ; Add the start offset of the line + add eax, [esi + 4] + ; Point into the framebuffer add eax, FRAMEBUFFER_ADDRESS