817
you are viewing a single comment's thread
view the rest of the comments
[-] Thwompthwomp@lemmy.world 9 points 11 months ago

I thought that the assembler is a specific program that translates mnemonics into the corresponding machine code. Perhaps in early computing this was done by hand so a person was the assembler (and worked in assembler), but now that is handled by software (and supports various macros). So programming in assembly would generate a stream of text that must be assembled by an assembler. (Although I have heard people refer to programming in assembler as well, just not often.)

[-] lhamil64@programming.dev 9 points 11 months ago

I hear people say "program in assembler" but IMO that's wrong. I'd say you write the code in "assembly language" (or better yet, the actual architecture you're using like "x86 assembly") but you "assemble" it with an "assembler". Kind of like how you could write a program in the "C language" and "compile" it with a "compiler"

[-] amki@feddit.de 0 points 11 months ago* (last edited 11 months ago)

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 11 months 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...

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

Programmer Humor

18890 readers
549 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 1 year ago
MODERATORS