Created
October 24, 2016 22:41
-
-
Save iamhunter/a7e0a64415483b38f5293717f974b209 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Takes in 3 parameters, (A,B,C) and returns the result of | |
@(A + (B * C)) | |
.text | |
.global mac | |
.type mac, %function | |
aye .req r0 | |
bee .req r1 | |
cee .req r2 | |
temp .req r4 | |
mac: | |
push {temp, lr} | |
mul temp, bee, cee @multiply B and C and bequeaths the result to temp | |
add aye, aye, temp @add A and temp and bequeaths the result to A | |
done: | |
pop {temp, pc} | |
.unreq aye | |
.unreq bee | |
.unreq cee | |
.unreq temp |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment