this post was submitted on 26 Aug 2023
818 points (91.4% liked)

Programmer Humor

19544 readers
1016 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
 
you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] 29 points 1 year ago (5 children)

Okay, boomer here, be gentle.

So back in the ‘70s I dabbled in programming (now called “coding”, I hear). I only did higher-level languages like Fortran, Cobol, IBM Basic, but a friend had a job (at age 13!) programming in assembler. Is assembler now called assembly, or are they different?

[–] [email protected] 33 points 1 year ago

It's still called programming, coding is the same thing. Assembler more commonly refers to the utility program that converts the assembly code to machine code while assembly refers to the code itself, but the term assembler code is also valid. It's uncommon to simply call the code assembler because it would be easily confused with the utility program.

[–] [email protected] 22 points 1 year ago

Yep, some call it assembly, others call it assembler

[–] [email protected] 17 points 1 year ago (1 children)

(at age 13!)

c/suddenlyfactorial

[–] [email protected] 7 points 1 year ago

Easier to say than "at age 6227020800"

[–] [email protected] 9 points 1 year ago (1 children)

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.)

[–] [email protected] 9 points 1 year ago (1 children)

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"

[–] [email protected] 0 points 1 year ago* (last edited 1 year 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.

[–] [email protected] 1 points 1 year 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...

[–] [email protected] 2 points 1 year ago

I was too young/poor to afford an assembler for my 6502 so I wore out the assembly long hand on a legal pad and then manually converted each operation to machine code.

Needless to say my programs done this way were exceptionally simple, but it’s interesting to understand the underlying code.