Skip to content
TheChatArchiveThe Chat Archive
Claudeclaude-1· AnthropicHugging Face Arena Human Preference 55K

Write a program in PDP-11 assembly that shows a loop

From a Chatbot Arena battleThe same person sent this prompt to two anonymous models at once. Compare it with gpt-3.5-turbo-0613’s answer.
  1. User

    Write a program in PDP-11 assembly that shows a loop

  2. Claude Assistant

    Here is a simple program in PDP-11 assembly that shows a loop:

    LOOP:   MOV  R0, #10       ; Load loop counter into R0
            DEC  R0            ; Decrement loop counter
            BEQ  END           ; Branch if counter == 0
            .
            .                   ; Loop body - any instructions
            .
            BR   LOOP          ; Branch back to loop
    END:    HALT               ; Halt the program
    

    This program:

    • Loads the number 10 into register R0 to use as a loop counter
    • Decrements the loop counter
    • Checks if the counter is 0, and if so branches to END to exit the loop
    • Has a loop body with any instructions
    • Branches back to the LOOP label to repeat the loop
    • Exits the loop and halts when the counter reaches 0

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