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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T20:00:48+00:00 2026-05-23T20:00:48+00:00

I do not understand the offset calcualted for the branch instructions (b and bl

  • 0

I do not understand the offset calcualted for the branch instructions (b and bl at addresses 0x00011004 and 0x00011010) related to the disassembled code listed below. I’m wondering that in the hex code listing the offsets seem to be 0x000001 and 0x000002. The Opcodes for the conditions b (EA) and bl (EB) were what I expected.

Thanks for every hint in advance

MyAssemblerFunc:
00011000  stmdb       sp!, {r0 - r3, lr} 
00011004  b           00011010 
00011008  mov         r0, r0 
0001100C  mov         r0, r0 
00011010  bl          |PrintHelloWorld ( 11020h )| 
00011014  ldmia       sp!, {r0 - r3, lr} 

Related Hex Code

0x00011000  0f 40 2d e9  .@-é
0x00011004  01 00 00 ea  ...ê
0x00011008  00 00 a0 e1  .. á
0x0001100C  00 00 a0 e1  .. á
0x00011010  02 00 00 eb  ...ë
0x00011014  0f 40 bd e8  .@.è
0x00011018  00 00 a0 e1  .. á
0x0001101C  00 00 a0 e1  .. á
  • 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-23T20:00:49+00:00Added an answer on May 23, 2026 at 8:00 pm

    Since in ARM mode instructions can be placed only on word boundaries, there is no need to encode the two low bits of the address (they will be 0). Thus, the immediate value in the B instruction is the delta shifted by 2 bits. For the first branch, delta is (target – PC) >> 2. target is 00011010 and PC is 00011004+8 = 0001100C. So delta = (00011010-0001100C) >> 2 = 4 >> 2 = 1. You can do the math for the second one yourself.

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

Sidebar

Related Questions

if wrote the following code and do not understand why the trace returns false:
There are two things I do not understand about this function : 1.Offset not
I go through the code and I just do not understand what is the
I do not understand pointers. Where can I learn more about them?
I simply do not understand why both works: this.timer.Tick += new EventHandler(timer_Tick); this.timer.Tick +=
I do not understand what environment a eval or exec statement executes in. You
I do not understand this error, do not generate error in JsonResult Test (),
I do not understand how to use enumeration types. I understand what they are,
I do not understand why the dialog will not work for width in Firefox
I do not understand how the DefaultProperty Metadata tag work or what it signifies.

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.