you are viewing a single comment's thread
view the rest of the comments
[–] 5 points 1 year ago (5 children)

the other day I needed to read some assembly and decompiled C

As one casually does lol Jokes aside, that's pretty cool. I wish I had the technical know-how and, most importantly, the patience for it.

  • source
  • parent
  • hideshow 5 child comments
  • [–] 9 points 1 year ago* (last edited 1 year ago) (3 children)

    Assembly is very simple (at least RISC-V assembly is which I mostly work with) but also very tedious to read. It doesn't help that the people who choose the instruction mnemonics have extremely poor taste - e.g. lb, lh, lw, ld instead of load8, load16, load32, load64. Or j instead of jump. Who needs to save characters that much?

    The over-abbreviation is some kind of weird flaw that hardware guys all have. I wondered if it comes from labelling pins on PCB silkscreens (MISO, CLK etc)... Or maybe they just have bad taste.

    I once worked on a chip that had nested acronyms.

  • source
  • parent
  • hideshow 3 child comments
  • [–] 8 points 1 year ago

    The over-abbreviation is some kind of weird flaw that hardware guys all have

    My bet is on the teaching methods in uni. From what I've seen, older teaching methods use terrible variable names for a production environment. I think it unfortunately sticks because students get used to it and find it easier & faster than typing things out.

  • source
  • parent
  • [–] 6 points 1 year ago (1 child)

    Who needs to save characters that much?

    Do you realize how old assembly language is?

    It predates hard disks by ten years and coincided with the invention of the transistor.

  • source
  • parent
  • hideshow 1 child comment
  • [–] 3 points 1 year ago

    Do you realize how old assembly language is?

    Do you? These instructions were created in 2011.

    It predates hard disks by ten years and coincided with the invention of the transistor.

    I'm not sure what the very first assembly language has to do with RISC-V assembly?

  • source
  • parent
  • [–] 8 points 1 year ago

    If you're interested in getting into it, download Ghidra and open an older program/game in it that you like. The decompiler is pretty amazing imo, so you rarely have to look at the assembly. But it also cross-references them so you can look at the decompiled C Code and the associated assembly. It's pretty fun 😊

  • source
  • parent