The Learning Corner

Machine code from zero · 16 chapters

The Dragon's processor does not understand BASIC. It only understands numbers. In this course you learn to speak its own language, machine code, from the very first step: what memory is, how a letter appears on the screen, loops, keys and movement. At the end you build a whole game: a basket that catches falling apples.

The course is for kids, teens and adults, including people who never wrote a line of code. Each chapter is short, with drawings, a window that runs the program line by line, questions and puzzles. You can stop anywhere: the browser remembers which chapters you finished.

Every program was checked on the site's Dragon machine. And in the last chapters one button sends your program to the machine, where it runs just like in 1982.

Don't know BASIC yet? You can start with the BASIC lessons, but you don't have to.

Know a little already? In the Assembler you write machine code freely: every 6809 command, running in the page and sending to the machine. And there is a video lesson on the assembler inside the Dragon.

Start: chapter 0 →

The chapters

  1. 0What is a computer? A street of housesAbout 10 minutes · no code at all
  2. 1The screen is memoryAbout 15 minutes · still no code
  3. 2The first commands: LDA and STAAbout 20 minutes · just two commands
  4. 3The odometer: counting like the computerAbout 20 minutes · no new commands
  5. 4Colour squares: four lampsAbout 20 minutes · and at the end: why 255
  6. 5With # or withoutAbout 20 minutes · LDA learns to read
  7. 6Sums: the drawer learns to countAbout 25 minutes · INCA, DECA, ADDA, SUBA, CLRA, INC, DEC
  8. 7The finger XAbout 25 minutes · LDX, ,X, ,X+, LEAX
  9. 8Crossroads: compare and turnAbout 30 minutes · CMPA, BEQ, BNE, BRA, BLO, BHS, CMPX
  10. 9A race track: loopsAbout 25 minutes · New drawer: B
  11. 10Keys: the Dragon listensAbout 20 minutes · The fixed ending, all the way
  12. 11Movement: a cartoonAbout 25 minutes · Erase, move, draw, wait
  13. 12Subroutines: go, and come backAbout 25 minutes · JSR, RTS and the pile of plates
  14. 13The program lives on the streetAbout 20 minutes · words turn into numbers
  15. 14The project: a “Catch” gameAbout 40 minutes · five stages
  16. 15To the real machineAbout 20 minutes · a button, a tape, a machine

A hobbyist tribute project, not affiliated with or endorsed by Dragon Data. The course, drawings and text are our own. Every program in the course was checked on the site's Dragon machine (XRoar running the BASIC we wrote).