Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
@SukMikeHok it really is, specially considering that a compiler will always create better assembler
-
operand716y@SukMikeHok well actually no, it has been fun, at least I know how the variables values are saved into the ram
-
Enrich176yI had ASM in college and it was somewhat interesting because you get to know how does things work on low level but practically I never used it outside of college.
-
@SukMikeHok no, it isn't.
1) learning assembly will make you a better C programmer because you'll have a better guess what assembly the compiler is likely to create on the target CPU.
2) you'll gain a better understanding of C because C is, tongue in cheek, the best portable macro assembler ever.
3) wherever C is too high level, you still need assembly.
4) when you are unsure whether the compiler actually spits out what you want, you need to read the disassembly. While compiler bugs are not really likely, subtle code bugs are. -
Some knowledge of the c calling convention might help you.
Assembly is really fun. -
Is you are a Linux person, try writing with the at&t syntax and use GAS as your assembler. Things start to make more sense when you don't have to deal with window's weirdness.
Also att syntax makes more sense. -
@AleCx04 Knowing assembly is very useful for optimization reasons. Especially for languages like C++ where one can inline handwritten assembly into the "normal" code. V8, for instance, has a bunch of handwritten Assembly for the various architectures they Support.
Inlining assembly in c++ is the perfect storm of high-level abstractions and low-level optimizations. And not a waste of life. -
@Batburger i can see what you mean my dude. I should have stated that it was a waste in my case.
I started learning ASM x86_64, so I chose MASM with VS 2013 because is the best for debugging
So I just waste like 2 hours trying to make a simple program like printing fibonacci numbers to start with ASM
The problem started when using printf function, after calling printf function, local vars became garbage, after googling and looking for the ultimate answer for the problem I found the site with the ultimate answer (https://cs.uaf.edu/2017/fall/...) and it was that MASM64 when calling a function you must allocate space with the actual space from the current function + the allocated space for the printf
devrant
vs 2013
masm64