Skip to content
TheChatArchiveThe Chat Archive
Claudeclaude-sonnet-4-20250514-thinking-32k· AnthropicHugging Face LMArena Human Preference 140K

Lea is good, but want to save lea for the last instruction as a foil to xlat.

From a Chatbot Arena battleThe same person sent this prompt to two anonymous models at once. Compare it with Metallama-4-scout-17b-16e-instruct’s answer.
  1. User

    Lea is good, but want to save lea for the last instruction as a foil to xlat.

  2. Claude Assistant

    Ah, clever structure! XLAT and LEA as bookends makes perfect sense.

    For #2, I'd go with AAM/AAD (ASCII Adjust after Multiply/Divide).

    This hits all your criteria beautifully:

    Historical: These come straight from the 8080's BCD calculator heritage. Intel literally designed them for pocket calculator firmware where you'd multiply two decimal digits and need to "fix up" the result back into proper BCD format.

    Novelty: They're completely removed in 64-bit mode - you literally cannot execute them on modern x86-64. Yet they were documented instructions for decades.

    Performance quirk: AAM has a hidden superpower - it's actually a general-purpose divide-by-N instruction in disguise. The "magic" 0x0A byte that follows AAM? You can change it to any value.

    ; "Official" use - convert binary to BCD
    mov al, 23
    aam           ; AL = 3, AH = 2 (23 = 2*10 + 3)
    
    ; Secret use - divide by anything
    mov al, 100
    db 0xD4, 7    ; AAM with divisor 7 instead of 10
                  ; AL = 2, AH = 14 (100 = 14*7 + 2)
    

    Why it's perfect after XLAT: XLAT shows x86's string/table heritage, AAM shows its calculator heritage. Both are "helper instructions" that modern code rarely needs, but they reveal how x86 grew from very specific use cases.

    Plus there's great visual potential - you can show old HP calculator manuals alongside 8086 docs, or demonstrate how changing that 0x0A byte turns AAM into a secret modulo operation.

    The transition writes itself: "From table lookups to calculator arithmetic..."

Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.