Posts

Showing posts from March, 2022

Lab 4 - 64-bit Assembly Language Lab - Part 4

 Welcome to part 3 of lab 4. This lab goes over some basics of 64-bit assembly languages, specifically in the AArch64 and x86_64 platforms. This specific part will be going over the second half of the lab in the AArch64 system. Links for the other parts are listed here: Part 1 - First half in AArch64 Part 2 - First half in x86_64 Part 3 - Second half in AArch64 I'll be outlining the steps in detail as I go along but the full instructions for this lab can be found here . Okay we're in the homestretch. Just like part 3 we're making our loop print from 00-30. I learned my lesson from part 3 and pre-labelled my code, and I was already planning on trying to reduce the overall amount of registers I use but x86_64 seems to have less safe registers anyways so I was somewhat forced to. Major difference here is the div function. The div function in x86_64 calculates the remainder too so that was pretty convenient. It's a bit less intuitive, it takes one argument, a register, a

Lab 4 - 64-bit Assembly Language Lab - Part 3

Welcome to part 3 of lab 4. This lab goes over some basics of 64-bit assembly languages, specifically in the AArch64 and x86_64 platforms. This specific part will be going over the second half of the lab in the AArch64 system. Links for the other parts are listed here: Part 1 - First half in AArch64 Part 2 - First half in x86_64 Part 4 - Second half in x86_64 I'll be outlining the steps in detail as I go along but the full instructions for this lab can be found here . Okay this is where the lab gets a bit trickier. Our instructions now are to make our loop from previous parts loop from 00-30, printing a double digit on every line. Before we relied on a somewhat simplistic method to print the index, and now we'll have to get a bit fancier. To do this I used udiv and msub. udiv divides a register by another register, and it very specifically wants a register it seems, and not just a value. So I made register 28 equal 10, and used that for my equations. Then I used msub to calc