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
-
@xzvf I used to write NASM (when I was 12, so that's 8-ish years ago), so I didn't really have much time to drop this rant (cus I would have to do research again n stuff).
-
JohanO20486yoh btw. compile this and see what happrns :')
#include <iostream>
using namespace std;
int main() {
cout << "Happy Birthday" << endl;
return 0;
} -
wow. what compiler produced this, and what optimizations did you use? dear God!
I'm now thinking of just inlining my simple functions in nasm. this is excessive!
Related Rants
-
agaripian30Got the best cake for my 30th birthday. Only if my wife understood what language I program with. I still love ...
-
GMR51651My girlfriend knows what a coder needs when it’s their birthday. Lucky to have her. Walked into my room and ...
-
Raich11Today my oldest son is 8 years old and with pizza and cake we discussed how to hack his friends tablet, star W...
Hoozay! I'm now starting to become an adult! (or atleast, that's what they expect of me)
myAge:
.long 19
main:
push rbp
mov rbp, rsp
mov eax, DWORD PTR myAge[rip]
add eax, 1
mov DWORD PTR myAge[rip], eax
mov eax, DWORD PTR myAge[rip]
mov esi, eax
mov edi, OFFSET FLAT:_ZSt4cout
call std::basic_ostream<char, std::char_traits<char> >::operator<<(int)
mov eax, 0
pop rbp
ret
__static_initialization_and_destruction_0(int, int):
push rbp
mov rbp, rsp
sub rsp, 16
mov DWORD PTR [rbp-4], edi
mov DWORD PTR [rbp-8], esi
cmp DWORD PTR [rbp-4], 1
jne .L5
cmp DWORD PTR [rbp-8], 65535
jne .L5
mov edi, OFFSET FLAT:_ZStL8__ioinit
call std::ios_base::Init::Init() [complete object constructor]
mov edx, OFFSET FLAT:__dso_handle
mov esi, OFFSET FLAT:_ZStL8__ioinit
mov edi, OFFSET FLAT:_ZNSt8ios_base4InitD1Ev
call __cxa_atexit
.L5:
nop
leave
ret
_GLOBAL__sub_I_myAge:
push rbp
mov rbp, rsp
mov esi, 65535
mov edi, 1
call __static_initialization_and_destruction_0(int, int)
pop rbp
ret
rant
birthday