I just wrote a pretty basic bootloader in assembly, and am now trying to write a kernel. This is what I have so far.
extern "C" void main() {
int addr = 0xb8000;
int i = 0x00;
for (int i = 0x00; i < 0xff; i += 0x11) {
*(char*)addr = 'A';
addr++;
*(char*)addr = i;
addr++;
}
return;
}
All it really does is displays some colors. It does this by writing to video memory, which for QEMU
is 0xb8000
. If I wanted to flash this "OS" to a USB and boot it up on my laptop, would I need to change the address of video memory? Is there a way to automatically find that address?