LMC Implementing Decisions

Teach any GCSE Computer Science class

We have put together a full GCSE Computer Science curriculum that will give you all the teaching materials you need to teach any topic.

Whether you’re a brand new Computer Science teacher, or you’ve been teaching ICT for years, our resources will save you hours and hours of lesson preparation every single week.

View the resources →

The following program will show the use of the BRP and BRA branch instructions in making decisions within a program.

Running the program: when prompted, INPUT two numbers and the program will OUTPUT the biggest number of the two.

INP
STA first
INP
STA second
SUB first
BRP secondBig
LDA first
OUT
BRA endProgram
secondBig LDA second
OUT
endProgram HLT
first DAT
second DAT
0 INP
1 STA 12
2 INP
3 STA 13
4 SUB 12
5 BRP 9
6 LDA 12
7 OUT
8 . . .

This content is restricted to subscribers