This is a classic problem of assembly language programming. Write a sequence of ARM instructions that swap the contents of registers r0 and r1 without using any additional registers or memory storage; that is, you can’t move r1 to a temporary location.

What will be an ideal response?


This sleight of hand uses the XOR, exclusive OR. Consider a and b.

So, to swap r0 and r1 write


EOR r0,r0,r1
EOR r1,r0,r1
EOR r0,r0,r1

Computer Science & Information Technology

You might also like to view...

If you make changes within a table and use the Apply to choice to Table instead of Cell, the changes made will apply to:

A) the current column. B) the current row. C) the current table. D) the current cell.

Computer Science & Information Technology

In order to ensure that a table does not display a border, set the value of the border to ________

Fill in the blank(s) with correct word

Computer Science & Information Technology

A ____ is different from normal DCs in that you cannot use it to update information in Active Directory and it does not replicate to regular DCs.

A. Restricted Domain Controller B. Limited Access Domain Controller C. Read-Only Domain Controller D. Replication-Limited Domain Controller

Computer Science & Information Technology

The principal feature of a final report is always the recommendation about the ____ of the incident.

A. final cause B. remediation C. root cause D. mitigation

Computer Science & Information Technology