Difference between revisions of "Instructions"

From TRCCompSci - AQA Computer Science
Jump to: navigation, search
(Created page with "=Overview= https://www.youtube.com/watch?v=2h3hQCV3YcE&index=117&list=PLCiOXwirraUDUYF_qDYcZV8Hce8dsE_Ho https://www.youtube.com/watch?v=2h3hQCV3YcE&index=117&list=PLCiOXwir...")
 
(Overview)
 
(3 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
=Overview=
 
=Overview=
 +
An instruction can be split into 2 parts, the command to use and the data to use for the command.
  
https://www.youtube.com/watch?v=2h3hQCV3YcE&index=117&list=PLCiOXwirraUDUYF_qDYcZV8Hce8dsE_Ho
+
<youtube>https://www.youtube.com/watch?v=2h3hQCV3YcE&index=117&list=PLCiOXwirraUDUYF_qDYcZV8Hce8dsE_Ho</youtube>
  
 
https://www.youtube.com/watch?v=2h3hQCV3YcE&index=117&list=PLCiOXwirraUDUYF_qDYcZV8Hce8dsE_Ho
 
https://www.youtube.com/watch?v=2h3hQCV3YcE&index=117&list=PLCiOXwirraUDUYF_qDYcZV8Hce8dsE_Ho
Line 12: Line 13:
  
 
The data to be used by the OpCode, this can be data eg #21 (ie the number 21) or it can be an address eg 21 (ie memory location 21)
 
The data to be used by the OpCode, this can be data eg #21 (ie the number 21) or it can be an address eg 21 (ie memory location 21)
 +
 +
=Instruction Set=
 +
Different architectures have a different set of available instructions. For example portable devices tend to use ARM embedded architecture, which has an instruction set similar to the assembly language syntax used by AQA. 32bit Windows/Linux machines use the X86 architecture and instruction set were as 64bit Windows/Linux machines use the X64 architecture and instruction set.
 +
 +
=Addressing=
 +
<youtube>https://www.youtube.com/watch?v=yKNrFfVdu3g&list=PLCiOXwirraUDUYF_qDYcZV8Hce8dsE_Ho&index=120</youtube>
 +
 +
https://www.youtube.com/watch?v=yKNrFfVdu3g&list=PLCiOXwirraUDUYF_qDYcZV8Hce8dsE_Ho&index=120
  
 
===Immediate Addressing===
 
===Immediate Addressing===
Line 18: Line 27:
 
===Direct Addressing===
 
===Direct Addressing===
 
The operand is a location eg 21
 
The operand is a location eg 21
 +
 +
===Indirect Addressing - not in AQA Specification===
 +
The operand is a location which contains the location for the instruction
 +
 +
===Index Addressing - not in AQA Specification===
 +
The operand is the number in the Index Regisiter after the location in the instruction

Latest revision as of 09:53, 11 June 2018

Overview

An instruction can be split into 2 parts, the command to use and the data to use for the command.

https://www.youtube.com/watch?v=2h3hQCV3YcE&index=117&list=PLCiOXwirraUDUYF_qDYcZV8Hce8dsE_Ho

OpCode

The command for the instruction, ie Load, Store, Add

Operand

The data to be used by the OpCode, this can be data eg #21 (ie the number 21) or it can be an address eg 21 (ie memory location 21)

Instruction Set

Different architectures have a different set of available instructions. For example portable devices tend to use ARM embedded architecture, which has an instruction set similar to the assembly language syntax used by AQA. 32bit Windows/Linux machines use the X86 architecture and instruction set were as 64bit Windows/Linux machines use the X64 architecture and instruction set.

Addressing

https://www.youtube.com/watch?v=yKNrFfVdu3g&list=PLCiOXwirraUDUYF_qDYcZV8Hce8dsE_Ho&index=120

Immediate Addressing

The operand is data eg #21

Direct Addressing

The operand is a location eg 21

Indirect Addressing - not in AQA Specification

The operand is a location which contains the location for the instruction

Index Addressing - not in AQA Specification

The operand is the number in the Index Regisiter after the location in the instruction