Question: ARM Assembly Language (Keil uVision5) Can anyone help with this ARM Assembly code where the user inputs a decimal integer and the function PutBin should
ARM Assembly Language (Keil uVision5)
Can anyone help with this ARM Assembly code where the user inputs a decimal integer and the function PutBin should give a string of binary numbers without any leading zeros. This should be in a loop and should terminate when user enters 0.
Example:
Decimal = 34 Binary = 100010
Decimal = 0 Binary = 0
This is what I have so for.
PUSH {LR} ; save return address of caller in init.s LDR R0, =Prompt1 BL PutStr BL GetDec CMP R0, #0 BEQ Fin LDR R0, =Prompt2 BL PutStr Fin POP {PC} ; return from main PutBin PUSH {R0, LR} POP {R0, PC}
Thank you!!
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
