Wheat Operating System (WheatOS)
- 10 Devlogs
- 6 Total hours
An Operating System with based on x86 for computers
An Operating System with based on x86 for computers
Everything in Stage 1 is done. It only works for x86 machines that have a BIOS from 1998 or later because it supports the feature that my Stage 1 bootloader has (Int 0x13, AH=0x42).
I will work on the Stage 2 bootloader and load the machine into Long Mode (64-bit).
First of all is get the Real Mode setup.
I just found out that there are some final tasks I have to do in Stage 1 before I can completely switch to Stage 2.
I need to make sure the BIOS supports the function to switch to Stage 2
After stage 1, I continue with stage 2, which will extend the memory limit, so the os can handle more complex tasks.
Surprisingly, I don’t know why it has an error.
disk_address_packet:
db 0x10
db 0
dw 1
dw 0x8000
dw 0x0000
dq 1
disk_error:
mov si, disk_error_message
call print_loop
jmp hang
ret
“disk_address_packet” and “disk_error” labels are to allow you to understand my screenshots more easily.
I just realized that I have lost in my own project😅. I didn’t know what I was doing or whether it was right.
Today, I finally kinda make a Stage 1 bootloader
I have switched to a new virtual machine, QEMU, because I can compile and run my Assembly file (.asm) more quickly. My file will output “Loading into Protected Mode 32-bit” once it runs.😅 😅 😅
I am still stuck in Real Mode and still can’t get to Protected mode.
Today, I am still stuck with the process of how to switch from Real Mode (16-bit) to Protected Mode (32-bit), but I think a little bit outside the box. Not only focused on A20, but I also researched the other parts in Real and Protected Mode.
I’m currently working on the bootloader to make it from Real Mode (16-bit) to Protected Mode (32-bit)
I’m still stuck with the A20 gate. I need to learn more about Assembly syntax, so it will help me understand how my CPU actually works.
I just made a shortcut today, so it will help me later in this project.
I have added a PowerShell file to build a Binary file (.bin) and other files (.img, .vdi) from my main Assembly file (.asm).
& "C:\Program Files\NASM\nasm.exe" -f bin boot.asm -o boot.bin
del disk.img -ErrorAction SilentlyContinue
del disk.vdi -ErrorAction SilentlyContinue
$disk= New-Object byte[] (1474560)
[IO.File]::WriteAllBytes("disk.img", $disk)
$boot= [IO.File]::ReadAllBytes("boot.bin")
$disk= [IO.File]::ReadAllBytes("disk.img")
[Array]::Copy($boot, 0, $disk, 0, 512)
[IO.File]::WriteAllBytes("disk.img", $disk)
& "C:\Program Files\Oracle\VirtualBox\VBoxManage.exe" convertfromraw disk.img disk.vdi --format VDI
I finally get my operating system on a virtual machine and make it output some words
I am researching assembly programming and how hardware and software work together.