ununit 3 Assembly - High-level Constructs Flashcards

1
Q

What are the logical operations included in ARM Assemby?

A

AND, ORR, EOR(XOR), BIC(Bit clear), and MVN(move and Not)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

how do logical operations work?

A

each operates bitwise on two sources and writes the result to a destination register. 1st source is always a register and the second is either an immediate or another register.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

how does the MVN logical operation work?

A

it performs a bitwise NOT on the second source and writes the result to the destination register

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

what does BIC R6, R1, R2 compute?

A

R1 and NOT R2. The bits that are asserted in R2 are cleared. The top two bytes of R1 are cleared or masked, and the unmasked bottom two bytes of R1, are placed in R6.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

which part of a register bit can be masked?

A

any subset

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

the ORR instruction is useful for?

A

combining bitfields from two registers

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

how would ORR combine 0x347A0000, 0x000072FC ?

A

0x347A0000 ORR 0x000072FC = 0x347A72FC

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

what does a shift instruction do?

A

shifts the value in a register left or right, dropping bits off the end.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

what does a rotate instruction do?

A

rotates the value in a register right by by up to 31 bits

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

shift and rotate are both?

A

shift operations

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

left shifts always fill the least significant bit with?

A

0’s

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

right shift can be either?

A

logical shift 0’s into the most significant bits or arithmetic shift sign bits into the most significant bits

How well did you know this?
1
Not at all
2
3
4
5
Perfectly