Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
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
Before you work on the things Pype mentioned, you'll probably want to provide the means to load something larger than 512 bytes (e.g. a file on a floppy) and transfer control to it, since I hardly believe you'll be able to do all the things you want to do in half a kilobyte.
It may be handier to use in the beginning stage of your kernel a bootloader from someone else, I recommend GRUB. It supports lots of filesystems and a lot of executable formats as well.
Or more accurately, it supports ELF and has a hack to support almost any other executable format. I recommend GRUB as well but I learned a lot from messing with a bootloader before I switched to GRUB though.