LDA & STA Instructions – LMC Load and Save

46 Computer Science Topics

We’ve created 46 modules covering every Computer Science topic needed for GCSE level. These are transferable across AQA, CIE, Edexcel, CIE & Internationally. Suitable for teachers or home educators alike.

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 demonstrate the use of LDA and STA, the Load and Save instructions used in the .

Running the program: when prompted, INPUT a set of two numbers. The program should then OUTPUT them in the same order that they were entered.

INP
STA first
INP
STA second
LDA first
OUT
LDA second
OUT
HLT
first DAT
second DAT
0 INP
1 STA 9
2 INP
3 STA 10
4 LDA 9
5 OUT
6 LDA 10
7 OUT
8 HLT
9 . . .

This content is restricted to subscribers