CODE 03AEH 000AH UNIT ?PR?TASKB?EXT1
CODE 03B8H 000AH UNIT ?PR?TASKC?EXT1
This actually tells you. The 8+8 DATA data of group 0 working registers are defined. Then main() calls OSStart()
Jump to OSStart()
It can be seen here that 2 bytes (51 is a byte) are pushed in.
From the memory, it can be seen that the address pushed in is the address of the next code. The smart ones may have figured it out. Replace the address of task A with 86 03 here, then execute RET to jump to task A to execute the code. Is this exciting for you? Then let's continue. What is this STACK? Haha, the code in the assembly part is as follows:
Here the stack is relocated and a memory unit is defined. As for its location,
it depends on .m51. It is just at the RAM address where the main() function pointer is stored. But if you think about it carefully, this is natural. But you can also find a way to avoid coincidences. However, this is the best way to make full use of the RAM space to overwrite the main stack pointer of task A. Then the following code should be easy to understand. The first address of the task is stored in the randomly changing OSTsakStackBotton. A function pointer for the idle task is also added here. Then the stack space for each task begins to be deployed. He pushes the first address of task A and then moves the top of the stack pointer to the high address of task A. Then, starting from the tail, it stores the bottom 0, priority task, 0, task C, 0, and task B. Then the empty code part in the middle can be used as a memory block that can be used by task A. Then jump to task A to execute the code
So far I have switched the first task and parsed it out.
Previous article:AT89S52 programming method under Linux
Next article:The electronic clock I wrote using a single chip microcomputer
- Popular Resources
- Popular amplifiers
- Learn ARM development(16)
- Learn ARM development(17)
- Learn ARM development(18)
- Embedded system debugging simulation tool
- A small question that has been bothering me recently has finally been solved~~
- Learn ARM development (1)
- Learn ARM development (2)
- Learn ARM development (4)
- Learn ARM development (6)
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- LED chemical incompatibility test to see which chemicals LEDs can be used with
- Application of ARM9 hardware coprocessor on WinCE embedded motherboard
- What are the key points for selecting rotor flowmeter?
- LM317 high power charger circuit
- A brief analysis of Embest's application and development of embedded medical devices
- Single-phase RC protection circuit
- stm32 PVD programmable voltage monitor
- Introduction and measurement of edge trigger and level trigger of 51 single chip microcomputer
- Improved design of Linux system software shell protection technology
- What to do if the ABB robot protection device stops
- Detailed explanation of intelligent car body perception system
- How to solve the problem that the servo drive is not enabled
- Why does the servo drive not power on?
- What point should I connect to when the servo is turned on?
- How to turn on the internal enable of Panasonic servo drive?
- What is the rigidity setting of Panasonic servo drive?
- How to change the inertia ratio of Panasonic servo drive
- What is the inertia ratio of the servo motor?
- Is it better for the motor to have a large or small moment of inertia?
- What is the difference between low inertia and high inertia of servo motors?
- iwr1642
- About the power factor of switching power supply and its correction method
- EEWORLD University ---- RFID Training Series
- How to use jumper caps in circuits
- Calculate engine speed using the charging signal from the battery on a diesel engine
- Vicor engineers take you through power solutions for tethered, aerial/underwater drones
- Sensor Basics
- Basic Concepts of RF Power Amplifier
- Is there any abnormal interference signal output from the GD32F350 pin?
- [RVB2601 Creative Application Development] 3. Continuously expand the routine sound and adjust the volume