A single precision IEEE 754 number is stored in memory at ad

A single precision IEEE 754 number is stored in memory at address X. Write a sequence of ARM instructions to multiply the number at X by 16 and store the result back at X. You must accomplish this without using any floating-point instructions (you may ignore overflow or underflow).

Solution

ENTRY           ;The first instruction from where execution begins
start
MOV r0,754   ;stores 754 in r0 register
MOV r1,16   ;store 16 in r1
MUL r0,r0,r1   ;r0=r0+r1

stop
MOV r0, #0x18 ; report exception mechanism
LDR r1, =0x20026 ; ApplicationExit
SVC #0x123456 ; SWI
END ; Mark end of file
  

 A single precision IEEE 754 number is stored in memory at address X. Write a sequence of ARM instructions to multiply the number at X by 16 and store the resul

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site