← IGCSE Computer Science Paper 1

Direct manipulation of hardware

Low-level code can work directly with hardware, such as registers and memory locations, which high-level languages usually hide from the programmer.

Understanding Direct manipulation of hardware in IGCSE Computer Science Paper 1

What it does: MOV AX, 5 places the value 5 straight into the AX register. A high-level language would just use a variable and let the translator pick the register. This statement uses a variable name only. The translator decides which registers and memory locations are used, so the programmer has no direct control over them. High-level languages hide these hardware details. Managing them by hand is what low-level programming involves.

Common mistakes: STO writes the ACC register to a memory address, so it needs the plain address 300. The # sign means a fixed number, which is not a memory location. It should be STO 300. ADD #501 adds the number 501 itself. The comment says to add the value stored at address 501, so the line must use the address: ADD 501.

Class: _____________________  ·  Name: _____________________  ·  Date: _________

Free printable worksheet with full answer key — or add this module to a class and your students practise it interactively.

This module's key terms are also in a printable crossword (Modules 419–429) and word search (Modules 419–439).

Take this worksheet further — free with Cloodit

Each concept is reinforced from every angle — learned, then applied, then tested.

Learning
Duo
Which type of language lets a programmer work directly with registers and memory locations?
Low-level languageHigh-level language
Matches
A programmer writes in Python to choose exactly which register stores a value in a device driver.
↓
Python is a high-level language that hides registers, so it does not give this direct control. Assembly or another low-level language should be used.
Applying
Meanings
Term
direct hardware control
Meaning
Low-level code can work directly with hardware, such as registers and memory locations, which high-level languages usually hide from the programmer.
Practice
LDA 200
Testing
Gaps
200 ; load from memory address 200
Check Answer
Spots
2ADD #3 // add 3 to ACC
3STO #300 // to address 300

Cloodit turns curriculum-aligned coding content into journeys students work through one biome at a time.

The 'Narwhal' badge — Unicorn Coder, one of Cloodit's 106 collectible badges
Students earn collectable badges

Over 100 of them, across seven natural biomes.

Study Buddy
Students build a real study resource

Turns their work into revision material ready for Flash Cards and Exam study.

Diamond Dash — one of Cloodit's live, competitive Sprint games
Students lock in with Sprints

Live, competitive practice for the start of the lesson or a teacher-led lesson finisher.

A Cloodit certificate of achievement, ready to personalise and print
Custom printable certificates

Honour your top performers, or encourage a student who's trying hard — ready to print in seconds.

Quick Questions

1. Which type of language lets a programmer work directly with registers and memory locations?
A. Low-level language ✓
B. High-level language
Low-level languages give direct control of hardware parts such as registers and memory. High-level languages usually hide these details.
2. A programmer wants to choose exactly which memory location stores a value. Which is more suitable?
A. Assembly language ✓
B. A high-level language such as Python
Assembly language can refer to specific memory addresses. High-level languages usually let the translator decide where data is stored.
3. Which statement about high-level languages is correct?
A. They give the programmer less direct control of the hardware ✓
B. They let the programmer choose which register holds each value
High-level languages hide hardware details such as registers, so the programmer has less direct control.
4. Which program is most likely to be written in a low-level language?
A. A quiz game that stores scores in a list
B. A device driver that talks to a printer ✓
Device drivers need to control hardware directly, so low-level code is often used. A simple quiz game does not need this.
5. Why might an embedded system, such as a washing machine controller, use low-level code?
A. It hides the hardware so the code is easier to write
B. It can control the hardware directly and use little memory ✓
Embedded systems often have limited memory and need direct hardware control. Hiding hardware is a feature of high-level languages.

Match the Pairs

LDA 200 → Loads the value stored at memory location 200 into the accumulator register
STA 305 → Stores the value in the accumulator register into memory location 305
Low-level code lets the programmer choose which register holds a value → MOV AX, 5
High-level languages hide registers and memory addresses, giving less direct control → total = price + tax
A programmer writes in Python to choose exactly which register stores a value in a device driver. → Python is a high-level language that hides registers, so it does not give this direct control. Assembly or another low-level language should be used.
Low-level languages hide memory locations from the programmer so they never have to think about them. → This is the wrong way round. Low-level languages let the programmer work with memory locations directly, while high-level languages hide them.

Key Term

direct hardware control
Low-level code can work directly with hardware, such as registers and memory locations, which high-level languages usually hide from the programmer.

Fill in the Blanks

1. LDA 200 ; load from memory address 200
Hint: Type the mnemonic that copies a value from a memory location into the accumulator.
2. LDA 200 STA 300 ; copy accumulator to address 300
Hint: Type the mnemonic that stores the accumulator's value into a memory location.
3. MOV R1, 5 ; put 5 into register 1
Hint: Type the name of the register that the comment says receives the value.
4. LDA 200 ; load first number ADD 201 ; add second number STA 202 ; save result in memory
Hint: Type the mnemonic that adds the value at the memory location to the accumulator.
5. IN ; read from the keyboard STA 200 ; store in memory OUT ; send to the display
Hint: Type the mnemonic that sends the accumulator's value to an output device.

Spot the Error

Question 1
A LDM #5 // put 5 in ACC
B ADD #3 // add 3 to ACC
C STO #300 // to address 300
D END
Line C — STO writes the ACC register to a memory address, so it needs the plain address 300. The # sign means a fixed number, which is not a memory location. It should be STO 300.
Question 2
A LDD 500 // read sensor at 500
B ADD #501 // add value at 501
C STO 502 // save at 502
D END
Line B — ADD #501 adds the number 501 itself. The comment says to add the value stored at address 501, so the line must use the address: ADD 501.
Question 3
A IN // key into ACC
B STO 100 // store key at 100
C LDM 100 // load key from 100
D OUT // show the character
Line C — LDM loads the number 100 into the register. To load the key stored at memory address 100, the program needs LDD 100.
Question 4
A LDM #1 // 1 means ON
B STO 900 // heater port
C LDM #0 // 0 means OFF
D LDM 901 // fan port
E END
Line D — This line should write the 0 in ACC to the fan port at address 901 to switch the fan off. LDM only loads a value and does not write to memory. It should be STO 901.
Question 5
A STO 250 // read counter
B ADD #1 // add 1
C STO 250 // write it back
D END
Line A — The first line must read the counter from address 250 into the ACC register. STO does the opposite and writes ACC into memory. It should be LDD 250.

Student with a class code? Join your class →