• @amki@feddit.de
    link
    fedilink
    0
    edit-2
    10 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
      link
      fedilink
      110 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…