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
-
ddephor44477yreturn c - '0';
It's more comprehensible, but still lacks some checks for correct decimal values and it implies decimal number system -
Snob20877yI really learned about ASCII when we had to do our first project in Assembly... We hat to create a Ceasars Cipher - encryptor in M68K Assembly. That shit is awesome
-
b3b340667y@wholl0p i actually just had a look at x64 asm. Sadly I cannot learn it by converting small c programs into asm because there's a big ton of shit going on so I need to learn it by tuts :(
-
b3b340667y@wholl0p a simple 5 lines of "Hello World" gave me 180 lines of asm, mostly some external stuff for the linker of whatever. I've been searching for 20h and it didn't find anything. So I guess my text is being printed by some shit I cannot find. But I'll continue learning :)
-
b3b340667y@wholl0p lol I just ran gcc again to convert my c code into asm in elementaryOS instead of centOS and it outputs asm I'm way more familiar with. Both using the same version of gcc. Wtf
-
@b3b3 Compiler Explorer is exactly what you want: it compiled C++ to asm, and shows you the net compiled code minus the crud, plus shows which line compiled to which assembly commands.
https://godbolt.org -
b3b340667y@configurator Thanks! I'll have a closer look at it tomorrow. Its 4am and I spent the last 20 hours playing around with my fresh arch install
-
b3b340667y@wholl0p wo ist der Unterschied? C(++) wird doch assemled, gelinked und weiß der Himmel noch. Warum kommt dann beim Übersetzen von zB printf() nicht int 21h raus?
So in my class the teacher wanted us to write a little program (not going into further details) and therefore we needed to convert chars from a string to integers.
My classmates are starting like:
if (c = '0')
return 0;
else if (.....
And so on. I was just like duuuuuh wtf are u doing? I was actually screaming when I had a look at my neighbours screen.
I personally am like "return c - 48;"
undefined