A poorly written OS for the x86 arch. (WIP)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
eOS/src/bootloader.asm

45 lines
859 B

[org 0x7c00] ; bootsector
4 years ago
mov bx, welcome_string ; Print the welcome string
call println
4 years ago
4 years ago
mov bx, info_string ; Print version info
call println
4 years ago
; Read from disk
mov bp, 0x8000
mov sp, bp ; move the stack away so that it does not get overwritten
4 years ago
mov bx, 0x9000
mov dh, 2 ; read 2 sectors
call disk_read ; read
mov dx, [0x9000]
call print_hex
4 years ago
mov dx, [0x9000 + 512]
call print_hex
jmp $ ; inf loop
4 years ago
; Load the EQUs
4 years ago
%include "equ/BIOS.asm"
%include "equ/ASCII.asm"
4 years ago
; SRs
%include "elib/convert.asm"
%include "elib/io.asm"
%include "elib/bios_disk.asm"
4 years ago
4 years ago
welcome_string: db "e Operating-System (eOS)", ASCII_END
info_string: db "Version 2021 0.0", ASCII_END
read_test_string: db "Disk read: ", ASCII_END
times 510-($-$$) db 0
db 0x55, 0xaa ; magic BIOS numbers
4 years ago
; Bloat bytes to test disk read
times 256 dw 0xeeee
times 256 dw 0xaaaa