/* -------------------------------------------------- Define required labels for EGTAPI -------------------------------------------------- */ .global main, Stop, CodeEnd, DataStart, DataEnd .global A /* -------------------------------------------------- Begin of the program instructions -------------------------------------------------- */ .text main: mov r0, #1111 // Pass 1111 as parameter 1 in r0 mov r1, #2222 // Pass 2222 as parameter 2 in r1 bl A // Call leaf function A // When A returns, you will see the return value in r0 = 9999 nop nop Stop: nop /* =============================== Leaf function =============================== */ A: // When run in EGTAPI - you will see r0 = 1111 and r1 = 2222 nop // Instructions in A( ) can use r0, r1 nop // Instructions in A( ) can use r0, r1 mov r0, #9999 // Pass return value in register r0 mov pc, lr CodeEnd: nop /* -------------------------------------------------- Begin of the permanent program variables -------------------------------------------------- */ .data DataStart: DataEnd: .end