Signed up recently but had issues with the confirmation email?
Click Forgot password and follow the reset steps. You can choose the same password you used when you signed up. This should then provide access.
Remember to check Spam and Junk. The email will be from auth@progressbytes.co.uk.
Assembly language (including following and writing simple programs with the Little Man Computer instruction set). See appendix 5d
1.2.4 Types of Programming Language
Practise exam questionsTypes of Programming Language — Note 3 of 5
Candidates need to have an understanding of the purpose and need for assembly language. They need to be familiar with the instructions given in Appendix 5d. They should be able to read, write, trace and amend programs written in the Little Man Computer language.
Assembly language uses short mnemonics to represent machine code instructions. The Little Man Computer (LMC) is a simplified model used to learn assembly language. You need to be able to read, trace, write and amend simple LMC programs.
ADD (add the value at an address to the accumulator), SUB (subtract), STA (store the accumulator in an address), LDA (load from an address into the accumulator).BRA (branch always), BRZ (branch if the accumulator is zero), BRP (branch if the accumulator is zero or positive).INP (input into the accumulator), OUT (output the accumulator), HLT (stop), DAT (label a memory location for data, with an optional starting value).loop or count.INP, LDA, ADD, SUB. Instructions that can change the program counter: BRA, BRZ, BRP (a branch that is taken puts the label's address in the PC).LDA the first, SUB the second, then branch on the result: BRP if the first is greater than or equal to the second, BRZ if they are equal. INP
STA first
INP
ADD first
OUT
HLT
first DAT INP
STA count
loop LDA count
OUT
BRZ end
SUB one
STA count
BRA loop
end HLT
count DAT
one DAT 1A low-level language that uses mnemonics (e.g. ADD, LDA) to represent machine code instructions. Each instruction usually translates to one machine code instruction.
STO, LOAD, BR, BZ, BP, IN, INPUT, COB and END are accepted, in any case. Label names must match the case used in the question.HLT or branch back: a program that outputs the right value but runs on and outputs another loses the mark.BRP branches when the accumulator is ZERO as well as positive.ADD to update a running total or counter and then moving on. ADD changes only the accumulator. Follow it with STA to save the new value, or the next INP or LDA overwrites it.DAT lines before HLT. Data lines go after the program, otherwise they will be executed as instructions. Every label you use for data needs its own DAT line.Past exam questions
Ready to test yourself?
Practise 1.2.4 questions