Forum > General >

[How to make your own OS] #1 Booting up!

Posts: 123

Threads: 26

Joined: Feb, 2021

Reputation: 3

Posted

Before you say anything, this is just for a hobby. Theres really no purpose of making your own OS, but 

 

Since there's no forum for C and ASM, I'm just going to post it here.

 

Before you start, you will need NASM 

Anyways, lets start.

 

First of all, you need the bootsector.

 

1. Make a file named bootsector.asm

2. Open it up

 

Now, you will want to add the following code to bootsector.asm:

times 510-($-$$) db 0

dw 0xaa55

The 'times 510-($-$$) db 0', fills the memory with zeroes.

Why is it 510 instead of 512?

 

The last two numbers (or bytes) in the memory ('dw 0xaa55'), tell BIOS that this code is a boot sector.

 

The code I showed you above, would look like the following code if it was assembled:

00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 55 aa

Now, we will add some code that will run a function in C.

 

loop:
	;we will later add some code here in part 2
	jmp loop

The loop: part just defines a function called loop. The jmp loop simply runs the function named loop.

 

To build and assemble the bootsector, we will simply run 'nasm bootsector.asm -o os.bin' on command prompt

Section #2 coming soon!

 

  • 0

Contribute to Express, an open-source ROBLOX exploit written fully in C.

WhiteCat

Paradox#8032

Posts: 230

Threads: 18

Joined: Dec, 2020

Reputation: 1

Replied

Move this into C++, thanks

  • 0

C# and JavaScript | Learning C++

Join [Cyrup]

Ducxy

solinym

vip

Posts: 564

Threads: 86

Joined: Mar, 2019

Reputation: 37

Replied

@WhiteCat

It's not C++.

I'd put it in Discussion.

  • 0

a mysterious creature from the past

Posts: 123

Threads: 26

Joined: Feb, 2021

Reputation: 3

Replied

@Ducxy They should make a forum for ASM tho

 

cuz when making a custom DLL you need to search through roblox's ASM code for addresses in IDA

  • 0

Contribute to Express, an open-source ROBLOX exploit written fully in C.

Ducxy

solinym

vip

Posts: 564

Threads: 86

Joined: Mar, 2019

Reputation: 37

Replied

@Laxion

Same. This will help me when writing virtual machines to know how to properly handle different parts of OSes

  • 0

a mysterious creature from the past

Posts: 123

Threads: 26

Joined: Feb, 2021

Reputation: 3

Replied

@Ducxy Should I do a custom linux distro tutorial after i teach how 2 make os

  • 0

Contribute to Express, an open-source ROBLOX exploit written fully in C.

Ducxy

solinym

vip

Posts: 564

Threads: 86

Joined: Mar, 2019

Reputation: 37

Replied

  • 0

a mysterious creature from the past

Posts: 0

Threads: 0

Joined: ?

Reputation:

Replied

Hah ez
https://github.com/CosmosOS/Cosmos

 

Jk nice tutorial.

  • 0

Posts: 123

Threads: 26

Joined: Feb, 2021

Reputation: 3

Replied

@63568 Yeah but cosmos isn't the true way most operating systems are made. With ASM, you can make up to operating systems like windows, or other linux distros.

 

EDIT: But yes, cosmos would be cool.

  • 0

Contribute to Express, an open-source ROBLOX exploit written fully in C.

Posts: 0

Threads: 0

Joined: ?

Reputation:

Replied

@lilbiden69 Yes yes definitely.

  • 0

Posts: 37

Threads: 20

Joined: Oct, 2020

Reputation: 0

Replied

Ok i am know how to make my own os

  • 0

Cosima is a exploit gonna protect you from roblox ban wave keep blow your mind 

we will bring more things blow up your mind crazy

 

Users viewing this thread:

( Members: 0, Guests: 0, Total: 0 )