opearting system design

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.
Locked
jay
Posts: 2
Joined: Wed Jan 23, 2013 9:46 am

opearting system design

Post by jay »

I am designing a new os.....on win xp.............this is d boot code............

Code: Select all

                         BITS 16
jmp 07c0h
        msg db "WELCOME TO G1 OS",0
	msg1 db "Press Enter to Continue",0
start:
	mov ax,cs
	mov ds,ax
	mov es,ax
	
	;prompt
	call prompt
	;setting the cursor
	mov dh,9
	mov dl,30
	call set_cursor
	;welcome msg
	xor ax,ax
	mov si,msg
	call print
	mov dh,12
	mov dl,45
	call set_cursor
	mov si,msg1
	call print
	call wait_enter
prompt: 
	mov ah,00h
	mov al,10h
	int 10h
	mov ah,0Bh
	mov bh,00h
	mov bl,0Ah
	int 10h
	ret
set_cursor:
	mov ah,02
	mov bh,00
	int 10h
	ret
print:
	mov ah,0Eh
	mov bh,00h
	mov bl,07
	lodsb 
	cmp al,0 
	je end
	int 10h
	jmp  print
end:
	ret
wait_enter:
	mov ah,10h
	int 16h
	cmp ah,1ch
	je end1
	jmp wait_enter
	
end1:
	ret
hang:
	jmp hang
	times 510-($-$$) db 0
dw 	0AA55h
...............................................................i compiled and got d bin file..........now i want to boot it from pendrive.........i hav copied the bin file to pendrive..and changed d boot order to boot from os frst.bt i am not able to get the welcome msg.......plz help me..................i have tried from cd also bt unable to view d welcome msg...........
User avatar
thepowersgang
Member
Member
Posts: 734
Joined: Tue Dec 25, 2007 6:03 am
Libera.chat IRC: thePowersGang
Location: Perth, Western Australia
Contact:

Re: opearting system design

Post by thepowersgang »

1. Read the forum rules first. (Particularly the section on asking smart questions)
2. A period is not a space, nor should a period (or a space) be abused such.
3. You will find the answer on the wiki, I'd assume that you have not read it until sufficient evidence is provided to the contrary.
4. (I'm not sure that the rules say this, but) Code dumps are frowed upon, espectially if it's an entire file.
Kernel Development, It's the brain surgery of programming.
Acess2 OS (c) | Tifflin OS (rust) | mrustc - Rust compiler
Currently Working on: mrustc
feare56
Member
Member
Posts: 97
Joined: Sun Dec 23, 2012 5:48 pm

Re: opearting system design

Post by feare56 »

Before testing it on real hardware make sure it works by testing it in a testing environment like I tested it on virtualbox. Also like thepowersgang said please don't post your entire code. But since you did I edited the part I thought was wrong and found another part that is resulting in a green screen in the "start:" section. I changed the beginning to where instead of the jmp 07c0h I put "call start" and managed to get something up. Also you probably need to change where the welcome message like in "mainloop:" or start and have the message print where the current message is in the code. And here are some pictures of what I managed to get without dramatically changing the code. The first one is what happens on boot, the other one is when you push enter
Attachments
code 2.png
code 2.png (1.53 KiB) Viewed 3746 times
code.png
code.png (1.44 KiB) Viewed 3746 times
jay
Posts: 2
Joined: Wed Jan 23, 2013 9:46 am

Re: opearting system design

Post by jay »

Thanx feare56.............plzz can u tel how to test a .bin file in virtual box?????shal we convert boot.bin to an iso file and den boot from usb???
User avatar
Brendan
Member
Member
Posts: 8561
Joined: Sat Jan 15, 2005 12:00 am
Location: At his keyboard!
Contact:

Re: opearting system design

Post by Brendan »

Hi,

I found an online translator and set it to "stupid to English translation". Here's the result:

"Thanks feare56.

Please can you tell me how to test a .bin file in virtual box? Should I convert boot.bin to an iso file and then boot it from USB?
"


Cheers,

Brendan
For all things; perfection is, and will always remain, impossible to achieve in practice. However; by striving for perfection we create things that are as perfect as practically possible. Let the pursuit of perfection be our guide.
Locked