Skip to main content

Assembly Language Programming

Downloaded: 152

Last edit: 08 July 2022

English Key Stage 16-18 Years (KS5)
Curriculum Topic Algorithmic Thinking, Data & Information, Programming
Resource Type Lessons, Worksheets and Activities, Schemes of Work (Programming Units and Curriculum), References, Guidebooks and Handbooks

This resource forms part of the Computer Science from the Metal Up series. This resource is written specifically for pupils studying A-level Computer Science, especially the AQA specification.

The book takes a hands-on practical approach, where the pupil learns assembly language programming through a series of guided development projects, each one resulting in a program of some interest. (A program that finds the largest of three numbers – a typical example from other A-level textbooks – is just not interesting!)

Both Student and Teacher versions are available (the latter including model answers to all exercises, and further ‘Teacher notes’).

There is also a simple Electronic Answer Document allowing pupils to record answers for checking by the teacher, if desired. The book makes use of ARMlite, a brand-new online simulator. Both the book and the simulator are the result of a two-year collaboration with Peter Higginson, known to many for his earlier LMC and ‘AQA’ simulators.

As with my Functional Programming book, a teacher might reasonably ask how they can justify working through an entire book on a topic that constitutes just a small part of the syllabus.

My response is similar.

The book comprises two parts:

  • Book I (4 chapters) is designed to cover the complete requirements of the AQA assembly language programming. In fact, the specification is covered entirely by Chapters 1- 3, but Chapter 4 – building a Hangman game – applies everything learned thus far to an enjoyable project.
  • Book II covers more advanced techniques, including indirect/indexed addressing (it’s crazy that this is not on the AQA spec - when it is on OCR), subroutines, and interrupts. These allow pupils to write far more interesting programs. Book II ends, in Chapter 8, with the development of a complete Snake game. The latter is based on my earlier, and very popular, Snake resource, although the code has been completely re-written to demonstrate more principles, and is now developed in fewer iterations.

Learning these few more advanced techniques also strongly reinforces pupils’ understanding of other aspects of the syllabus including processor architecture and operation, high-level programming, and data structures. There are therefore several options for how the book might be used in practice:

  • Work through Ch 1-3 with the whole class, with perhaps Ch 4 as a homework exercise.
  • Offer Book II to pupils who need, or want, more of a challenge
  • Use a selected sub-set of the chapters and/or exercises, particularly if you think that your pupils will find the earlier chapters too pedestrian.
  • Stick with a more traditional teaching approach, but use this book to further your own understanding of Assembly Language as a teacher, if you feel you could benefit from this.

NEA projects

One of the major motivations, for both Peter and me, behind the design of ARMlite and the writing of this book, is to encourage some pupils to consider undertaking their NEA project in assembly language, using ARMlite. I have experience of one pupil doing this, and I will say just a little about this …

The pupil wanted to write what I would call a ‘shoot-em-up’ style game using the Unity game engine. I was not keen for any of my pupils to use Unity – though it is allowed – but this pupil in particular, because I believed that he would expend all his energies on game design, with little opportunity to demonstrate higher technical skills. I persuaded him, instead, to attempt a ‘1970s style arcade game, written from scratch in assembly language. Though he was not one of the more advanced programmers in the year, he engaged with the assembly language task with considerable interest, and had to spend all his time solving interesting technical challenges, rather than designing complex game scenarios. I think that more pupils might benefit from a similar steer.

Feedback & errors

I am grateful to several teachers on this forum who gave feedback on a draft of the book - they are acknowledged in the front of the book. If you find further errors, please report them to me - no matter how large or small - and I will undertake to release a corrected version promptly, with an acknowledgement of your help.

Please also feel free to post general feedback on the book, here.

To give feedback or report errors relating to the ARMlite simulator please see that resource.