• SpaceNoodle@lemmy.world
    link
    fedilink
    arrow-up
    1
    ·
    6 months ago

    Just yesterday I ran into some chucklehead here on Lemmy that had convinced themselves that the average person would interpret “crypto” to mean SSL rather than cryptocurrency.

  • umbraroze@lemmy.world
    link
    fedilink
    arrow-up
    0
    ·
    6 months ago

    NOP is $EA, of course, and… um…

    …sorry, I’m just a Commodore 64 scrub, I don’t know nothing about this high and mighty Intel 8086 nonsense.

    [looking up]

    …it’s 0x90 on IA-32? WHAT? Someone told me every processor used 0xEA because that was commonly agreed and readily apparent. …guess I was wrong

    • Flying Squid@lemmy.world
      link
      fedilink
      arrow-up
      0
      ·
      6 months ago

      My daughter told me the other day, “I bet I could figure out a Commodore 64 if I had one.”

      Good luck figuring out LOAD “*”,8,1 by yourself, kid.

      • umbraroze@lemmy.world
        link
        fedilink
        arrow-up
        0
        ·
        5 months ago

        Literally every game manual comes with instructions to do LOAD "*",8,1. (oh, did I say “manual”? Instruction card. Yeaaaah, the minimal instuction stuff isn’t new, kids.) Everyone and their dog figured it out. If there was any command anyone knew, it was that. …only to be topped by SHIFT+RUN/STOP for initiating tape load (which you could just do by typing in, you know, LOAD).

        Know what else we did when we were kids? WE ASKED AROUND. If you don’t tell your kid how this thing works, you’re making things worse, to be frank. I mean, if some random kid came up to me and asked how to load a C64 game, I’d give them a goddamn lecture free of charge.

        • Flying Squid@lemmy.world
          link
          fedilink
          arrow-up
          0
          ·
          5 months ago

          She meant she could figure it out just playing around with it, not reading a manual or asking around. I told her she’d have to read a manual.

          • cmfhsu@lemmy.world
            link
            fedilink
            arrow-up
            0
            ·
            5 months ago

            Erm I might be showing my inexperience here.

            Is there no equivalent to man LOAD in the commodore world? Or even just help?

    • A Basil Plant@lemmy.world
      link
      fedilink
      arrow-up
      0
      ·
      edit-2
      6 months ago

      https://en.wikipedia.org/wiki/INT_(x86_instruction) (scroll down to INT3)

      https://stackoverflow.com/a/61946177

      The TL;DR is that it’s used by debuggers to set a breakpoint in code.

      For example, if you’re familiar with gdb, one of the simplest ways to make code stop executing at a particular point in the code is to add a breakpoint there.

      Gdb replaces the instruction at the breakpoint with 0xCC, which happens to be the opcode for INT 3 — generate interrupt 3. The CPU then generates interrupt 3, the kernel’s interrupt handler sends a signal (SIGTRAP) to the debugger, and thus the debugger will know it’s meant to start a debugging loop there.

      • Valmond@lemmy.world
        link
        fedilink
        arrow-up
        0
        ·
        5 months ago

        Hey thank you!

        Not what I thought it was for sure 😃

        How does it work if an instruction gets replaced by the INT3 though?

        • A Basil Plant@lemmy.world
          link
          fedilink
          arrow-up
          0
          ·
          edit-2
          5 months ago

          Excellent question!

          Before replacing the instruction with INT 3, the debugger keeps a note of what instruction was at that point in the code. When the CPU encounters INT 3, it hands control to the debugger.

          When the debugging operations are done, the debugger replaces the INT 3 with the original instruction and makes the instruction pointer go back one step, thereby ensuring that the original instruction is executed.

  • Faresh@lemmy.ml
    link
    fedilink
    English
    arrow-up
    0
    ·
    5 months ago

    Is there any situation where you’d want to remember the opcodes? Disassemblers should give you user-friendly assembly code, without any need to look at the raw numbers. Maybe it’s useful to remember which instructions are pseudo instructions (so you know stuff like jz (jump if zero) being the same as je (jump if equal) making it easier to understand the disassembly), but I don’t think you need to remember the opcode numbers for that.

    • Beetschnapps@lemmy.world
      link
      fedilink
      arrow-up
      0
      ·
      5 months ago

      The important thing is to be important. Engineering has to deal with teammates that don’t have these problems, so they equalize.