Assembler Lab Catch up
After getting some feedback from Professor Tyler regarding my issue I was able to complete the assembly lab. You can find the loop from 0 to 9 here. The loop through 00 to 30 is here.
Completing the aarch64 assembly took me a bit longer than the x86_64 portion of the lab, this is possibly due to the time in between labs, and having to relearn some of what I figured out.
Here are some of the differences:
Description | x86_64 | aarch64 |
---|---|---|
value 10 into register 15 | mov $10,%r15 |
mov r15,10 |
add 0x30 to register 15 | add 0x30,%r15 |
add x15,x15,0x30 |
go to label if != | jne label |
bne label |
There were some other differences that caused some issues. I forgot to include “mov x0,1
“, which caused my “Hello, world!” to print only once to the screen instead of 10 times during my initial phase of creating the program. I believe this is equivalent to the following command in x86_64 movq $1,%rdi
.
Overall I found the x86_64 assembly easier (maybe because I did those first and was used to its layout), but like most programming languages, the logic is practically the same; it is a matter of learning the syntax in the different environment. I find myself having to take time to write a simple hello world program, but hoping with more practice, I will be able to write more verbose programs in assembly.
Recent Comments