id: 1
title: Meet the Registers
subtitle: The robot's memory slots
description: Learn the MOV instruction to load values into registers

tutorial:
  - title: What is a register?
    text: >
      The CPU is the brain of the computer, and **registers** are the tiny drawers
      right next to it — the fastest storage there is! Our machine has 8 registers:
      **R0** through **R7**.
  - title: The MOV instruction
    text: >
      `MOV` puts a number into a register. Numbers are prefixed with **#** to mark
      them as immediate values:
    code: |
      MOV R0, #42    ; put 42 into R0
      MOV R1, #100   ; put 100 into R1
  - title: The XHLT instruction
    text: >
      Every program ends with `XHLT` (halt = stop) to tell the machine "we're done!"
    code: |
      MOV R0, #42
      XHLT

goal: Put the number **42** into the **R0** register

initialState: {}

testCases:
  - init: {}
    expected:
      registers:
        R0: 42

hints:
  - "MOV format: MOV register, #number"
  - "Try: MOV R0, #???"
  - "Answer: MOV R0, #42 then XHLT"

starThresholds: [2, 3, 5]

starterCode: |
  ; Put 42 into the R0 register
  ; Tip: prefix numbers with #


  XHLT

showMemory: false
