0% found this document useful (0 votes)
138 views

AQA - Assembly Language Mnemonics Commands

This document discusses basic machine code operations and assembly language instructions. It describes operations like load, add, subtract, store, branching, compare, and logical and shift operations. It provides examples of typical mnemonics and instructions for data transfer, arithmetic, branch, compare, and logical operations in assembly language using immediate and direct addressing. Operands can be interpreted as either a decimal value or a register value.

Uploaded by

Sinjini Sarkar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
138 views

AQA - Assembly Language Mnemonics Commands

This document discusses basic machine code operations and assembly language instructions. It describes operations like load, add, subtract, store, branching, compare, and logical and shift operations. It provides examples of typical mnemonics and instructions for data transfer, arithmetic, branch, compare, and logical operations in assembly language using immediate and direct addressing. Operands can be interpreted as either a decimal value or a register value.

Uploaded by

Sinjini Sarkar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 1

Internal computer architecture

Understand and apply the basic machine-code operations of: • load • add • subtract • store • branching (conditional and unconditional) •
compare • logical bitwise operators (AND, OR, NOT, XOR) • logical • shift right • shift left • halt.
Use the basic machine-code operations above when machine-code instructions are expressed in mnemonic form- assembly language, using
immediate and direct addressing

Typical mnemonics for data transfer, arithmetic, branch and compare instructions:

Mnemonic Instruction

HALT End program (Halt)


ADD Rd, Rn <operand> Add the value specified in <operand> to the value in register n and store the
result in register d
SUB Rd, Rn <operand> Subtract the value in operand from the value in register n and store the result
in register d
STR Rd, <memory ref> Store the value that is in register d into memory location <memory ref>
LDR Rd, <memory ref> Load the value stored in memory location <memory ref> into register d
B <label> Always branch to the instruction at position <label> in the program
BEQ <label> Conditionally branch to the instruction at position <label> in the program if
equal to
BNE <label> Conditionally branch to the instruction at position <label> in the program if
not equal to
BGT <label> Conditionally branch to the instruction at position <label> in the program if
greater than
BLT <label> Conditionally branch to the instruction at position <label> in the program if
less than
MOV Rd, <operand> Copy the value specified in <operand> into register d
CMP Rn, <operand> Compare the value store in register n with the value specified in <operand>

Assembly language instructions for logical operations:

Mnemonic Instruction

AND Rd, Rn, <operand> Perform a bitwise logical AND operation between the value in register n and
the value specified by <operand>, store the result in register d
ORR Rd, Rn, <operand> Perform a bitwise logical OR operation between the value in register n and the
value specified by <operand>, store the result in register d
EOR Rd, Rn <operand> Perform a bitwise logical XOR operation between the value in register n and
the value specified by <operand>, store the result in register d
MVN Rd <operand> Perform a bitwise logical NOT operation on the value specified by <operand>,
store the result in register d
LSL Rd, Rn <operand> Logically shift left the value stored in register n by the number of bits specified
by <operand>, store the result in d
LSR Rd, Rn <operand> Logically shift right the value stored in register n by the number of bits
specified by <operand>, store the result in d
HALT End program (Halt)

<operand> can be interpreted in two different ways, depending on whether the first symbol is a # or
an R:

 # - use the decimal value specified after the #, e.g. #38 means use the decimal number 38
 Rn - use the value stored in register n e.g R7 means use the value stored in register 7

You might also like