Fixed R/G/B field information fetching from Multiboot
This commit is contained in:
parent
a0ba839215
commit
3dd934bd83
2 changed files with 53 additions and 0 deletions
|
@ -54,6 +54,8 @@ mbootgetinfo:
|
||||||
mov [mbootinfo.fb_type], al
|
mov [mbootinfo.fb_type], al
|
||||||
inc esi
|
inc esi
|
||||||
|
|
||||||
|
;garbage?
|
||||||
|
add esi, 2
|
||||||
;; r/g/b positions and masks
|
;; r/g/b positions and masks
|
||||||
mov ecx, 6
|
mov ecx, 6
|
||||||
mov edi, mbootinfo.fb_rpos
|
mov edi, mbootinfo.fb_rpos
|
||||||
|
|
|
@ -143,6 +143,54 @@ push esp
|
||||||
call serialwrite
|
call serialwrite
|
||||||
add esp, 4
|
add esp, 4
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
push stuff.rmasksizetxt
|
||||||
|
call serialwrite
|
||||||
|
add esp, 4
|
||||||
|
|
||||||
|
push dword esp
|
||||||
|
push dword 10
|
||||||
|
xor eax, eax
|
||||||
|
mov al, [mbootinfo.fb_rmasksize]
|
||||||
|
push dword eax
|
||||||
|
call __uitoa
|
||||||
|
add esp, 3*4
|
||||||
|
push esp
|
||||||
|
call serialwrite
|
||||||
|
add esp, 4
|
||||||
|
|
||||||
|
push stuff.gmasksizetxt
|
||||||
|
call serialwrite
|
||||||
|
add esp, 4
|
||||||
|
|
||||||
|
push dword esp
|
||||||
|
push dword 10
|
||||||
|
xor eax, eax
|
||||||
|
mov al, [mbootinfo.fb_gmasksize]
|
||||||
|
push dword eax
|
||||||
|
call __uitoa
|
||||||
|
add esp, 3*4
|
||||||
|
push esp
|
||||||
|
call serialwrite
|
||||||
|
add esp, 4
|
||||||
|
|
||||||
|
push stuff.bmasksizetxt
|
||||||
|
call serialwrite
|
||||||
|
add esp, 4
|
||||||
|
|
||||||
|
push dword esp
|
||||||
|
push dword 10
|
||||||
|
xor eax, eax
|
||||||
|
mov al, [mbootinfo.fb_bmasksize]
|
||||||
|
push dword eax
|
||||||
|
call __uitoa
|
||||||
|
add esp, 3*4
|
||||||
|
push esp
|
||||||
|
call serialwrite
|
||||||
|
add esp, 4
|
||||||
|
|
||||||
|
|
||||||
add esp, 36 ;Clean reserved uitoa return string from stack
|
add esp, 36 ;Clean reserved uitoa return string from stack
|
||||||
|
|
||||||
; Draw a test pixel to bottom right corner
|
; Draw a test pixel to bottom right corner
|
||||||
|
@ -240,6 +288,9 @@ stuff:
|
||||||
.rpostxt db 10, "rPos: ", 0
|
.rpostxt db 10, "rPos: ", 0
|
||||||
.gpostxt db 10, "gPos: ", 0
|
.gpostxt db 10, "gPos: ", 0
|
||||||
.bpostxt db 10, "bPos: ", 0
|
.bpostxt db 10, "bPos: ", 0
|
||||||
|
.rmasksizetxt db 10, "rMaskSize: ", 0
|
||||||
|
.gmasksizetxt db 10, "gMaskSize: ", 0
|
||||||
|
.bmasksizetxt db 10, "bMaskSize: ", 0
|
||||||
|
|
||||||
align 4096
|
align 4096
|
||||||
bss_start:
|
bss_start:
|
||||||
|
|
Loading…
Reference in a new issue