ARC Subroutine that Performs a Swap Operation
This content was COPIED from BrainMass.com - View the original, and get the already-completed solution here!
Please help an ARC subroutine that performs a swap operation on the 32-bit operands
which are stored in memory. Please use as few registers as possible. Thanks!!
UPDATE: The ARC is a 32-bit machine with byte addressable memory. It can manipulate 32 bit data types, but all data is stored in memory as bytes, and the address of a 32 bit word is the address of its byte that has the lowest address.© BrainMass Inc. brainmass.com May 24, 2023, 1:24 pm ad1c9bdddf
Here is how you should write this subroutine.
<br><br>register x = 25
<br><br>register y = 50
<br><br>register temp = ...
The solution writes an ARC subroutine that performs a swap operation on the 32-bit operands x=25 y=50 which are stored in memory.