summaryrefslogtreecommitdiffstats
path: root/Bachelor/Mikroprozessorsysteme2/ARM202U/EXAMPLES/BASICASM/EXAMPLE.S
diff options
context:
space:
mode:
Diffstat (limited to 'Bachelor/Mikroprozessorsysteme2/ARM202U/EXAMPLES/BASICASM/EXAMPLE.S')
-rw-r--r--Bachelor/Mikroprozessorsysteme2/ARM202U/EXAMPLES/BASICASM/EXAMPLE.S14
1 files changed, 14 insertions, 0 deletions
diff --git a/Bachelor/Mikroprozessorsysteme2/ARM202U/EXAMPLES/BASICASM/EXAMPLE.S b/Bachelor/Mikroprozessorsysteme2/ARM202U/EXAMPLES/BASICASM/EXAMPLE.S
new file mode 100644
index 0000000..c93e244
--- /dev/null
+++ b/Bachelor/Mikroprozessorsysteme2/ARM202U/EXAMPLES/BASICASM/EXAMPLE.S
@@ -0,0 +1,14 @@
+ AREA Example, CODE, READONLY ; name this block of code
+ ENTRY ; mark first instruction
+ ; to execute
+start
+ MOV r0, #15 ; Set up parameters
+ MOV r1, #20
+ BL firstfunc ; Call subroutine
+ SWI 0x11 ; terminate
+
+firstfunc ; Subroutine firstfunc
+ ADD r0, r0, r1 ; r0 = r0 + r1
+ MOV pc, lr ; Return from subroutine
+ ; with result in r0
+ END ; mark end of file