LMC Branching – Instructions To Implement Decisions

GCSE Computer Science Resources
14-16 Years Old

48 modules covering every Computer Science topic needed for GCSE level, and each module contains:

  • An editable PowerPoint lesson presentation
  • Editable revision handouts
  • A glossary which covers the key terminologies of the module
  • Topic mindmaps for visualising the key concepts
  • Printable flashcards to help students engage active recall and confidence-based repetition
  • A quiz with accompanying answer key to test knowledge and understanding of the module
View the GCSE Resources →

KS3 Computing Resources
11-14 Years Old

We’ve created 45 modules covering every Computer Science topic needed for KS3 level, and each module contains:

  • An editable PowerPoint lesson presentation
  • Editable revision handouts
  • A glossary which covers the key terminologies of the module
  • Topic mindmaps for visualising the key concepts
  • Printable flashcards to help students engage active recall and confidence-based repetition
  • A quiz with accompanying answer key to test knowledge and understanding of the module
View the KS3 Resources →

The following program will demonstrate the use of the three branch instructions: BRZ, BRP and BRA.

Running the program: INPUT a number and the program will OUTPUT a sequence of numbers, starting at 1 and finishing with the INPUT number. The program will continue until a 0 is entered.

start LDA zero
STA count
INP
BRZ finish
STA maxNumber
loopTop LDA count
ADD step
STA count
OUT
SUB maxNumber
BRP endLoop
BRA loopTop
endLoop BRA . . .

This content is restricted to subscribers