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

52 lines
950 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 bx, read_test_string
call print
mov dx, [0x9000]
call print_hex
mov bx, byte_sep_string
call print
4 years ago
mov dx, [0x9000 + 512]
call print_hex
mov bx, empty_string
call println
jmp $ ; inf loop
4 years ago
; Constants
%include "equ/ASCII.asm"
; SRs etc
%include "bios.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 "Read bytes: ", ASCII_END
byte_sep_string: db "; ", ASCII_END
empty_string: db ASCII_END
times 510-($-$$) db 0
db 0x55, 0xaa ; magic BIOS numbers
4 years ago
; Bloat bytes to test reading
4 years ago
times 256 dw 0xEEEE
times 256 dw 0xAAAA