please help me

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
User avatar
mustafa121
Posts: 8
Joined: Sat Apr 11, 2009 5:56 am
Location: ankara, turkey
Contact:

please help me

Post by mustafa121 »

Hello,
I want to write my own os. I know C and i am learning Asm. But i don't know where i'll start. Please help me(i am sorry for spelling errors)
User avatar
Nathan
Member
Member
Posts: 201
Joined: Sun Jul 19, 2009 1:48 pm
Location: Brazil
Contact:

Re: please help me

Post by Nathan »

Hello Mustafa,
Here is a good list of resources to you: And here is an example of a simple OS written in Assembly(Nasm):

Code: Select all

[BITS 16]	 ; 16 bit code generation
[ORG 0x7C00]	 ; ORGin location is 7C00

main:
MOV BH, 00h
MOV BL, 07h
MOV AL, 1
MOV BH, 0
MOV BL, 0011_1011b
MOV CX, msg1end - msg1 ; calculate message size. 
MOV DL, 30
MOV DH, 0
PUSH CS
POP ES
MOV BP, msg1
MOV AH, 13h
INT 10h
JMP msg1end

msg1 DB "Hello, World!"

msg1end:
JMP $
; Boot things
TIMES 510-($-$$) DB 0	; Fill the rest of the sector with zeros
DW 0xAA55		; Boot signature
Hope this helped,
Nathan Paulino Campos
User avatar
mustafa121
Posts: 8
Joined: Sat Apr 11, 2009 5:56 am
Location: ankara, turkey
Contact:

Re: please help me

Post by mustafa121 »

thanks for answer
User avatar
Blue
Member
Member
Posts: 31
Joined: Thu Aug 02, 2007 6:34 am
Location: on the stack

Re: please help me

Post by Blue »

And do not forget our wiki!
For a start look at Getting Started and Beginner Mistakes :)
User avatar
Nathan
Member
Member
Posts: 201
Joined: Sun Jul 19, 2009 1:48 pm
Location: Brazil
Contact:

Re: please help me

Post by Nathan »

Ok, here is the best and more explained tutorial to start: http://www.osdever.net/tutorials/hello_ ... ?the_id=85

With it that i've started!
pcmattman
Member
Member
Posts: 2566
Joined: Sun Jan 14, 2007 9:15 pm
Libera.chat IRC: miselin
Location: Sydney, Australia (I come from a land down under!)
Contact:

Re: please help me

Post by pcmattman »

Assuming you're ready to actually think about what you're doing and not just copy and paste, this tutorial will suffice (if you know C, like you say you do). Just note that the tutorial does have bugs and the code examples are not necessarily correct - you can't just copy & paste ;)

Also, the best place to start is our wiki. I don't think you'll find such a wealth of information in one place elsewhere.
User avatar
neon
Member
Member
Posts: 1567
Joined: Sun Feb 18, 2007 7:28 pm
Contact:

Re: please help me

Post by neon »

There are alot of tutorials that you can try... Clicky ;) (Sorry, had to post it)
OS Development Series | Wiki | os | ncc
char c[2]={"\x90\xC3"};int main(){void(*f)()=(void(__cdecl*)(void))(void*)&c;f();}
User avatar
Nathan
Member
Member
Posts: 201
Joined: Sun Jul 19, 2009 1:48 pm
Location: Brazil
Contact:

Re: please help me

Post by Nathan »

Another good resources: Read this http://forum.osdev.org/viewtopic.php?f=1&t=6989
Book Recommendations

Thanks!
Post Reply