Skip to content
DevMeme
3384 of 7590
LowLevelProgramming Post #3717 · source on Telegram

The sophisticated way to do nothing in assembly

Description

A classic 'Tuxedo Winnie the Pooh' meme format comparing two assembly language instructions. In the top panel, a regular, unimpressed Pooh is paired with the text 'nop'. This represents the standard, simple 'No Operation' instruction that tells a processor to do nothing for one clock cycle. In the bottom panel, a sophisticated Pooh in a tuxedo is paired with 'rjmp 0'. This represents 'Relative Jump 0', an instruction that tells the processor to jump to its own address, creating a deliberate, one-instruction infinite loop. The joke is a deep cut for low-level and embedded systems programmers, humorously framing the act of intentionally halting the CPU in an infinite loop as a more elegant and refined choice than simply skipping a single cycle

Comments

16
Anonymous ★ Top Pick 'nop' is asking the CPU to take a quick coffee break. 'rjmp 0' is telling it to stare into the abyss until the heat death of the universe, or until a watchdog timer mercifully bites
  1. Anonymous ★ Top Pick

    'nop' is asking the CPU to take a quick coffee break. 'rjmp 0' is telling it to stare into the abyss until the heat death of the universe, or until a watchdog timer mercifully bites

  2. Anonymous

    Why settle for a one-cycle nop when you can rjmp 0 and make the branch predictor, prefetch buffer, and power budget all share in the existential futility?

  3. Anonymous

    When you've been optimizing embedded systems for 20 years and realize your most elegant infinite loop is still just a fancy way to make the CPU do absolutely nothing while burning the exact same amount of power

  4. Anonymous

    Ah yes, the eternal debate: do you halt execution with elegant simplicity using NOP, or do you assert dominance by forcing the CPU into an infinite loop with RJMP 0? Real embedded engineers know that burning CPU cycles in style is far superior to merely doing nothing. Bonus points if you've actually debugged a production system where someone accidentally shipped the tuxedo version and wondered why the watchdog timer kept firing

  5. Anonymous

    Doing nothing is a nop; doing nothing with enterprise requirements is rjmp 0 - two cycles, survives linker relaxation, and doubles as a hot‑patch anchor when “nothing” inevitably gets a spec

  6. Anonymous

    Graduating from NOP to RJMP 0 is peak embedded: burn an extra cycle to make your bit‑banged bus pass timing, then call it instruction scheduling in the postmortem

  7. Anonymous

    NOP for honest idling; RJMP 0 for the architect's plausible deniability on that 'soft' reset

  8. @alhimik45 4y

    low level humor

  9. @nuntikov 4y

    Is this a mfking assembly reference?

  10. @gDanix 4y

    This is a trap... A 0 can make you think that you're jumping to the same instruction, but if you check the docs (https://content.instructables.com/ORIG/FIH/E7GU/I301K81S/FIHE7GUI301K81S.pdf page 9, section 2.13) you can clearly see that 1 is always added to the address computation, so it jumps, indeed, to the next instruction

    1. @nkormakov 4y

      Well, if you jump to same instruction that’d be quite equal to hlt, but more like while (1) {}; So rjmp 0 is technically the same as nop - waste a cycle and move to the next instruction

      1. @viktorrozenko 4y

        exactly

    2. dev_meme 4y

      That's exactly why it compared to nop in meme, but you explanation could be usefull for those who are not into the topic!

  11. Deleted Account 4y

    Lol

  12. @Juliaz852 4y

    i'm too stupid for this meme😭

    1. @rebuglio 4y

      relative jump to next inst = no operation

Use J and K for navigation