ARM Assembly | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

ARM Assembly

return value = b + d / 8 HOW CAN I WRITE THIS

19th Oct 2020, 10:02 PM
Farid Mousazadeh
Farid Mousazadeh - avatar
2 Answers
0
LDR R4,=0x20000001 ; (0x20000001) = (2^32 / 8)+1 calculated because there is no division instruction MULS R0,R3,R4 ; calculates the value of d/8 ADD R0,R0,R1 ; calculates the value of b+d/8 THIS IS MY CODE BUT i GET THIS ERROR "Lab7.s", line 33: Error: A1883E: Destination and second source register must be same
19th Oct 2020, 10:03 PM
Farid Mousazadeh
Farid Mousazadeh - avatar
0
33 00000020 MULS R0,R3,R4 ; calculates the value of d/8
19th Oct 2020, 10:03 PM
Farid Mousazadeh
Farid Mousazadeh - avatar