This is the hw02 sample. Please follow the steps below.
-
Fork this repo to your own github account.
-
Clone the repo that you just forked.
-
Under the hw02 dir, use:
-
maketo build. -
make cleanto clean the ouput files.
-
-
Extract
gnu-mcu-eclipse-qemu.zipinto hw02 dir. Under the path of hw02, start emulation withmake qemu.See Lecture 02 ─ Emulation with QEMU for more details.
-
The sample is designed to help you to distinguish the main difference between the
band theblinstructions.See ESEmbedded_HW02_Example for knowing how to do the observation and how to use markdown for taking notes.
-
Edit main.s.
-
Make and run like the steps above.
-
Please modify main.s to observe the
pushand thepopinstructions:Does the order of the registers in the
pushand thepopinstructions affect the excution results?For example, will
push {r0, r1, r2}andpush {r2, r0, r1}act in the same way?Which register will be pushed into the stack first?
-
You have to state how you designed the observation (code), and how you performed it.
Just like how ESEmbedded_HW02_Example did.
-
If there are any official data that define the rules, you can also use them as references.
-
Push your repo to your github. (Use .gitignore to exclude the output files like object files or executable files and the qemu bin folder)
- If you volunteer to give the presentation next week, check this.
From image png_001, we can see assembly warning us that we need to ascende the register. From image png_003, we can see assembly helping us initiavely to ascende the register.