Combined Compare and Conditional Branch CBZ (compare and branch if zero) and CBNZ (compare and branch if nonzero).
Conditional Execution Using IT Instructions
Write C code
Instruction Barrier and Memory Barrier Instructions
Write IT code if (R1<R2) then R2 = R2+R1 R3 = R2/2 else R1=R2
Saturation Operations
if a 32-bit signed value is to be saturated into a 16-bit signed value, SSAT.W R1, #16, R0 if a 32-bit unsigned value is to saturate into a 16-bit unsigned value, USAT.W R1, #16, R0
Table Branch Byte and Table Branch Halfword Lsb bit is 0 for PC Hence offset value is multiplied by ? PC value is the current instruction address plus four the branch range for TBB is (2 × 255) + 4 = 514 the branch range for TBH is (2 × 65535) + 4 = 131074. TBB.W [Rn, Rm] Rn is the base memory offset and Rm is the branch table index The branch table item for TBB is located at Rn + Rm Rn + 2 x Rm TBB.W [Rn, Rm]
TBB.W [pc, r0]
Programs
Using Same program store the result in memory called the “result” Write a ALP to add, sub two 16-bit numbers stored in memory & store the result in memory, use appropriate directives
Write a C Program to blink the LED.
A TYPICAL DEVELOPMENT FLOW
CMSIS- Common Microcontroller Software Interface Standard