LAB4 (Aarch64)

 For this lab we are tasked with editing some code provided by the prof Chris Tyler. We needed to create a loop in order for the word loop to be printed 30 times.

This lab was extremly hard for me as I had to re learn a lot of the commands and it was very time consuming, but was cool to learn. For starters I did not know that to extract the package and to make files was confusing. One of the most time consuming parts was trying to run the code each time and debug it.


1. Review, build, and run the aarch64 assembly language programs. Take a look at the code using objdump -d objectfile and compare it to the source code.

First we had to extract the package tar zxvf fileNameHere.tgz




here is the source code provided for the aarch64 task


For the aarch64 part of this lab we had to get the word "loop #" to loop ten times and show the count s it looped. This task was seemed easy but became very hard, trying to understand syntax and how the compiler worked. For a long time I was trying to compile using the gcc or the x86 compiler and I could not get the code to run. Then after more research and more review of the lecture class I was able to figure out we needed to use GNU assembler to compile and link the code. I had forgotten how to use VIM for creating and editing files. Another challange was the make command, It was a bit hard to use at first because every time I used make on my loop or loopTwo file it would not run, even after make clean. So I had to remove the file then recompile the code and generate a new output file. I followed some of the code from the end of week 5, I understand how it is working after 3 days of work.




Here is the out put




Over all I enjoy the lab as it was very cool to see that assembly can not be portable and in order to have it work on two different architectures we need to make the right changes in syntax in order to perform the same result on aarch64 and x86! It was very hard for me but it was very pleasant. I tried to copy and paste my code but could not figure out how to in VIM


I am still working on the loop 30 times but it is almost done. here is what i have so far, trying to get the numbers to print 



Comments

Popular posts from this blog

SPO600 Lab1

SPO600(Project 3.2 FInal Post and thoughts on project and course)

SPO600(Project Part 2.1)