diff options
Diffstat (limited to 'Bachelor/Mikroprozessorsysteme2/ARM202U/EXAMPLES/BASICASM/LOADCON2.S')
| -rw-r--r-- | Bachelor/Mikroprozessorsysteme2/ARM202U/EXAMPLES/BASICASM/LOADCON2.S | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/Bachelor/Mikroprozessorsysteme2/ARM202U/EXAMPLES/BASICASM/LOADCON2.S b/Bachelor/Mikroprozessorsysteme2/ARM202U/EXAMPLES/BASICASM/LOADCON2.S new file mode 100644 index 0000000..53deb76 --- /dev/null +++ b/Bachelor/Mikroprozessorsysteme2/ARM202U/EXAMPLES/BASICASM/LOADCON2.S @@ -0,0 +1,26 @@ + AREA Loadcon2, CODE
+ ENTRY ; Mark first instruction
+ BL func1 ; Branch to first subroutine
+ BL func2 ; Branch to second subroutine
+ SWI 0x11 ; Terminate
+func1
+ LDR r0, =42 ; => MOV R0, #42
+ LDR r1, =0x55555555 ; => LDR R1, [PC, #offset to Literal
+ ; Pool 1]
+ LDR r2, =0xFFFFFFFF ; => MVN R2, #0
+ MOV pc, lr
+
+ LTORG ; Literal Pool 1 contains
+ ; literal &55555555
+func2
+ LDR r3, =0x55555555 ; => LDR R3, [PC, #offset to Literal
+ ; Pool 1]
+ ; LDR r4, =0x66666666 ; If this is uncommented it will
+ ; fail, as Literal Pool 2 is not
+ ; accessible (out of reach)
+ MOV pc, lr
+
+LargeTable % 4200 ; Clears a 4200 byte area of memory,
+ ; starting at the current location,
+ ; to zero.
+ END ;Literal Pool 2 is empty
|
