Stack
a range of consecutive memory locations set aside for temporarily storing and retrieving
data bytes
SP
R13
Stack point grows from ____ addresses to ____ addresses
high, low
Stack is ____ in _____ out
last, first
_____ and _____ are instructions used to load and retrieve data from the stack
PUSH, POP
PUSH {R1}
SUB R13, #4
STR R1, [R13]
POP {R1}
LDR R1, [R13]
ADD R13, #4
subroutine return instruction
BX LR
subroutine call instruction
BL subroutine
CMP R0, #7
BLS next
R0 > 7
CMP R0, #7
BLO next
R0 >= 7
CMP R0, #7
BHS next
R0 < 7
CMP R0, #7
BHI next
R0 <= 7
BLS, BLO, BHS, BHI are _______ conditional structures
unsigned
BLT, BGE, BGT, BLE are _______ conditional structures
signed
CMP R0, #7
BNE next
R0 == 7
CMP R0, #7
BEQ next
R0 != 7
, CMP R0, #7
BLE next
R0 > 7
CMP R0, #7
BLT next
R0 >= 7
CMP R0, #7
BGE next
R0 < 7
CMP R0, #7
BGT next
R0 <= 7
==
BNE
!=
BEQ
> (unsigned)
BLS
>= (unsigned)
BLO
< (unsigned)
BHS
<= (unsigned)
BHI
> (signed)
BLE
>= (signed)
BLT
< (signed)
BGE
<= (signed)
BGT
conditional structure (comparing G with 7)
LDR R2, =G;
LDR R0, [R2]
CMP R0, #7
BXX next
BL subroutine
next
if (G1 > G2)
isGreater();
else
isLess();
LDR R2, =G1
LDR R0, [R2]