teach-ict.com logo

THE education site for computer science and ICT

3. Little Man Computer (LMC)

As you now know, a modern CPU may have hundreds of assembly language instructions and every CPU manufucturer has its own instruction set.

Therefore a simplified instruction set has been developed specifically for educational purposes. This is called the Little Man Computer(LMC).

The LMC instructions are the ones that will be used in your exam questions - make sure that you learn them.

The Little Man Computer instruction set consists of only 11 assembly instructions. These are

Mnemonic Instruction
ADD Add
SUB Subtract
STA Store
LDA Load
BRA Branch Always
BRZ Branch if zero
BRP Branch if positive
INP Input
OUT Output
HLT End Program (Halt)
DAT Data location

Some of these will be used to describe how the registers are affected.

The LMC will be discussed in more detail in the 'Types of programming languages' part of the syllabus.

Format of an assembly code instruction

The format of most instructions have two parts: the 'operation code' and the 'operand'. The operation code is normally shortened to 'op code'. The instruction below comes from the little man computer instruction set

op code

The op code is the actual instruction that the CPU will carry out, and the operand is what the op code will be using. In this case it is going to store the content of the accumulator into location 230 in main memory.

 

Challenge see if you can find out one extra fact on this topic that we haven't already told you Click on this link: The Little Man Computer assembly language