Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 756735
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T15:16:45+00:00 2026-05-14T15:16:45+00:00

This is currently a homework project that me and my teammate are stuck on.

  • 0

This is currently a homework project that me and my teammate are stuck on. We haven’t been given much of an introduction into Assembly, and this is supposed to be our first homework exercise. The task is to create a program that converts 0xAABBCCDD into 0xDDCCBBAA.

I’m not looking for an answer, as that would defeat the purpose, but we are getting severely frustrated over the difficulty of this stupid thing. We think we have a good start in creating a viable solution, but we just cannot come up with the rest of the program.

First, we mask every single tupel (aa), (bb), (cc), (dd) into a different register:

LDR R0, LittleEndian    // 0xAABBCCDD
AND R1, R0, #0xFF000000 // 0xAA
AND R2, R0, #0x00FF0000 // 0xBB
AND R3, R0, #0x0000FF00 // 0xCC
AND R4, R0, #0x000000FF // 0xDD

Then we try to re-align them into the R0 register, but hell if we could come up with a good solution…

Our best effort came from:

ORR R0, R1, LSL #24 
ORR R0, R2, LSL #8
ORR R0, R3, LSR #8
ORR R0, R4, LSR #24

which produced 0xBBBBCCDD for some odd reason; we really don’t know.

Any hints would be greatly appreciated. Again, we are asking for help, but not for a solution.

Cheers!

  • 1 1 Answer
  • 1 View
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-14T15:16:45+00:00Added an answer on May 14, 2026 at 3:16 pm

    I think you need to do (ARM a bit rusty):

    MOV R0, R1, LSR #24 
    ORR R0, R2, LSR #8
    ORR R0, R3, LSL #8
    ORR R0, R4, LSL #24
    

    That is, MOV in the first instruction as you don’t want anything from the old R0 to affect the new value.

    I can’t see any way to make this more ‘hint’ like as you’ve effectively done all the work anyway.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have been using this carousel to load images dynamically in my homework project
This is a homework problem that i have been asked to do. Create an
This is homework that has been driving crazy for the last couple of days.
There is currently this Prototype code that does a PUT: new Ajax.Request(someUrl, { method:
var UI$Contract$ddlForm_change = function() { //'this' is currently the drop down that fires the
First off this is for homework or... project. I'm having trouble understanding the idea
This IS NOT a Homework question! While building my current student database project I
In my programming class we currently have a project that requires us to take
NOTE: THIS IS NOT HOMEWORK IT IS FROM A PRACTICE EXAM GIVEN TO US
I am currently working on a homework assignment and I am thoroughly stuck. I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.