Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
Name: wille
hi, i've tried a lot of tutorial found by google. as stated i'm trying to make my own OS and i'm starting with the bootloader(this is what all the sites says to be the first thing to do, if that's wrong please say so). I've been compiling the following code in NASM:
[BITS 16]
[ORG 0x0000]
cli
mov ax, 0x07C0
mov ds, ax
mov es, ax
mov fs, ax
mov gs, ax
mov ax, 0x0000
mov ss, ax
mov sp, 0xFFFF
sti
mov si,msgHello
call DisplayMessage
mov si, msgEnd
call DisplayMessage
hlt
DisplayMessage:
lodsb
or al, al
jz .DONE
mov ah, 0x0E
mov bh, 0x00
mov bl, 0x07
int 0x10
jmp DisplayMessage
.DONE:
ret
msgHello db 0x0D, 0x0A, "Hello World", 0x0D, 0x0A, 0x00
msgEnd db 0x0D, 0x0A, "That's all folks!!!", 0x0D, 0x0A, 0x00
TIMES 510-($-$$) DB 0
DW 0xAA55And also alot of other somewhat similar code. They all state that the bootloaders will print something on the screen, I'm not asking for much, just something other than "Please remove removable drives, press any key to reboot"(roughly translated from swedish) or something like that, and when i press whatever key the same message appears again just below the first.
I'd like some tutorial that actually works. And what I want with this is to create as much as possible by myself; no kernels or anything already made. the ONLY thing i don't want to create myself is the BIOS, I'll leave that for some other time.
Any help on this is appreciated, sorry for bad english.Live the life as you know it
/ Wille

How are you "booting" the OS? From a floppy? And how did you put the compiled assembly code on the floppy?

Never mind, at first I just put the file on the floppy(compiled with nasm). Then I found out u had to write it directly to the bootsector, anyway I got it now. What would be great is a tutorial or something for how to load a kernel(and create one!).
Live the life as you know it
/ Wille

![]() |
![]() |
![]() |

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.
| Ads by Google |