/* -------------------------------------------------- Define required labels for EGTAPI -------------------------------------------------- */ .global main, Stop, CodeEnd, DataStart, DataEnd /* -------------------------------------------------- Begin of the program instructions -------------------------------------------------- */ .text main: /* ------------------------------------- How to implement: b there ------------------------------------- */ movw r0, #:lower16:there movt r0, #:upper16:there // r0 = addr(there) mov pc, r0 // pc = addr(there) // The CPU will branch to "there" !!! mov r1, #1111 // These instructions are SKIPPED over ! mov r2, #1111 mov r3, #1111 there: mov r4, #4444 mov r5, #4444 mov r6, #4444 Stop: CodeEnd: nop /* -------------------------------------------------- Begin of the permanent program variables -------------------------------------------------- */ .data DataStart: a: .4byte 4 // a contains the value 4 b: .4byte 5 // b contains the value 5 c: .skip 4 // c is not initialized (will contain 0) DataEnd: .end