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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T10:41:08+00:00 2026-06-06T10:41:08+00:00

I am writing boot code where I would like to use only relative addressing

  • 0

I am writing boot code where I would like to use only relative addressing with branch instructions.

I have noticed the following assembly code:

110: lwz r4,0(r6)
      ...
      ...
     b 110b

The destination of the branch is a label that is all numerics and the branch instruction has the letter ‘b’ after the label. I assume the ‘b’ means backwards. I have also seen ‘f’, which I assume means forward.

This notation would seem to imply relative addressing, but I can’t find any documentation stating such.

Is the notation of using numerics followed by ‘f’ or ‘b’ the only mechanism to guarantee relative branching? or can an alphanumeric label (more meaningful names) be used with a f/b suffix?

I am using a gcc cross-compiler.

  • 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-06-06T10:41:10+00:00Added an answer on June 6, 2026 at 10:41 am

    The relative/absolute distinction is inferred from the instruction used. There should be no need for the assembler to guess which one you want. For PPC:

    b  110b ; relative
    ba 110b ; absolute
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

The following site Writing Boot Sector Code provides a sample of code that prints
While writing some C code, I decided to compile it to assembly and read
I'm writing code to display notifications to the user at specific times (just like
I had caught phone boot event. On boot complete event I am writing following
Writing a test app to emulate PIO lines, I have a very simple Python/Tk
Writing documentation in html requires some code examples. What to do with characters that
I'm writing a boot script for an ARM-Cortex M3 based device. If I compile
Hi I'm writing a application for android that is started from boot up and
I am writing a large C program for embedded use. Every module in this
I am trying to print character from boot loader using code [BITS 16] ;Tells

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.