Why do people hate it?

Attached: proxy.duckduckgo.com.png (350x350, 79K)

Other urls found in this thread:

jagregory.com/abrash-zen-of-asm/#why-assembly-language
scs.hosted.panopto.com/Panopto/Pages/Sessions/List.aspx#folderID="b96d90ae-9871-4fae-91e2-b1627b43e25e"&maxResults=50
twitter.com/NSFWRedditGif

AutiSM, ironically

why?
it's really fast if you know what you're doing

I meant why people hate it

Because it's not portable, way way more autsitic than c, and you can end up shooting yourself in the foot way worse.

Unless you really really know what you are doing, a compiler will do a better job than you.

Also, it has no use outside of optimizing shit and doing really low level stuff.

I'm just trying to understand tho :(

are you quoting Bjarne?

And yes, optimizing is a blast with .asm

Don't do it user, learning it is mostly a waste of time. This is my last warning.
Even assembly books say that it produces shit non-reusable and non-readable code that will only work once.

Here's a link:
jagregory.com/abrash-zen-of-asm/#why-assembly-language

that's a little too late isn't it?
i've been doing this for years

Attached: proxy.duckduckgo.com.jpg (1280x720, 87K)

Why did you do it user? What do you use it for? Can you code a website with it?

It's useful for reverse engineering

The only machine code I've enjoyed hand rolling was out of the Art of Programming books where you can freely go crazy with self mutating code. So if you have a target architecture, and you get ultimate freedom to directly manipulate it without an OS in the way it can be awesome but in real life it's much less fun, even hand optimizing for the EVM to save on 'gas' was painful and tedious.

I love it.
Learning i8086 asm right now.
github.com/Mark-Weston/8086
then I'll move on to ATmega328P and make something like arduboy.

Optimization, mostly.
Maybe...
Can you?
Please tell me more
Oh...

>Useful
Many different uses these days actually as I alluded here For one, any 'smart contracts'. Need to save 'gas'? Crack open a Don Knuth authored book and rewrite all the algorithms to do so.
Need to target an obscure router or GSM stack with some kind of China CPU and you don't trust the OS? Nuke the OS and have your hand rolled assembly manually control memory. Need HFT and the compiler optimizations aren't good enough? Manually rewrite.

Want to manipulate some proprietary bullshit in order to make it do what you want but you don't want to rewrite the entire program? Link together a bunch of jump commands ie: ROP (Return Oriented Programming). They used ROP for the Spectre attacks IIRC

because they don't undrtstand what it's for

If you're interested in this, CMU has a course for you explaining all the benefits of hand manipulating 'optimized' compiler asm
scs.hosted.panopto.com/Panopto/Pages/Sessions/List.aspx#folderID="b96d90ae-9871-4fae-91e2-b1627b43e25e"&maxResults=50

Watch those lectures and get the book too if you want, libgen.io may have it but I bought the 'international print version' for like $30 off Amazon shipped from Malaysia. Get the 3rd version/64bit version. A whole shitload of optimizations you can do once you understand the so called memory mountain, the principal of locality (caches), ect.

it's pointless these days because gcc will generate faster ASM than you 99% of the time

Well isn't it obvious, you have a binary you want to know what it does, so disassemble and read out the asm

Not entirely true, same goes for LLVM
There's many scenarios where the preference is not to trust compiler optimization for many different reasons. There's also WebASM

Learning Assembly language is the only way you can make your own compiler and OS from scratch, two tasks every self-respecting programmer should strive to achieve in his lifetime.

>There's many scenarios where the preference is not to trust compiler optimization for many different reasons
no there isn't in current year show me fucking examples
that's not to say it's not worth learning the basics of assembly and to understand what the compiler generates but writing manual ASM from scratch is a total waste of time

>waste of time
You don't write from scratch, you manipulate what the compiler has done because often it will take the 'safe' approach and in some situations, you don't want safe, such as a highly optimized matching engine. Everybody knows this it's Compsci Architecture class 101. Not to mention rewriting the entire ASM for obfuscation reasons, for example CodeSurfer by Grammatech. If it (codesurfer) has access to source code, it can instrument the build process, and obtain disassembly that is high quality enough to support rewriting. Using it's scheme API you can modify the CFG (control flow graph) of each procedure directly, serialize the rewritten parts out as nasm, and even relink with the object files you don't have source for. It works with any build system, and supports gcc / as / ld and cl / link. Anybody trying to reverse engineer your binary you can leave literal traps for them.

Depending on the CPU, it is quite fun.
It won't land you a super job, but will entertain you if your actual job is drab as fuck.

Apply to NCC Group or Optiv (whatever they are called these days) if you know even the basic of assembly, guaranteed job. Also apply to any Fintech outfit doing HFT or custom compiler work like Jane Street or Two Sigma or hedge funds in NYC.

>you manipulate what the compiler has done because often it will take the 'safe' approach and in some situations
show me one(1) example
>Anybody trying to reverse engineer your binary you can leave literal traps for them.
LARP: the post lmao

Do your own homework
See It's filled with examples on why you would want to do this, so is the Art of Programming series.

because it kills the brainlet

it's tedious, not particularly difficult
don't flatter yourself too much embedded code monkey is pretty much a blue collar job

I asked for a single fucking example of a scenario, not even code just describe it, should be easy enough given all the experience you pretend to have

Attached: UCyCsrEg0bHNCCJin-AGyrxmZGaw36sGb7zxDsX82rY.jpg (492x550, 43K)

This thread is already filled with examples, go through each post.

>not portable
What are macros and flat binary output.
>way way more autsitic than c
Wanting to understand how things work under the hood and find ways to make efficient code isn't autism.
>and you can end up shooting yourself in the foot way worse
This isn't the 1980's anymore where you're going to be interacting with the hardware at all - unless you're making your own toy OS or one of those odd people who do DOS programming in [current year].
>Also, it has no use outside of optimizing shit and doing really low level stuff
>Also it has no use outside of these really useful stuff every developer should be doing
K

No portability of any kind

This is flat out incorrect when you use macros and/or flat binary output. Pretty much the sky's the limit when it comes to modern assemblers.

Macros? Such as?

Well for Nasm there's the NasmX project. But the idea is you can always make your own to do whatever you want.

I thought nasm itself was portable

Assembly is never faster since the complexity of modern day programs are far outside what humans can optimize. If you inline assemble asm into your code, whatever I guess. It's incredibly niche at best.

It is but NasmX is just a bunch of resources and tools for Nasm to make it more palatable for some people.

>This is flat out incorrect when you use macros
At what point does this not just become something like C

Spectre involves reading secret information, not arbitrary code execution. You can exploit Spectre with high level languages.

Utterly pointless unless you’re doing something that specifically requires it. C was invented so you wouldn’t have to use it. I don’t think people hate it as much as they rightly don’t even think of it.

>it's really fast
Myth.

>what is emulator

Not joking here, there are only 3 possible reasons someone would "hate" it:

1) They are making assumptions, like picturing some faggot trying to program desktop applications in assembly and then basing their entire view of it on that sort of thing

2) Tribal mentality, where they can't handle being ok with things existing that they don't personally use. So if they don't use it then it must be bad.

3) They don't really understand what assembly even is.

It's practically just human readable(ish) mappings into binary. You'd have to be a real moron to think we'd somehow be better off without it.
So yeah, any reason someone could ever have to hate it is either identical or reducible to one of the above 3 reasons.

most assemblers are very poor quality. some architectures have only the shittiest assemblers. try to find an ez80 assembler with features on par with ca65

You can, and do, do it in C or C++

>put a micro controller emulator on a micro controller
surely the fast assembly code will compensate right