this post was submitted on 26 Aug 2023
808 points (91.5% liked)

Programmer Humor

22950 readers
981 users here now

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

founded 2 years ago
MODERATORS
 
you are viewing a single comment's thread
view the rest of the comments
[โ€“] amki@feddit.de 0 points 2 years ago* (last edited 2 years ago) (1 children)

A compiler and an assembler do wildly different things though. An assembler simply replaces mnemonics while a compiler transfers instructions to a whole other language.

[โ€“] Malfeasant@lemm.ee 1 points 2 years ago

Depends on the language, really... C maps pretty closely to assembly language, it's not as simple as one mnemonic to one machine code byte, more like tokens get mapped to sequences of machine code, a function call translates to some code that sets up a stack frame, a return tears it down...