• Agent_Karyo@piefed.worldM
    link
    fedilink
    English
    arrow-up
    4
    ·
    2 months ago

    Is assembly code really comparable to vacuum tubes? Maybe it’s because I work with video, but usage of assembly is still a thing in performance critical Codec code.

    P.S. I think machine code is a step below assembly. I could be wrong though.

    • addie@feddit.uk
      link
      fedilink
      English
      arrow-up
      3
      ·
      2 months ago

      Assembly is the ‘human-readable’ version. It has mnemonic values for the opcodes, so you can write eg. RET to return from a subroutine rather than the machine code 0xC3 / 195. It also lets you write named labels for offsets in the code which are substituted for their number values during assembly, which saves a lot of tedious counting, and macros, which are expanded into a longer list of instructions, saving lots of copy-paste.

      So yeah, machine code is a step down. Not a big step down, there’s pretty much a 1:1 conversion between either form, but assembly has a couple of niceties that make it much easier for humans to work with.