Unit 3 Flashcards
The vocabulary of commands understood by a given architecture
Instruction set
The idea that instructions and data of many types can be stored in memory as numbers and thus be easy to change, leading to the stored-program computer.
Stored-program concept
The sum of b and c is placed in a
ADD a, b, c
Similarly to the add instruction, blank computes b - c and puts the result in a
SUB a, b, c
C, or Java, or Legv8 - requires most lines of source code
Legv8
C, or Java, or Legv8 - requires 2nd most lines of source code
C
C, or Java, or Legv8 - requires least lines of source code
Java
LEGv8 operands how many fast data registers
32 registers X0…X30, XZR
LEGv8 operands how many memory doublewords
262 memory doublewords Memory[0], Memory [4], …, Memory[4,611,686,018,427,387,904]
assembly language for X1 = X2 + X3
ADD X1, X2, X3
assembly language X1 = X2 - X3
SUB X1, X2, X3
assembly language X1 = X2 + 20
ADDI X1, X2, 20
assembly language X1 = X2 - 20
SUBI X1, X2, 20
assembly language X1 = Memory[X2 + 40]
LDUR X1, [X2, 40]
assembly language Memory[X2 + 40] = X1
STUR X1, [X2, 40]
assembly language X1 = X2 & X3
AND X1, X2, X3
assembly language X1 = X2 | X3
ORR X1, X2, X3
assembly language X1 = X2 ^ X3
EOR X1, X2, X3
assembly language if (X1 == 0) go to PC + 4 + 100
CBZ X1, 25
assembly language if (X1 != 0) go to PC + 4 + 100
CBNZ X1, 25
assembly language if (condition true) go to PC + 4 + 100
B.cond 25
assembly language go to PC + 4 + 10000
B 2500
assembly language go to X30
BR X30
assembly language X30 = PC + 4; PC + 4 + 10000
BL 2500