Question: In this problem you will create another assembly file, run it and determine what it does Using a similar procedure as in the last problem

 In this problem you will create another assembly file, run it

In this problem you will create another assembly file, run it and determine what it does Using a similar procedure as in the last problem create a new assembly file, "labo2c. S" with the following code in it: .section .text .globl labe2c labo2c: ADRP X3, hextable ADD X3, X3, 1012: hextable ADRP X5, result ADD X5,X5, 1012:result LSR x1, xe, 4 1/get upper 4 bits ADD X2, X1, X3 1/get address in hextable LDURB WA, [X2,0] //get character STURB WA, [X5,0] // first digit of the result AND X1, XO, Oxf //get lower 4 bits ADD X2, X3, X1//get address in hextable LDURB WA, [X2,0] //get character STURB WA, [X5,1] // first digit of the result BR X30 .section.data hextable: .asciz "0123456789abcdef" msgi: .asciz "Your number in Hex is: result: .byte 2 When editing the main.c file to call your new labo2c function, be sure to use this as the function prototype: extern void labo2c(long long inta), In your main() be sure to call labo2c function with some value you choose between 0-255). In this problem you will create another assembly file, run it and determine what it does Using a similar procedure as in the last problem create a new assembly file, "labo2c. S" with the following code in it: .section .text .globl labe2c labo2c: ADRP X3, hextable ADD X3, X3, 1012: hextable ADRP X5, result ADD X5,X5, 1012:result LSR x1, xe, 4 1/get upper 4 bits ADD X2, X1, X3 1/get address in hextable LDURB WA, [X2,0] //get character STURB WA, [X5,0] // first digit of the result AND X1, XO, Oxf //get lower 4 bits ADD X2, X3, X1//get address in hextable LDURB WA, [X2,0] //get character STURB WA, [X5,1] // first digit of the result BR X30 .section.data hextable: .asciz "0123456789abcdef" msgi: .asciz "Your number in Hex is: result: .byte 2 When editing the main.c file to call your new labo2c function, be sure to use this as the function prototype: extern void labo2c(long long inta), In your main() be sure to call labo2c function with some value you choose between 0-255)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!