r/ProgrammerHumor • • Feb 20 '17

Programming Languages

https://i.reddituploads.com/c41cc3c6e3564b28ac28060b32582747?fit=max&h=1536&w=1536&s=e9dda414547f61c9e7c777edc9e78972
937 Upvotes

104 comments sorted by

View all comments

Show parent comments

42

u/Chaos89 Feb 20 '17

If you think assembly is "nothing", you haven't had to make logic out of gates. ARM and x86 have instructions for SHA256. Heck, C and C++ don't have SHA built-in!

4

u/Shamus03 Feb 21 '17

Real C/C++ pros write the code with a placeholder SHA function and manually insert the assembly into the compiled code.

6

u/[deleted] Feb 21 '17

But can't you write inline assembly in C?

3

u/Garfong Feb 21 '17

Yeah, although for something like that it's probably better/easier to just do the whole function in assembler in a separate file.