Where to start to write OS?
-
- Posts: 2
- Joined: Tue Dec 13, 2016 6:04 am
- Libera.chat IRC: nikitka555
Where to start to write OS?
Hi,my name is Nikita! I'm new. Where to start to write OS on C and assembler.?
I am not catnikita255, do not confuse me and him.
-
- Member
- Posts: 273
- Joined: Sun Oct 09, 2016 4:38 am
- Libera.chat IRC: NunoLava1998
Re: Where to start to write OS?
Welcome to OSDev!Nikitka555 wrote:Hi,my name is Nikita! I'm new. Where to start to write OS on C and assembler.?
You should start on Bare Bones. If you're running Windows and don't feel like making a cross-compiler, use ghost-i686-elf-tools, which works.
Though, you will need some dll's for that.
The zip is too large (600 KB), so i'll upload it on mediafire:
http://www.mediafire.com/file/a5k9nzkb4 ... ll%27s.zip
Developing TRIODIUM OS. Or call it Dixium if you want. It doesn't matter.
https://github.com/NunoLava1998/DixiumOS
https://github.com/NunoLava1998/DixiumOS
Re: Where to start to write OS?
I would start with the Wiki. No, seriously. That's what it is there for.
Every good solution is obvious once you've found it.
Re: Where to start to write OS?
Specifically, I would start by setting up a virtual machine, like VirtualBox.
Then, if you are going to be coding in assembler, I would download NASM, and try to create an OS that simply displays text to the screen when you boot it up in your virtual machine.
If you can get that far, then everything else is just adding more features.
Good luck. Let us know how it goes.
Then, if you are going to be coding in assembler, I would download NASM, and try to create an OS that simply displays text to the screen when you boot it up in your virtual machine.
If you can get that far, then everything else is just adding more features.
Good luck. Let us know how it goes.
Project: OZone
Source: GitHub
Current Task: LIB/OBJ file support
"The more they overthink the plumbing, the easier it is to stop up the drain." - Montgomery Scott
Source: GitHub
Current Task: LIB/OBJ file support
"The more they overthink the plumbing, the easier it is to stop up the drain." - Montgomery Scott
Re: Where to start to write OS?
He's going to write OS in C. I know him and real cause he went there is to get help with setting up cross-compiler on Windows. By the way I don't believe that his project will get more advanced than just a toy
Developing U365.
Source:
only testing: http://gitlab.com/bps-projs/U365/tree/testing
OSDev newbies can copy any code from my repositories, just leave a notice that this code was written by U365 development team, not by you.
Source:
only testing: http://gitlab.com/bps-projs/U365/tree/testing
OSDev newbies can copy any code from my repositories, just leave a notice that this code was written by U365 development team, not by you.
Re: Where to start to write OS?
Given that his next post was to ask "how to write a 'hello world' in C", I implore you, talk him out of OSDev. This is really not the place to start learning your first programming language. That is just setting up for failure and frustration -- not only his frustration, I might add.
Programming should be learned in user space, not by writing kernel startup code.
Programming should be learned in user space, not by writing kernel startup code.
Every good solution is obvious once you've found it.
Re: Where to start to write OS?
Yep, I thought the same when he asked his last question. I'll talk to him.Solar wrote:Given that his next post was to ask "how to write a 'hello world' in C", I implore you, talk him out of OSDev. This is really not the place to start learning your first programming language. That is just setting up for failure and frustration -- not only his frustration, I might add.
Programming should be learned in user space, not by writing kernel startup code.
Developing U365.
Source:
only testing: http://gitlab.com/bps-projs/U365/tree/testing
OSDev newbies can copy any code from my repositories, just leave a notice that this code was written by U365 development team, not by you.
Source:
only testing: http://gitlab.com/bps-projs/U365/tree/testing
OSDev newbies can copy any code from my repositories, just leave a notice that this code was written by U365 development team, not by you.
Re: Where to start to write OS?
Level 1 :
Print hello world boot sector using NASM. Run it.
Level 2 :
Prepare virtual disk. Load other files from your boot sector. Do something from that file.
Level 3 :
Do simple experiment, related to protected mode; GDT, A20, IDT, etc
Level 4 :
Install bootloader, or develop your own bootloader. With protected mode support
Level 5 :
Convert your ASM to C
Print hello world boot sector using NASM. Run it.
Level 2 :
Prepare virtual disk. Load other files from your boot sector. Do something from that file.
Level 3 :
Do simple experiment, related to protected mode; GDT, A20, IDT, etc
Level 4 :
Install bootloader, or develop your own bootloader. With protected mode support
Level 5 :
Convert your ASM to C
-
- Member
- Posts: 27
- Joined: Thu Oct 13, 2016 2:07 pm
Re: Where to start to write OS?
Welcome to the world of OS development!
We encourage you to start OS development.
Start learning DOS assembly first. It's a great way to start! Learn Assembly and the interrupts. That's how I'm learning right now and I understand most of the code I do. YouTube will have nice tutorials. Boot DOS from a floppy or VirtualBox and use MS-DOS DEBUG. Do your research. I don't think C is really good when you're a beginner. Start learning Assembly!
Remember. Use NASM as the assembler. Don't forget that you can't use INT 21 (MS-DOS API) on your OS. You can look on Wikipedia for references. I know things look hard but don't give up. I nearly did but I didn't.
Here's something to get you started:
BITS 16
org 0x7C00
jmp start
Print:
lodsb
cmp al, 0
je Done
mov ah, 0eh
int 10h
jmp Print
Done:
ret
start:
mov si, msg
call Print
msg db 'Hello World!', 0
times 510-($-$$) db 0
dw 0xAA55
Save it as boot.asm (it doesn't have to be boot.asm, you can make it myos.asm
Then, install nasm (search it)
And do:
nasm -f bin boot.asm -o boot.img
Install VirtualBox and create a virtual machine. Then, test it.
We encourage you to start OS development.
Start learning DOS assembly first. It's a great way to start! Learn Assembly and the interrupts. That's how I'm learning right now and I understand most of the code I do. YouTube will have nice tutorials. Boot DOS from a floppy or VirtualBox and use MS-DOS DEBUG. Do your research. I don't think C is really good when you're a beginner. Start learning Assembly!
Remember. Use NASM as the assembler. Don't forget that you can't use INT 21 (MS-DOS API) on your OS. You can look on Wikipedia for references. I know things look hard but don't give up. I nearly did but I didn't.
Here's something to get you started:
BITS 16
org 0x7C00
jmp start
Print:
lodsb
cmp al, 0
je Done
mov ah, 0eh
int 10h
jmp Print
Done:
ret
start:
mov si, msg
call Print
msg db 'Hello World!', 0
times 510-($-$$) db 0
dw 0xAA55
Save it as boot.asm (it doesn't have to be boot.asm, you can make it myos.asm
Then, install nasm (search it)
And do:
nasm -f bin boot.asm -o boot.img
Install VirtualBox and create a virtual machine. Then, test it.
-
- Member
- Posts: 501
- Joined: Wed Jun 17, 2015 9:40 am
- Libera.chat IRC: glauxosdever
- Location: Athens, Greece
Re: Where to start to write OS?
Hi,
Regards,
glauxosdever
DOS assembly isn't really relevant. YouTube tutorials shouldn't be followed, since they can't be community-edited and tend to be made by those who don't know well. Whether C or assembly is better for a beginner, it's debatable, but let's rather not discuss it here.andrewthompson555 wrote:Start learning DOS assembly first. It's a great way to start! Learn Assembly and the interrupts. That's how I'm learning right now and I understand most of the code I do. YouTube will have nice tutorials. Boot DOS from a floppy or VirtualBox and use MS-DOS DEBUG. Do your research. I don't think C is really good when you're a beginner. Start learning Assembly!
There are valid reasons to use another assembler, for example if you use GCC, then it's easier to use GAS since the OS will have less dependencies.andrewthompson555 wrote:Remember. Use NASM as the assembler. Don't forget that you can't use INT 21 (MS-DOS API) on your OS. You can look on Wikipedia for references. I know things look hard but don't give up. I nearly did but I didn't.
I don't think you are qualified to give advice.andrewthompson555 wrote:Here's something to get you started:
BITS 16
org 0x7C00
jmp start
Print:
lodsb
cmp al, 0
je Done
mov ah, 0eh
int 10h
jmp Print
Done:
ret
start:
mov si, msg
call Print
msg db 'Hello World!', 0
times 510-($-$$) db 0
dw 0xAA55
Save it as boot.asm (it doesn't have to be boot.asm, you can make it myos.asm
Then, install nasm (search it)
And do:
nasm -f bin boot.asm -o boot.img
Install VirtualBox and create a virtual machine. Then, test it.
Regards,
glauxosdever