233 lines
8.4 KiB
Plaintext
233 lines
8.4 KiB
Plaintext
|
|
|
|
|
|
ARM Macro Assembler Page 1
|
|
|
|
|
|
1 00000000 ; ------------------------------------------------------
|
|
------------
|
|
2 00000000 ; -- _____ ______ _____
|
|
-
|
|
3 00000000 ; -- |_ _| | ____|/ ____|
|
|
-
|
|
4 00000000 ; -- | | _ __ | |__ | (___ Institute of Embedded
|
|
Systems -
|
|
5 00000000 ; -- | | | '_ \| __| \___ \ Zurich University of
|
|
-
|
|
6 00000000 ; -- _| |_| | | | |____ ____) | Applied Sciences
|
|
-
|
|
7 00000000 ; -- |_____|_| |_|______|_____/ 8401 Winterthur, Switz
|
|
erland -
|
|
8 00000000 ; ------------------------------------------------------
|
|
------------
|
|
9 00000000 ; --
|
|
10 00000000 ; -- sumdiff.s
|
|
11 00000000 ; --
|
|
12 00000000 ; -- CT1 P05 Summe und Differenz
|
|
13 00000000 ; --
|
|
14 00000000 ; -- $Id: sumdiff.s 705 2014-09-16 11:44:22Z muln $
|
|
15 00000000 ; ------------------------------------------------------
|
|
------------
|
|
16 00000000 ;Directives
|
|
17 00000000 PRESERVE8
|
|
18 00000000 THUMB
|
|
19 00000000
|
|
20 00000000 ; ------------------------------------------------------
|
|
------------
|
|
21 00000000 ; -- Symbolic Literals
|
|
22 00000000 ; ------------------------------------------------------
|
|
------------
|
|
23 00000000 60000200
|
|
ADDR_DIP_SWITCH_7_0
|
|
EQU 0x60000200
|
|
24 00000000 60000201
|
|
ADDR_DIP_SWITCH_15_8
|
|
EQU 0x60000201
|
|
25 00000000 60000100
|
|
ADDR_LED_7_0
|
|
EQU 0x60000100
|
|
26 00000000 60000101
|
|
ADDR_LED_15_8
|
|
EQU 0x60000101
|
|
27 00000000 60000102
|
|
ADDR_LED_23_16
|
|
EQU 0x60000102
|
|
28 00000000 60000103
|
|
ADDR_LED_31_24
|
|
EQU 0x60000103
|
|
29 00000000
|
|
30 00000000 ; ------------------------------------------------------
|
|
------------
|
|
31 00000000 ; -- myCode
|
|
32 00000000 ; ------------------------------------------------------
|
|
------------
|
|
33 00000000 AREA MyCode, CODE, READONLY
|
|
34 00000000
|
|
|
|
|
|
|
|
ARM Macro Assembler Page 2
|
|
|
|
|
|
35 00000000 main PROC
|
|
36 00000000 EXPORT main
|
|
37 00000000
|
|
38 00000000 user_prog
|
|
39 00000000 ; STUDENTS: To be programmed
|
|
40 00000000 480D LDR R0, =ADDR_DIP_SWITCH_7_0
|
|
41 00000002 7800 LDRB R0, [R0] ; Read DIP Switch 7
|
|
-0 in R0
|
|
42 00000004 0600 LSLS R0, R0, #24 ; cast to 32 Bit
|
|
43 00000006
|
|
44 00000006 490D LDR R1, =ADDR_DIP_SWITCH_15_8
|
|
45 00000008 7809 LDRB R1, [R1] ; Read DIP Switch 1
|
|
5-8 in R0
|
|
46 0000000A 0609 LSLS R1, R1, #24 ; cast to 32 Bit
|
|
47 0000000C
|
|
48 0000000C 4A0C LDR R2, =ADDR_LED_7_0
|
|
49 0000000E 1843 ADDS R3, R0, R1 ; Add R0 + R1
|
|
50 00000010 F3EF 8500 MRS R5, APSR ; Read Flags to R5
|
|
51 00000014 0E1B LSRS R3, R3, #24 ; Move MSB to LSB
|
|
52 00000016 7013 STRB R3, [R2] ; Show LSB in LEDs
|
|
7-0
|
|
53 00000018
|
|
54 00000018 4A0A LDR R2, =ADDR_LED_15_8
|
|
55 0000001A 0E2D LSRS R5, R5, #24 ; Move Flags 24 Bit
|
|
right
|
|
56 0000001C 7015 STRB R5, [R2] ; Show Flags in LED
|
|
15-12
|
|
57 0000001E
|
|
58 0000001E 4A0A LDR R2, =ADDR_LED_23_16
|
|
59 00000020 1A43 SUBS R3, R0, R1 ; Sub R0 - R1
|
|
60 00000022 F3EF 8500 MRS R5, APSR ; Read Flags to R5
|
|
61 00000026 F3EF 8500 MRS R5, APSR ; Read Flags to R5
|
|
62 0000002A 0E1B LSRS R3, R3, #24 ; Move MSB to LSB
|
|
63 0000002C 7013 STRB R3, [R2] ; Show LSB in LEDs
|
|
15-8
|
|
64 0000002E
|
|
65 0000002E 4A07 LDR R2, =ADDR_LED_31_24
|
|
66 00000030 0E2D LSRS R5, R5, #24 ; Move Flags 24 Bit
|
|
right
|
|
67 00000032 7015 STRB R5, [R2] ; Show Flags in LED
|
|
15-12
|
|
68 00000034
|
|
69 00000034
|
|
70 00000034
|
|
71 00000034
|
|
72 00000034 ; END: To be programmed
|
|
73 00000034 E7E4 B user_prog
|
|
74 00000036 00 00 ALIGN
|
|
75 00000038 ; ------------------------------------------------------
|
|
------------
|
|
76 00000038 ; End of code
|
|
77 00000038 ; ------------------------------------------------------
|
|
------------
|
|
78 00000038 ENDP
|
|
79 00000038 END
|
|
60000200
|
|
60000201
|
|
60000100
|
|
60000101
|
|
|
|
|
|
|
|
ARM Macro Assembler Page 3
|
|
|
|
|
|
60000102
|
|
60000103
|
|
Command Line: --debug --xref --diag_suppress=9931 --cpu=Cortex-M0 --depend=.\bu
|
|
ild\sumdiff.d -o.\build\sumdiff.o -I.\RTE\_Target_1 -IC:\Users\roman\AppData\Lo
|
|
cal\Arm\Packs\InES\CTBoard14_DFP\4.0.2\Device\Include -IC:\Users\roman\AppData\
|
|
Local\Arm\Packs\InES\CTBoard14_DFP\4.0.2\Device\Include\m0 -IC:\Users\roman\App
|
|
Data\Local\Arm\Packs\InES\CTBoard14_DFP\4.0.2\HAL\Include --predefine="__EVAL S
|
|
ETA 1" --predefine="__UVISION_VERSION SETA 537" --predefine="_RTE_ SETA 1" --pr
|
|
edefine="_RTE_ SETA 1" --list=.\build\sumdiff.lst app\sumdiff.s
|
|
|
|
|
|
|
|
ARM Macro Assembler Page 1 Alphabetic symbol ordering
|
|
Relocatable symbols
|
|
|
|
MyCode 00000000
|
|
|
|
Symbol: MyCode
|
|
Definitions
|
|
At line 33 in file app\sumdiff.s
|
|
Uses
|
|
None
|
|
Comment: MyCode unused
|
|
main 00000000
|
|
|
|
Symbol: main
|
|
Definitions
|
|
At line 35 in file app\sumdiff.s
|
|
Uses
|
|
At line 36 in file app\sumdiff.s
|
|
Comment: main used once
|
|
user_prog 00000000
|
|
|
|
Symbol: user_prog
|
|
Definitions
|
|
At line 38 in file app\sumdiff.s
|
|
Uses
|
|
At line 73 in file app\sumdiff.s
|
|
Comment: user_prog used once
|
|
3 symbols
|
|
|
|
|
|
|
|
ARM Macro Assembler Page 1 Alphabetic symbol ordering
|
|
Absolute symbols
|
|
|
|
ADDR_DIP_SWITCH_15_8 60000201
|
|
|
|
Symbol: ADDR_DIP_SWITCH_15_8
|
|
Definitions
|
|
At line 24 in file app\sumdiff.s
|
|
Uses
|
|
At line 44 in file app\sumdiff.s
|
|
Comment: ADDR_DIP_SWITCH_15_8 used once
|
|
ADDR_DIP_SWITCH_7_0 60000200
|
|
|
|
Symbol: ADDR_DIP_SWITCH_7_0
|
|
Definitions
|
|
At line 23 in file app\sumdiff.s
|
|
Uses
|
|
At line 40 in file app\sumdiff.s
|
|
Comment: ADDR_DIP_SWITCH_7_0 used once
|
|
ADDR_LED_15_8 60000101
|
|
|
|
Symbol: ADDR_LED_15_8
|
|
Definitions
|
|
At line 26 in file app\sumdiff.s
|
|
Uses
|
|
At line 54 in file app\sumdiff.s
|
|
Comment: ADDR_LED_15_8 used once
|
|
ADDR_LED_23_16 60000102
|
|
|
|
Symbol: ADDR_LED_23_16
|
|
Definitions
|
|
At line 27 in file app\sumdiff.s
|
|
Uses
|
|
At line 58 in file app\sumdiff.s
|
|
Comment: ADDR_LED_23_16 used once
|
|
ADDR_LED_31_24 60000103
|
|
|
|
Symbol: ADDR_LED_31_24
|
|
Definitions
|
|
At line 28 in file app\sumdiff.s
|
|
Uses
|
|
At line 65 in file app\sumdiff.s
|
|
Comment: ADDR_LED_31_24 used once
|
|
ADDR_LED_7_0 60000100
|
|
|
|
Symbol: ADDR_LED_7_0
|
|
Definitions
|
|
At line 25 in file app\sumdiff.s
|
|
Uses
|
|
At line 48 in file app\sumdiff.s
|
|
Comment: ADDR_LED_7_0 used once
|
|
6 symbols
|
|
344 symbols in table
|