|
|
DEMO: /home/cs255001/demo/asm/6-if/branch.s
.text
main:
mov r1, #1111 // Instructions executed in sequence
mov r2, #1111 // "normal" program flow
mov r3, #1111
b there // Branch to location at label "there"
mov r4, #2222 // These instructions are SKIPPED over !
mov r5, #2222
mov r6, #2222
there:
mov r4, #4444 // <--- Next instruction after b there
mov r5, #4444
mov r6, #4444
|
Note:
watch the
values in the
PC at
each instruction !!!
Normal program flow:
PC increases
+4