Presentation is loading. Please wait.

Presentation is loading. Please wait.

Processor Instructions set. Learning Objectives

Similar presentations


Presentation on theme: "Processor Instructions set. Learning Objectives"— Presentation transcript:

1 Processor Instructions set. Learning Objectives
Learn how to use mnemonics to write code using assembly language. Learn the difference between immediate and direct addressing Learn how to use different types of operation codes: Data transfer, arithmetic operation, logical bitwise operations and branch operations.

2 Processor Instruction Set
Different types of instruction set with different mnemonics CISC (Complex instruction set) RISC (Reduced instruction set) cmp r1, #10 Compare the value in register 1 with the value 10 cmp R1, #10 OPCODE OPERAND # = Addressing Mode

3 Processor Instruction Set
OPCODE Mnemonic – style and type determined by the instruction set Example: CMP, ADD, MOV, LDA Bits are allocated for opcode, operand and addressing mode Example – 32 Bit (12 – opcode / 4 – Addressing mode / 16 – Operand)

4 Processor Instruction Set
Addressing Direct addressing This is whereby a memory address is provided where the data can be obtained. LDR r1, 100 ‘load data stored in address 100 into the register Immediate Addresssing. This is whereby an actual value is provided rather than a memory address MOV r1, #10 ‘move the value 10 into the register

5 Processor Instruction Set
Operation codes Data transfer operations Moves data between registers and main memory MOV, STR,LDR (Move, Store, Load) Arithmetic operations Opcodes that do basic arithmetic such as subtract, Add, increment, decrement, negate, compare and shift ADD, SUB, CMP, LSL, LSR etc.. Logical Operations Performs the logical operations – AND, OR, NOT, XOR Each bit of the data is compared during the operation Used to compare values and calculate them. AND, ORR, EOR, MVN

6 Processor Instruction Set
Operation codes Branch Operations Allows a program to branch to another memory address – thereby a different part of the program after evaluating a condition. Or they can branch unconditionally. B – Branch always BNE – Branch if not Equal BEQ – Branch if equal BGT – Branch if greater than BLT – Branch if less than A label then follows the opcode BGT Alabel

7 Processor Instruction Set
Task Use the LMC to write a division program that takes in two numbers and outputs both the answer and the remainder.


Download ppt "Processor Instructions set. Learning Objectives"

Similar presentations


Ads by Google