please help for boot code

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.
Post Reply
olumsuzruh
Posts: 1
Joined: Thu Sep 15, 2011 2:40 pm

please help for boot code

Post 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'
User avatar
MDM
Member
Member
Posts: 57
Joined: Wed Jul 21, 2010 9:05 pm

Re: please help for boot code

Post by MDM »

Use a linker.
azblue
Member
Member
Posts: 147
Joined: Sat Feb 27, 2010 8:55 pm

Re: please help for boot code

Post by azblue »

Use org whateveryouwant, and then modify your 1st stage bootloader to load to that address
User avatar
Chandra
Member
Member
Posts: 487
Joined: Sat Jul 17, 2010 12:45 am

Re: please help for boot code

Post by Chandra »

And, use code tags.
Programming is not about using a language to solve a problem, it's about using logic to find a solution !
Post Reply