/* -------------------------------------------------- Define required labels for EGTAPI -------------------------------------------------- */ .global main, Stop, CodeEnd, DataStart, DataEnd /* -------------------------------------------------- Begin of the program instructions -------------------------------------------------- */ .text main: // Compare 10 == 10 movs r0, #10 // NZCV = 0010 cmp r0, #10 // NZCV = 0110 (Z = 1 !!!) // Compare 10 against 6 movs r0, #10 // NZCV = 0010 cmp r0, #6 // NZCV = 0010 (positive) // Compare 10 against 16 movs r0, #10 // NZCV = 0010 cmp r0, #16 // NZCV = 1000 (negative !) 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