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

  • Home
  • SEARCH
  • 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 383861
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T15:19:30+00:00 2026-05-12T15:19:30+00:00

I am working on a simulator for the msp430 instruction set. gnu assembler will

  • 0

I am working on a simulator for the msp430 instruction set. gnu assembler will let you encode instructions like these:

fc0a: 12 10 00 02 rrc &0x0200       
fc0e: 22 11       rra #4        
fc10: 23 52       add #4,#2

My guess is that rrc &0x0200 will fetch from address 0x0200 perform the rotate then write the answer back to address 0x0200, correct? But what would an rra #4 do? The source would be an immediate 4 I assume but is there a destination after the operation? The add #4,#2 assembled into what you would expect (as 2b10, source = r2, ad = 1b0, dest = r3), the binutils disassembler though did not know what to do with that instruction.

Are these valid instructions?

  • 1 1 Answer
  • 0 Views
  • 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-12T15:19:30+00:00Added an answer on May 12, 2026 at 3:19 pm

    Although there doesn’t appears to be any definitive online reference to this effect, I tend to agree with the OP that the two instructions shown (and several others) are likely not valid, even though they conform to the format defined in the data sheets.

    In other words, not all possible combinations of the various parts that make up a instruction word are valid. In particular many single operand instructions that use the immediate addressing mode, and many double operand instructions that have an immediate addressing mode for the destination are probably not semantically viable.

    There are only a few hints to this effect in the documentation, for example, in the User’s Guide, section 3.3.7 (on the immediate addressing mode), a comment indicates “Valid only for a source operand.” (And, BTW, this is for all cases of immediate addressing mode, not just the short-hand cases allowed by the R2 or R3 constant generation trick.)

    The fact that the disassembler doesn’t know what to do with such codes is also another hint (although… some disassemblers get tripped easily…).

    For sake of documentation, I gathered below a few useful references for the MSP430:

    • TI’s MSP430 User’s Guide (pdf) Chapter 3 is particularly relevant
    • The TI MSP430 microcontroller (pdf) A shorter overview (11 pages)
    • MSPGCC manual A GNU Port of TI’s tools for the MSP430 microcontrollers.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 203k
  • Answers 203k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer There is a workaround in passenger 2.2.8 so this is… May 12, 2026 at 8:32 pm
  • Editorial Team
    Editorial Team added an answer Java applets can do it, but they're a bit legacy… May 12, 2026 at 8:32 pm
  • Editorial Team
    Editorial Team added an answer As PHP frameworks typically sit on the web server and… May 12, 2026 at 8:32 pm

Related Questions

I am working on a 2D scrolling game for iPhone. I have a large
I've been wanting to work on this application for about a year now. I
Is it possible to actually use the Xcode debugger when running an iPhone app
I have an iPhone localization problem that has me perplexed. I was localizing my
I am working on a simulation system. I will soon have experimental data (histograms)

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.