Thumb instructions by lecture

From Digital Systems
Jump to: navigation, search

Lectures 1 & 2

adds r1, r2, r3
bx lr

Lecture 3

movs r1, #n
movs r1, r2
subs r1, r2, #n
cmp r1, #n
beq done
b loop

Lecture 4

bne, blt, ble, ...

Lecture 5

lsls r1, r2, #n
lsrs r1, r2, #n
bcc even
push {r4-r7, lr}
pop {r4-r7, pc}
sub sp, #m
add sp, #m
ldr r1, [sp, #n]
str r1, [sp, #n]

Lecture 6

ldr r1, [r2]
ldr r1, =const
str r1, [r2]
ldr r1, [r2, r3]

.align 2
.space n