Hi all, I was assigned to work in my lab for my SPO600 class. Here is the outline of the specifications:
Blog about the programs you’ve written.
Describe the experience of writing and debugging in assembler, as compared to writing in other languages. Contrast x86_64 and aarch64 assembler, your experience with each, and your opinions of each.
Include links to the source code for both of your assembler programs.
This program is used to print a loop that can display a list of text and number.
If we compare this program to other programming languages such as Java, C or C++. This program is written in a much more low-level language. That means the computer can easy understand and execute the program in the fastest way comparing to high-level languages where is much more Human readable language.
The program written in x86_64 can be run on Xerxes. This assembler has a more organizable structure of code comparing to aarch64. Since the program is developed using msg and ASCII to print the message, the x86_64 has an easier reading syntax. for example, labeling with the loop, skip…etc. When moving data from the register using instructions “mov %99, %r10” the data is moved from right to left (put 99 into r10). The other useful feature of x86_64 is call jumping. For example, “jne loop” will take us to the label “loop:” that we were included in the program. this is useful when we have to divide the program into different section such as perform the looping when the value is less than some other value (loop_lt).
The program written in Aarch64 can be run on Betty. This assembler has a different way of organizing the structure of the code. When moving data from the register using instructions “mov r0,99” the data is moved from right to left (load r0 with value 99) is can cause confusion when we have to work with large an amount of code.
The example of this lab is very interesting and useful for the new programmer who is interested in machine code. For me, at first, I have some difficulties with understanding the syntax and the structures of the code. But after working in the group and discussing with each other and spending some time to review the lecture. I have a better understanding of machine languages and how they are implemented to make the program run faster and more efficient.
Here is the link to our work: