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 80963
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 10, 20262026-05-10T21:23:06+00:00 2026-05-10T21:23:06+00:00

How do I access the user R13 and R14 which are saved when supervisor

  • 0

How do I access the user R13 and R14 which are saved when supervisor mode is entered? I am using an ARM7TDMI.

I.E. I do not want to access supervisor R14 which now contains the return address to user mode, instead want the value of user mode’s link register. This is part of a debugger I am writing.

Are there special aliases for these registers?

Thanks

  • 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. 2026-05-10T21:23:06+00:00Added an answer on May 10, 2026 at 9:23 pm

    I’ll describe the answer for your specific question but the same approach applies to other modes as well.

    You’ll need to change the processor mode by changing the mode bits in the CPSR to system mode. This will give you access to user mode’s SP/LR (R13 & R14). Remember that system mode is privileged, but its R13 and R14 are the same as user mode’s R13 and R14.

    Once you’re in system mode, read R13 and R14 and put them where you want. Then just switch the mode bits back to your previous mode (I believe that was supervisor mode in your example) and you’re good to go.

    Note that we did not switch from supervisor to user mode. If you switched from supervisor to user, you couldn’t get back to supervisor mode. (Otherwise there would be no protection from user code escalating privilege). That’s why we used system mode — system mode is privileged, but the registers are the same as user mode.

    You can switch between any of the privileged modes at will by manipulating the mode bits in the CPSR. I think they’re the lower 5 bits? I’m on the road & don’t have the info at my fingertips. Otherwise I would have provided you with the assembly code for what I’ve described above. Actually, if you want to put some hair on your chest, take what I’ve given you above, implement it, test it, and post it back here. 😀

    (One thing I should add for the ‘general case’ (yours is very specific) — you can examine the SPSR to see ‘where you came from’ — and use that to determine which mode you need to switch to.)

    By the way, I just did this recently for one of my customers…. small world, I guess.

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

Sidebar

Ask A Question

Stats

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

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

    • 7 Answers
  • Editorial Team

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

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • added an answer You can use the initWithData: initializer: [[NSString alloc] initWithData:data encoding:NSASCIIStringEncoding];… May 11, 2026 at 10:03 am
  • added an answer Using is can hurt performance if, once you check the… May 11, 2026 at 10:03 am
  • added an answer class Object def method_missing(meth,*args) # do whatever you want here… May 11, 2026 at 10:03 am

Related Questions

How do I access the user R13 and R14 which are saved when supervisor
How do I access user preferences in Firefox? I have the following code: var
How do I view the grants (access rights) for a given user in MySQL?
How do I access the index while iterating over a sequence with a for
For instance in the snippet below - how do I access the h1 element
When Using Dynamic Proxies, how do I access the underlying object's Annotations? Specifically I'm
How do I access a Control in the LayoutTemplate of a ListView control? I
What's the name of the circled UI element here? And how do I access
How do I access an image during run time that I have added to
How do I access specific sections of man pages?

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.