Jump to content

Can Anyone Program in Machine Code

xiej

Is it possible? More importantly, how many frames per second would you get in Crysis 3 if it was programmed in machine code.

Any PSU is modular if you try hard enough....

Link to comment
Share on other sites

Link to post
Share on other sites

It will take you centuries to program programs as big as Crysis, and I don't think it will help much.

If you want to reply back to me or someone else USE THE QUOTE BUTTON!                                                      
Pascal laptops guide

Link to comment
Share on other sites

Link to post
Share on other sites

Why would you want to?
And if the FPS thing wasn't a joke I'm guessing at least 1.5X if the guy knows his stuff.

Link to comment
Share on other sites

Link to post
Share on other sites

Is it possible? More importantly, how many frames per second would you get in Crysis 3 if it was programmed in machine code.

Probably not.
 
There is an argument that knowing machine code will help you understand what the machine is doing in more detail. But so would knowing how the transistors work and nobody suggests you need to know semiconductor physics to be a good programmer!
 
Having some idea what the code is doing and what operations, such as copying memory or accessing a disk,  is useful - but you can know these without being fluent in machine code. There was also an argument that machine code helps you debug a stack dump - but modern compilers can produce some very odd optimised code which is almost impossible to understand.
 
If you want to understand machine code for the pure joy of it - then there are a number of synthetic assemblers, or at least more modern CPU designs which are cleaner than x86.

Did my post help you? Then make sure to rate it!

Check out my post on symbolic links! || PSU ranking and tiers || Pokemon Thread

 

Link to comment
Share on other sites

Link to post
Share on other sites

YES!  -Comic Sans Because this is funny!

*Sets it to comic sans, hits bold italic underline strike subscript and superscript*

YES!

My rig: Intel Core i7-8700K OC 4.8 | NZXT Kraken X62 | ASUS Z370-F | 16 GB Trident Z RGB 3000 (2x8) | EVGA 1070 SC | EVGA SuperNova NEX650G1 | NZXT H700 | Samsung 250GB 850-EVO | 2x 2TB Seagate Barracuda HDDs 

Link to comment
Share on other sites

Link to post
Share on other sites

Can you program in machine code, of course. Is it practical? Hell no. It would be insane if not impossible for a human to program something like that in machine code. If true AI existed then it'd be possible but in the meantime, high level languages and APIs are the way to go.

Mein Führer... I CAN WALK !!

Link to comment
Share on other sites

Link to post
Share on other sites

You can...Wouldn't be the least bit useful though. Your performance would most likely drop since a human would be sloppy with programming the processor directly. You would also lose optimizations that a compiler would make. 

CPU: Intel i7 - 5820k @ 4.5GHz, Cooler: Corsair H80i, Motherboard: MSI X99S Gaming 7, RAM: Corsair Vengeance LPX 32GB DDR4 2666MHz CL16,

GPU: ASUS GTX 980 Strix, Case: Corsair 900D, PSU: Corsair AX860i 860W, Keyboard: Logitech G19, Mouse: Corsair M95, Storage: Intel 730 Series 480GB SSD, WD 1.5TB Black

Display: BenQ XL2730Z 2560x1440 144Hz

Link to comment
Share on other sites

Link to post
Share on other sites

You can...Wouldn't be the least bit useful though. Your performance would most likely drop since a human would be sloppy with programming the processor directly. You would also lose optimizations that a compiler would make. 

The amount of bugs.....would be TOO DAMN HIGH

CPU: AMD FX-6300 4GHz @ 1.3 volts | CPU Cooler: Cooler Master Hyper 212 EVO | RAM: 8GB DDR3

Motherboard: Gigabyte 970A-DS3P | GPU: EVGA GTX 960 SSC | SSD: 250GB Samsung 850 EVO

HDD: 1TB WD Caviar Green | Case: Fractal Design Core 2500 | OS: Windows 10 Home

Link to comment
Share on other sites

Link to post
Share on other sites

In theory yes it's possible, in practice, no way.

Also your second question, how much FPS would you get? Way less! Although this may seem counter intuitive, compilers are actually better at writing machine code than humans. A compiler is better at optimizing code than any human.

There is still programming being done in assembler (which directly translates to machine code), but that is mostly for micro controllers.

Link to comment
Share on other sites

Link to post
Share on other sites

Oh god. Assembly is hard enough to program in, it's hella useful to know, not so useful to use in 99.99% of cases. Machine code is even worse, you don't even have any abstraction layers going on for coding and interfacing with other software, nothing would be human readable, bug fixing would be near impossible, you then can forget about OS compatibility, with different Windows/Linux/etc versions, maybe even updates in some cases! Hardware compatibility would be even a bigger nightmare, heck, might as well have a single hardware setup and no OS at all at this point, because all interfaces will be compiler generated, not meant for humans to figure out and use directly.

 

TL;DR: Coding something like Crysis in machine code would be like humanity going back to the stone age and starting all over... Abstraction layers are there for a reason, if they would not be there, we would still probably use MSDOS or something.

Link to comment
Share on other sites

Link to post
Share on other sites

You can...Wouldn't be the least bit useful though. Your performance would most likely drop since a human would be sloppy with programming the processor directly. You would also lose optimizations that a compiler would make. 

So it would have better performance, but only if you give an AI the job, and it produces perfect code.

Any PSU is modular if you try hard enough....

Link to comment
Share on other sites

Link to post
Share on other sites

The closest thing that anyone actually uses is assembly code, which is pretty close.

Pro Tip: don't use flash when taking pictures of your build; use a longer exposure instead. Prop up your camera with something (preferably a tripod) if necessary.

if you use retarded/autistic/etc to mean stupid please gtfo

Link to comment
Share on other sites

Link to post
Share on other sites

So it would have better performance, but only if you give an AI the job, and it produces perfect code.

Maybe. This is more or less like coding in a assembly but much more unforgiving. Its easy enough to code in assembly but you're not guaranteed a performance increase by using a lower level language. You can produce C/C++ or C# code that executes much faster than assembly code that does the same task. This is true for most languages. 

CPU: Intel i7 - 5820k @ 4.5GHz, Cooler: Corsair H80i, Motherboard: MSI X99S Gaming 7, RAM: Corsair Vengeance LPX 32GB DDR4 2666MHz CL16,

GPU: ASUS GTX 980 Strix, Case: Corsair 900D, PSU: Corsair AX860i 860W, Keyboard: Logitech G19, Mouse: Corsair M95, Storage: Intel 730 Series 480GB SSD, WD 1.5TB Black

Display: BenQ XL2730Z 2560x1440 144Hz

Link to comment
Share on other sites

Link to post
Share on other sites

Is it possible? More importantly, how many frames per second would you get in Crysis 3 if it was programmed in machine code.

It's possible to write in machine code but it's not worth it to convert an modern game over to it; nor is it possible to go single-handedly.

You're better off just upgrading your rig if it's not already meeting or exceeding the recommended system requirements.

 

Even if you do manage to convert Crysis 3 to machine code and overcome the many many problems with doing that successfully, you'll likely spend much more trying to convert it than you will just upgrading your rig.

 

If your motive isn't just to increase FPS, you'd be better off converting something like Quake 2 or 3 to machine code; or optimizing it.

My procrastination is the bane of my existence.

I make games and stuff in my spare time.

 

 

Link to comment
Share on other sites

Link to post
Share on other sites

It's possible to write in machine code but it's not worth it to convert an modern game over to it; nor is it possible to go single-handedly.

You're better off just upgrading your rig if it's not already meeting or exceeding the recommended system requirements.

 

Even if you do manage to convert Crysis 3 to machine code and overcome the many many problems with doing that successfully, you'll likely spend much more trying to convert it than you will just upgrading your rig.

 

If your motive isn't just to increase FPS, you'd be better off converting something like Quake 2 or 3 to machine code; or optimizing it.

I didn't actually plan to do it  :)

Any PSU is modular if you try hard enough....

Link to comment
Share on other sites

Link to post
Share on other sites

the 'old' rule of thumb is to get the project working with as high level language as you can stand. Look for the bottlenecks, where the function is too slow, then code that function in Assembly (not machine code).

 

Any more than that is asking for a long project.

Link to comment
Share on other sites

Link to post
Share on other sites

Is it possible? More importantly, how many frames per second would you get in Crysis 3 if it was programmed in machine code.

 

assembly is closest programing language to machine code. there is OS that is 1.4 MB needs 8 MB RAM and can be run from floppy and it's written in assembly.

it took 10 years to make this OS i think ~10 people were working on that.

now imagine if you wanted make crysis 3 using only assemply. LOL

actually if you managed to write it perfectly it will be super fast. i think FPS will be 3x-4x or better compared to this shit we have.

Computer users fall into two groups:
those that do backups
those that have never had a hard drive fail.

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×