Experimental purpose:
l
l
l
l
1. Single register load and store instructions LDR|STR
START
COPY
STOP
SRC
DST
Program Description:
1.
2.
SRC = "one small!"
DST = "three big!"
Complete the following tasks
1. Read the program exp6_1.s and write out the function of the program. Set the base address of the code segment to 0x8000. Use AXD to debug the program step by step, observe the changes in the corresponding registers and memory after each step, and complete the table.
The opened process view window is as follows: register, disassembly, low lever symbols, memory
Serial number | Execute Instructions | Changes after instruction execution | |||||||||||||
|
|
register | Memory | ||||||||||||
|
|
R0 | R1 | R2 | PC | 0x8040 | 0x8041 | 0x8042 | 0x8043 | 0x8044 | 0x8045 | 0x8046 | 0x8047 | 0x8048 | 0x8049 |
0 | |
0x0 | 0x0 | 0x0 | 0x8000 | 0x74 t |
0x68 H |
0x72 r |
0x65e |
0x65e |
0x20 _ |
0x62 b |
0x69 i |
0x67 g |
0x21 ! |
1 | |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2 | |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3 | |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4 | |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5 | |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6 | |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7 | |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8 | |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9 | |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
10 | |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3. Use the multi-register transfer instruction to modify the program.
Answer:
1.
2.
Method 1
COPY LDR R0,[R1],#4
LDR R0,[R1],#4
Method 2
CPY
Method 3
LDR R0,[R1]
LDR R0,[R1,#8]
LDMIA
STMIA
I. Multi-register load and store instructions
START
STOP
NUM
description:
1.
.
NUM & 0x12, 0x34,0x56,0x78
Previous article:ARM data processing instructions
Next article:ARM data load and store instructions (Part 2)
Recommended ReadingLatest update time:2024-11-16 22:00
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- Innolux's intelligent steer-by-wire solution makes cars smarter and safer
- 8051 MCU - Parity Check
- How to efficiently balance the sensitivity of tactile sensing interfaces
- What should I do if the servo motor shakes? What causes the servo motor to shake quickly?
- 【Brushless Motor】Analysis of three-phase BLDC motor and sharing of two popular development boards
- Midea Industrial Technology's subsidiaries Clou Electronics and Hekang New Energy jointly appeared at the Munich Battery Energy Storage Exhibition and Solar Energy Exhibition
- Guoxin Sichen | Application of ferroelectric memory PB85RS2MC in power battery management, with a capacity of 2M
- Analysis of common faults of frequency converter
- In a head-on competition with Qualcomm, what kind of cockpit products has Intel come up with?
- Dalian Rongke's all-vanadium liquid flow battery energy storage equipment industrialization project has entered the sprint stage before production
- Allegro MicroSystems Introduces Advanced Magnetic and Inductive Position Sensing Solutions at Electronica 2024
- Car key in the left hand, liveness detection radar in the right hand, UWB is imperative for cars!
- After a decade of rapid development, domestic CIS has entered the market
- Aegis Dagger Battery + Thor EM-i Super Hybrid, Geely New Energy has thrown out two "king bombs"
- A brief discussion on functional safety - fault, error, and failure
- In the smart car 2.0 cycle, these core industry chains are facing major opportunities!
- The United States and Japan are developing new batteries. CATL faces challenges? How should China's new energy battery industry respond?
- Murata launches high-precision 6-axis inertial sensor for automobiles
- Ford patents pre-charge alarm to help save costs and respond to emergencies
- New real-time microcontroller system from Texas Instruments enables smarter processing in automotive and industrial applications
- [AIoT Smart Smoke Detection System] Material Unboxing——SIPEED MAIX BIT KIT+LAUNCHXL-CC26X2R1
- [CY8CKIT-149 PSoC 4100S Evaluation] + LED switch counting and LCD display (final report)
- [Qinheng RISC-V core CH582] 3- Use of IO external interrupts
- Things to note when using MSP430
- What are the factors that have a huge impact on PCB assembly mechanism?
- [NXP Rapid IoT Review] Hello BLE
- Making noise with MicroPython and Pi Pico
- Analog Electronics Course Test + Isolation Amplification
- Microcontroller learning record - building a development environment
- [2022 Digi-Key Innovation Design Competition] Part 1: Unboxing the Smart Desktop Interactive Robot