LightMySky

Assembly Language and the Instruction Set

The instructions a processor actually offers: load, store, add, compare, branch, halt, each naming a register or an address. A line of high-level code turns into several of them.

No account needed. Progress saves in this browser.

What a learner can do afterwards

  • Hand-run a short assembly listing and give the final register and memory contents
  • Write a counting loop using compare and branch instructions
  • Translate one line of high-level code into the instructions it needs

1 · Read

Assembly language is machine code in readable form. Each line names one basic processor operation, such as load, store, add, compare, branch or halt, and names the register or address it works on. Registers are tiny, very fast storage slots inside the processor that hold the values currently being worked on.

Try it together

To add the numbers 1 to 5, a register holds the running total and a second register holds the counter. An add raises the total, the counter steps up, a compare tests it against the limit, and a branch jumps back to repeat until the test says stop. Compare sets flag bits describing the result, and branch reads those flags to decide whether to jump.

Hand running means tracking every register, flag and changed memory cell line by line until the end, then reporting the final contents. Go slowly and update your table after each single line, because one skipped update poisons everything below it.

One line of high level code turns into several instructions. The single line hides steps like loading values into registers, computing, and storing results back, which assembly spells out one by one. That is why short programs become long listings.

Each line does one small job on registers, loops compare and branch back, and one high level line hides many steps.

2 · Watch

Take it off screen

Print a worksheetA4 with an answer key page for grown-ups. No screen, no internet.

Where it sits

Then practise

8 questions wait behind this lesson, each with its answer explained. Every answer feeds the sky: stars light as they are learned, and dim when it is time to come back.

Spotted a problem on this page? Tell us
Assembly Language and the Instruction Set · Computing, ages 16 to 18 · LightMySky