106 points

I have programmed by looking up op codes in a table on a sheet of paper and entering the hex codes into an EPROM programmer.

permalink
report
reply
44 points

Did this in university in the very first week, quite a few people dropped out after that 😅

permalink
report
parent
reply
17 points

Ah yes, the great filter

permalink
report
parent
reply
29 points

You are… Old?

permalink
report
parent
reply
26 points

Fucking ancient. This was for a Z80 based system using discreet logic for addressing and IO, constructed on a wire-wrapped board.

permalink
report
parent
reply
4 points

Oh that’s interesting. I started poking around with a Gameboy emulator guide implemented in Python that intended to emulate a Z80. Got any good resource recommendation in case I decide to pick this back up and inevitably get stuck?

permalink
report
parent
reply
2 points

i still have a z80 reference manual on here somewhere

permalink
report
parent
reply
16 points

If you want some modern day fun with this, try the Zachtronics programming games; TIS-100, Shenzhen I/O, and Exapunks.

Or, my personal favorite I only discovered somewhat recently, try Turing Complete. You start by designing all your logic gates from just a negate gate IIRC. You eventually build up an ALU and everything else you need and then create your own computer. Then you define your own assembly language and have to write programs in your assembly language that run on the computer you’ve designed to complete different tasks. It’s a highly underrated game, although it takes a certain type of person to enjoy.

permalink
report
parent
reply
2 points

Another interesting low-level interpreter/emulated system to look into for anyone else trying to get started with this type of thing is the CHIP-8! It’s a pretty basic 8/16-bit instruction set (there are 35 opcodes, the instructions themselves are mostly simple) and there are tons of detailed guides on making one and writing roms for them.

permalink
report
parent
reply
2 points

Turing Complete looks really interesting! How polished is it? Just looked it up and saw it was in early access

permalink
report
parent
reply
2 points

I would say it’s very polished. It does everything you’d expect and has some nice QoL features. There was work on a big update that’d improve performance and things, but the last information about that was from Aug of last year as far as I can tell. That’s not a big deal though. The game works fine without it.

permalink
report
parent
reply
11 points

Ah, memories. That was me on a Spectrum. It’s all fun and games until you forget to save (to tape) and your code hangs the machine, losing everything.

permalink
report
parent
reply
7 points

Did the same in school on a Z80

permalink
report
parent
reply
6 points

When I was young, we didn’t have hex codes, we only had 1 and 0s. One time we where all out of 1s, and I had to code a whole Database system with only 0s!

permalink
report
parent
reply
4 points

Same, and also for the C64 :-)

permalink
report
parent
reply
3 points

You’re a god amongst men around these parts.

permalink
report
parent
reply
72 points
*

I once knew somebody who supposedly thought that ASM was high level.

permalink
report
reply
79 points

ASM is high level. Real programmers use punch cards

permalink
report
parent
reply
78 points

Real programmers use a magnetized needle and a steady hand.

permalink
report
parent
reply
35 points

There’s an emacs-command to do that.

permalink
report
parent
reply
22 points

REAL programmers tap into the electron flow across the CPU and set bits in real time

permalink
report
parent
reply
1 point

Back to the iron ages

permalink
report
parent
reply
44 points

Once met a man who said he loved assembly language because it was so much nicer than punch cards and FORTRAN, but C was OK too.

This was last year. In his defense though, he’s been retired for years, used to work as a professor.

permalink
report
parent
reply
45 points

Wait until you learn about micro ops and processor internals. That somebody isn’t as wrong as you think.

permalink
report
parent
reply
7 points
*

There is no way ASM is high level

permalink
report
parent
reply
44 points

It’s a matter of perspective. To someone who’s job is to write the system which interprets ASM, ASM is high level

permalink
report
parent
reply
1 point

It’s higher than machine code. It’s degrees of highness. Any abstraction technically makes it high level.

permalink
report
parent
reply
3 points

I would argue they don’t know what that means really. Assembly is pretty much a mapping of words to machine code. It’s just a way to make machine code easier to read. It doesn’t actually change how it works.

A compiler re-arranges and modifies things so what you write isn’t the same as the final program that is created. With assembly it is. It’s not really an abstraction, but a translation. It doesn’t move you further from the machine, it only makes it so you’re speaking the same language.

permalink
report
parent
reply
47 points

I am once again asking programmers to explain the joke

permalink
report
reply
64 points

C was originally created as a “high-level” language, being more abstract (aka high-level) than the other languages at the time. But now it’s basically considered very slightly more abstract than machine code when compared to the much higher level high-level languages we have today.

permalink
report
parent
reply
26 points

Other way around, actually; C was one of several languages proposed to model UNIX without having to write assembly on every line, and has steadily increased in abstraction. Today, C is specified relative to a high-level abstract machine and doesn’t really resemble any modern processing units’ capabilities.

Incidentally, coming to understand this is precisely what the OP meme is about.

permalink
report
parent
reply
4 points

I’d say much more highly abstracted than necessarily better (I know plenty of people who despise js and wouldn’t call it better).

permalink
report
parent
reply
30 points
*

To add on to @azdle@news.idlestate.org 's comment, “High Level” in terms of programming languages means further away from how the computer processes things and “Low Level” means very similar to how machines process things. For example, binary and hexadecimal (16 bit) machine code such as “assembly language” are both low level.

Imagine if program interpreters were building blocks, then 6 layers of abstraction would be very tall or higher level.

permalink
report
parent
reply
5 points

This is pedantic, but assembly languages get “assembled” to machine code. This is somewhat similar to higher level languages being “compiled,” which eventually becomes assembly which gets assembled. The major reason why these are different is because a compiler changes the structure of the code. Assembly is a direct mapping to instructions. It just converts the text into machine code directly, which is why it’s easy to go from machine code to assembly but decompiling doesn’t give you identical results to the original source code.

Also, binary and hexadecimal are just different ways to view the same binary data and aren’t different things. There is only “machine code” which is a type of binary data but you can view binary with any arbitrary base, though obviously powers of 2 work better.

permalink
report
parent
reply
4 points

Assembly is a direct mapping to instructions. It just converts the text into machine code directly,

Kinda… yes and no? At least with x86 there’s still things like encoding selection going on, there’s not a 1:1 mapping between assembly syntax and opcodes.

Also assemblers, at least those meant for human consumption (mostly nasm nowadays) tend to have powerful macro systems. That’s not assembly as such, of course.

But I think your “a compiler changes the structure of the code” thing is spot-on, an assembler will not reorder instructions, it won’t do dead code elimination, but I think it’s not really out of scope of an assembler to be able to do those things – compilers weren’t doing them for the longest time, either.

I think a clearer division would be that compilers deal with two sets of semantics: That of the source language, and that of the CPU. The CPU semantics don’t say things like “result after overflow is undefined”, that’s C speaking, and compilers can use those differences to do all kind of shennanigans. With assemblers there’s no such translation between different language semantics, it’s always the CPU semantics.

permalink
report
parent
reply
-4 points
Removed by mod
permalink
report
parent
reply
13 points

When I learnt programming (back in early 2000s) the textbook said C is a high level 3rd generation language with 4th gen languages being something higher (I don’t remember what examples were given specifically). This is back when the java applets and action script for flash were the hot things. How I miss the days without the world being cursed by JS.

permalink
report
reply
4 points

I think C was 2nd, 3. is Java and Python, 4 SQL and 5th would be some hypothetical AI instruction language?

permalink
report
parent
reply
2 points

1st level is direct binary code as was done with punch cards. Assembly language is a 2nd level language. C is a level above, thus it’s level 3.

permalink
report
parent
reply
2 points

Ah, thanks! Right, binary was one too.

permalink
report
parent
reply
1 point

When the gp’s book says that C is a third generation language: I would guess the first generation is Fortran and the second generation contains ALGOL and BCPL. C was heavily influenced by BCPL. (get it? C comes after B)

permalink
report
parent
reply
1 point

I think we mean different kinds of “generations”.

permalink
report
parent
reply
0 points

SQL has been around since the 1970s

permalink
report
parent
reply
6 points

That doesn’t mean it’s not higher level than other languages from more recent times.

permalink
report
parent
reply
3 points

Level means level of abstraction. Right?

permalink
report
parent
reply
1 point

Java applets and flash were an absolute security nightmare of the highest degree.

You were just running applications on your computer.

If you had to download and run an application on your computer to view a website now people would lose their minds (and rightly so)

permalink
report
parent
reply
12 points

I mean, C is a high level language? Now, sure, C isn’t a super expressive language and every C statement compiles to very few assembly instructions comparatively speaking, but it has a whole lot of stuff that assembly doesn’t have. Like nice loops and other control structures and such, and not worry about which processor registers are used.

permalink
report
reply
-2 points

Guess what, assembly is also a high level language, lol.

permalink
report
parent
reply

Programmer Humor

!programmer_humor@programming.dev

Create post

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

  • Keep content in english
  • No advertisements
  • Posts must be related to programming or programmer topics

Community stats

  • 9.4K

    Monthly active users

  • 861

    Posts

  • 33K

    Comments