Jump to content
  • Advertisement


This topic is now archived and is closed to further replies.


bootsector help

This topic is 5218 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

im trying to make an os but i cant get the boot sector to work can someone tell me whats wrong with my code
[BITS 16]
[ORG 0]
	jmp start
	bootdrv		db 0
	sysstart	db ''Press any key to start system.'',13,10,0
	rebootmsg	db ''Press any key to reboot.'',13,10,0
	resetmsg	db ''Resetting drive...'',13,10,0
	readmsg		db ''Loading program...'',13,10,0
	mov ax,0x7c0
	mov ds,ax
	mov [bootdrv],dl
	mov ax,0x9000
	mov ss,ax
	mov sp,0xffff
	mov si,sysstart
	call msg
	call keywait
	call reset
	call read
	push keywait
	push msg
	mov ax,1000h
	mov ds,ax
	call 1000h:0000
	mov ax,0x7c0
	mov ds,ax
	call reboot
	mov si,resetmsg
	call msg
	mov ax,0
	mov dl,[bootdrv]
	int 13h
	jc reset
	mov si,rebootmsg
	call msg
	call keywait
	db 0EAh
	dw 0000h
	dw 0FFFFh
	or al,al
	jz msgdone
	mov ah,0eh
	mov bx,0007
	int 0x10
	jmp msg
	mov ah,0
	int 016h
	mov si,readmsg
	call msg
	mov ax,1000h
	mov es,ax
	mov bx,0
	mov ah,2
	mov al,5
	mov ch,0
	mov cl,2
	mov dh,0
	mov dl,[bootdrv]
	int 13h
	jc read
times 510-($-$$) db 0
	dw 0AA55h

Share this post

Link to post
Share on other sites
What's happening? How far is it coming?
Also, this is probably not the right forum for this kind of stuff, check out http://www.mega-tokyo.com/forum/index.php?board=1 instead.

[edited by - Lantz on April 4, 2004 6:18:26 PM]

Share this post

Link to post
Share on other sites

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!