![]() It may seem like extra work to learn two variations but the benefits certainly make it worth it – firstly you can use the LMC simulator as mentioned, and secondly by studying the differences and similarities you will deepen your understanding of the whole topic. START INPĬonverting between LMC instructions and the Cambridge 9608 instructions is fairly straightforward once you are confident with the more basic LMC version. To see this in action, look at the code below. We have JMP instead of BZA for unconditional jumping, but then we have JPE and JPN for jumping based on the result of a previous CMP (comparison). The Cambridge 9608 version uses an alternative system for branching. This LMC program accepts input until 0 is entered: START INP The difference is more significant in the next example. Make teaching or learning LMC a cinch with this complete and lovingly compiled(!) Little Man Computer Programming Teaching Pack for Computer Science GCSE and A Level.Īs you can see, the only differences are trivial variations in spelling. The above code in the Cambridge 9608 instruction set (see image below) looks like this: IN If it’s too difficult to understand at this stage, come back when you’ve studied the basics of LMC a bit more. ![]() If the above code looks daunting, try running it in the LMC simulator and see if you can follow what is happening. This article is not about learning LMC per se – I have covered that in other articles. So start with the LMC instructions, which look like this:Īn example program, say for adding two numbers, looks like this: INP The LMC instruction set is simpler to the one used in the Cambridge A Level Computer Science 9608 syllabus, but it is similar enough to make a great first step, and you also have the benefit of the animation and visualisation tools from the simulator. The best way to learn about low-level programming is to do it! (At least an emulated version of it using a tool such as the fantastic Little Man Computer simulator available here.) ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |