Forum > Coding >

When making an operating system, is it okay to embed ASM code into C++ code?

Posts: 123

Threads: 26

Joined: Feb, 2021

Reputation: 3

Posted

title explains it all

  • 0

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

FumbleTwit

Old Account

Posts: 204

Threads: 8

Joined: Jan, 2021

Reputation: 3

Replied

Why would you make a operating system? Just get a job at microsoft bud.

 

We got Mac OS, Windows and Linux.

 

 

  • 0

Old account...

simple_x

milktea

Posts: 331

Threads: 20

Joined: Sep, 2019

Reputation: 4

Replied

@FumbleTwit linux is open source. he can make his own operating system with GNU/Linux
there's also FreeBSD

  • 0

Added

afaik it's probably okay to use asm code within c++
you can use asm within a c++ file

  • 0

 

i own synapse x
biggest idiot in town

discord: nakiri#4485

FumbleTwit

Old Account

Posts: 204

Threads: 8

Joined: Jan, 2021

Reputation: 3

Replied

@simple_x Id apply for a job at microsoft tbh

  • 0

Old account...

Posts: 118

Threads: 2

Joined: Nov, 2020

Reputation: 8

Replied

It largely depends on what the purpose is, inline assembly is highly situational when it comes to the "good practice" model. You shouldn't write assembly unless you really have to, but there's quite a few situations where using inline assembly can actually help you, such as: High-performance algorithm or code section that is more optimized when written in assembly by hand, rather than compiled from C++ to assembly, CPU-specific instructions, compiler unimplemented calling conventions, etc.

 

Microsoft is not a good company to work in, if you want to get a job there in order to learn how to make an operating system, you'll likely be disappointed. If you truly want to learn this skill, it's recommended to get started with GNU/Linux and the various FOSS it has available (Or one of the BSD derivatives).

 

Either that or become schizophrenic and start seeing God.

  • 0

it will no longer be possible to contact me here, but i will be on session for at least a bit :)

0520984e5ed65f84673ff6d3421d89a3b3e1dff2ed54cbd4ed012351789a347913

Posts: 33

Threads: 10

Joined: Jan, 2021

Reputation: 0

Replied

Adding to what texas said, assembly inlining is very situational in C++ and you should avoid it most of the time, as it's all going to be assembly in the end of the day.

If you're making an OS, goodluck as you have to make the entire kernel, filesystem and interface yourself.

  • 0

"Sometimes, giving up is better than trying for hours to achieve nothing."

- Xeon, 2021

To know where you're headed, you must know where you been.
Life is like a pear, except the pear is not real.

0x90

dingleberry#2286

vip

Posts: 223

Threads: 26

Joined: Dec, 2020

Reputation: 27

Replied

Making an OS in present day is completely useless besides trying to learn, you won't get anywhere, but yes it's perfectly fine. What else are you going to do? Be a retard and write out every byte? No, it'll all get assembled the same anyway, but in the end there's no point in trying to make an OS today, you can't compete with major corporations, you can join them though.

  • 0

Posts: 1658

Threads: 10

Joined: Sep, 2020

Reputation: 59

Replied

@Cloudsyy Shut, it's typical for 0x90 

  • 0

Discord : Doctor Doom#0550

Ducxy

solinym

vip

Posts: 564

Threads: 86

Joined: Mar, 2019

Reputation: 37

Replied

@0x90

That's not entirely true.

As a solo developer? Yes, he probably wont make it far.

If he had a multi-developer team then he could probably get it out there and compete with other linux distributions.

  • 0

a mysterious creature from the past

Posts: 123

Threads: 26

Joined: Feb, 2021

Reputation: 3

Replied

@FumbleTwit Mac isn't even an OS

 

(i hope you understand the joke)

  • 0

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

Users viewing this thread:

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