Page 1 of 1

please help for boot code

Posted: Thu Sep 15, 2011 2:46 pm
by olumsuzruh
hi; I'm new to learn asm and os develop. I have a problem
bootloader load bootsector to 0x8000 . when I use this code no problem. It loads success. but I want to use this code without use ORG 0x8000. how can I do this without ? thanks

org 0x8000

start:
LEA SI, [start_msg]
call out_string


out_string:
; in: ds:si -> ASCIIZ string
lodsb
test al, al
jz sdone
mov ah, 0Eh
mov bx, 7
int 10h
jmp out_string
sdone:
ret
start_msg db 2,' loading kernel'

Re: please help for boot code

Posted: Thu Sep 15, 2011 3:02 pm
by MDM
Use a linker.

Re: please help for boot code

Posted: Thu Sep 15, 2011 4:49 pm
by azblue
Use org whateveryouwant, and then modify your 1st stage bootloader to load to that address

Re: please help for boot code

Posted: Thu Sep 15, 2011 9:44 pm
by Chandra
And, use code tags.