Computing.Net > Forums > Programming > OS bootloader

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

OS bootloader

Reply to Message Icon

Name: wille
Date: August 15, 2009 at 15:52:20 Pacific
OS: Windows Vista
CPU/Ram: 2 GHz DualCore/ 2041 MB
Product: Lenovo / 42334dg
Subcategory: General
Tags: assembly, OS, operating system, operating, system
Comment:

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 0xAA55

And 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



Sponsored Link
Ads by Google

Response Number 1
Name: tommycoolman
Date: August 16, 2009 at 15:35:14 Pacific
Reply:

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


0

Response Number 2
Name: wille
Date: August 17, 2009 at 13:54:19 Pacific
Reply:

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


0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More







Post Locked

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


Go to Programming Forum Home


Sponsored links

Ads by Google


Results for: OS bootloader

OS stuff www.computing.net/answers/programming/os-stuff/11479.html

Free os's are the top www.computing.net/answers/programming/free-oss-are-the-top/682.html

C++ 3.0 is not working over XP OS www.computing.net/answers/programming/c-30-is-not-working-over-xp-os/13290.html