Code: Select all
InitBGA:
mov ax, 0x4
mov dx, 0x01CE
out dx, ax ;0x1CE
xor ax, ax ; Screen disable
inc dx
out dx, ax ;0x1CF
mov ax, 0x1
dec dx
out dx, ax ;0x1CE
mov ax, 720 ; X
inc dx
out dx, ax ;0x1CF
mov ax, 0x2
dec dx
out dx, ax ;0x1CE
mov ax, 400 ; Y
inc dx
out dx, ax ;0x1CF
mov ax, 0x3
dec dx
out dx, ax ;0x1CE
mov ax, 32 ; BPP
inc dx
out dx, ax ;0x1CF
mov ax, 0x4
dec dx
out dx, ax ;0x1CE
mov ax, 0x41 ; Linear famebuffer and screen enable
inc dx
out dx, ax ;0x1CF
iret
Code: Select all
mov ecx, 720*400
mov ax, 0x38
mov gs, ax
xor edi, edi
.loop:
mov dword [gs:edi], 0x00FFFFFF
add edi, 4
loop .loop
I'm using Bochs to test my OS.
Github: https://github.com/Th3Matt/FlameOS-Rewrite3/