What next?
Posted: Thu Mar 03, 2005 8:35 am
Hi!
I have finally done some real code in my OS I only got this bootloader and I dont know what to do next. I hope someone could help me
I have finally done some real code in my OS I only got this bootloader and I dont know what to do next. I hope someone could help me
[BITS 16]
[ORG 0x7C00]
main:
mov ax, 0x0000 ;Load ds register with current segment
mov ds, ax
mov si, String1 ;Write String1 to the screen
call PrintMsg
mov si, String2 ;Write String2 to the screen
call PrintMsg
jmp $
PrintMsg:
mov ah, 0x0E ;Teletype Mode
mov bh, 0x00 ;Page Number
.nextchar:
lodsb ;Load [si] into al and increment si
or al, al ;Set the Zero Flag if al = 0
jz .return ;If the Zero Flag is set, jump to Break
int 0x10 ;Call BIOS Video Function
jmp .nextchar ;Loop around to write next character
.return
ret ;Return
String1: db "Neg OS", 13, 10, 0
String2: db "Boot v.1.0", 0
times 510-($-$$) db 0 ;Loads of zeroes
dw 0xAA55 ;two last bytes