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

46 lines
813 B

4 years ago
%include "equ/BIOS.asm"
%include "equ/ASCII.asm"
4 years ago
mov ah, BIOS_MODE_TELETYPE ; enter teletype mode (BIOS)
4 years ago
mov al, ASCII_LINEBREAK ; linebreak
int BIOS_INT
4 years ago
; Print "eOS"
4 years ago
mov al, "e"
int BIOS_INT
mov al, "O"
int BIOS_INT
mov al, "S"
int BIOS_INT
4 years ago
mov al, ASCII_LINEBREAK ; linebreak
4 years ago
int BIOS_INT
; ALPHABET PRINT
mov al, 64 ; one less than A since we are printing in a loop and it increments before sys interupt
loop:
4 years ago
; Print the alphabetic char
4 years ago
inc al ; move to next char
int BIOS_INT ; bios interupt to print it
4 years ago
;push al ; push al onto stack
4 years ago
4 years ago
; Print a linebreak
;mov al, ASCII_LINEBREAK
;int BIOS_INT
4 years ago
4 years ago
; Prepair for next iteration
;pop al ; return to char
4 years ago
4 years ago
cmp al, 90 ; 26 letters in english alphabet (64 + 26)
jl loop ; if al < 64+26: jmp loop
4 years ago
4 years ago
jmp $
times 510-($-$$) db 0
db 0x55, 0xaa