因此,我目前正在使用操作系统,并且处于非常愚蠢的状态:切换到VESA / VBE
我当前的代码:
mov ax, 0x4F02
mov bx, 0x4118
int 0x10
Run Code Online (Sandbox Code Playgroud)
它改变了Qemu分辨率,但是现在我在绘制像素时遇到了问题。像素偏移的公式为:
uint32 pixel_offset = y * pitch + (x * (bpp/8)) + framebuffer;
Run Code Online (Sandbox Code Playgroud)
问题是bpp,pitch和framebuffer应该由
mov ax, 0x4F01
int 0x10
Run Code Online (Sandbox Code Playgroud)
和
mov ax, 0x4F00
int 0x10
Run Code Online (Sandbox Code Playgroud)
第一,
mov ax, 0x4F00
int 0x10
Run Code Online (Sandbox Code Playgroud)
软锁qemu。即使没有,我该怎么做才能访问该信息。
我想要的是一个功能,该功能可以切换为完全用汇编语言(nasm)编写的VESA / VBE,然后可以使用我的内核编写的函数访问。
编辑:我真的不能在我的引导程序中包含任何C。我需要汇编代码。