ARM Assembly Flashcards

0.0(0)
studied byStudied by 0 people
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
Card Sorting

1/26

flashcard set

Earn XP

Description and Tags

Flashcards about ARM Assembly - Arithmetic and Logical Operators

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

27 Terms

1
New cards

What is the most basic unit of computer processing?

An instruction.

2
New cards

What is Instruction Set Architecture (ISA)?

ISA defines the low-level instructions that a specific processor can execute. It is the vocabulary of machine code understood by the processor.

3
New cards

What are the two representations of computer language?

Machine language (computer-readable) and Assembly language (human-readable).

4
New cards

In the instruction ADD r0, r0, r1, what are r0 and r1?

Source registers.

5
New cards

In the instruction ADD r0, r0, r1, what is the first r0?

Destination register.

6
New cards

Which registers are lower registers?

R0-R7

7
New cards

Which registers are higher registers?

R8-R12

8
New cards

What is R13?

Stack Pointer (SP)

9
New cards

What is R14?

Link Register (LR)

10
New cards

What is R15?

Program Counter (PC)

11
New cards

What is CPSR?

Current Program Status Register

12
New cards

What is the purpose of the 'mov' instruction?

To copy data between registers or set an immediate value to a register.

13
New cards

What does the instruction 'mov r1, r2' do?

Copies the value of r2 into r1.

14
New cards

What does the instruction 'mov r1, #77' do?

Sets r1 to the value 77.

15
New cards

What does the 'add' instruction do?

Adds the values of two registers.

16
New cards

What does the 'sub' instruction do?

Subtracts the values of two registers.

17
New cards

What is the range of numbers represented by a 32-bit two's complement?

-2147483648 to +2147483647

18
New cards

How do you obtain the negative of a number in two's complement?

Flip the bits and add 1.

19
New cards

What is the purpose of the Current Program Status Register (CPSR)?

Records the state of the program, including arithmetic side-effects.

20
New cards

What are the key flags in CPSR?

N (negative), Z (zero), C (carry), and V (overflow).

21
New cards

What are the uses of bit shifting?

To manage individual bits in a register and for fast multiplication/division with powers of 2.

22
New cards

List the types of bit shifts

ASR (arithmetic-shift-right), LSL (logical-shift-left), LSR (logical-shift-right), and ROR (right-rotation).

23
New cards

What are the logical operators in ARM?

AND, EOR (xor), ORR, BIC.

24
New cards

What does BIC do?

Rn = Rd & ~Rm

25
New cards

How are constants represented in assembly?

Prepended with the symbol # and interpreted as a signed integer.

26
New cards

What values can mov load to registers?

Values between 0x00000000 to 0x0000FFFF

27
New cards

What is movt?

movt can load 16-bit values into the upper 16 bits of a register (lower 16-bits remain the same).