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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T19:41:17+00:00 2026-05-26T19:41:17+00:00

I am following this tutorial as a first foray into bootloader/OS development for x86

  • 0

I am following this tutorial as a first foray into bootloader/OS development for x86 using NASM:

http://joelgompert.com/OS/TableOfContents.htm

And I’m on Lesson 4, which is making my bootloader print the “Hello, world” string.
I’m not understanding the meaning of the org instruction (directive?).

As I understand it, org defines where the program being executed is loaded into memory. This is needed when using any sort of labels or relative addresses in the program.

Suppose I have a string defined with a label like this in my program:

szHello db 'Hello, world!', 0

And I then later try to reference that label like this (only relevant snippets):

org 0x7c00
xor ax, ax
mov ds, 0
...
mov si, szHello
lodsb
...
int 0x10 ; Print first character of szHello

My question is, why is that not equivalent to this? :

org 0
mov ds, 0x7c00
...
mov si, szHello
lodsb
...
int 0x10

When I run the first example, my string appears correctly. The second example does not work.

Pointers to relevant documentation would also be greatly appreciated, if the issue is a conceptual problem on my part.

  • 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-26T19:41:18+00:00Added an answer on May 26, 2026 at 7:41 pm

    0000:7C00 is not equivalent to 7C00:0000. The segment part is counted in paragraphs, not bytes. Try this instead:

    mov ax, 0x7c0 
    mov ds, ax
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm following this tutorial here: http://brenelz.com/blog/implementing-paging-using-php-and-jquery/ Here is what I have: http://eataustineat.com/testingfolder/ I've encountered
http://www.codinghorror.com/blog/2008/04/setting-up-subversion-on-windows.html I am following this as a guide to install subversion. The tutorial at
It is my first time using android fragment. I am following this tutorial to
I was following this tutorial of Sencha Touch: http://www.vimeo.com/15672696 Perfect tutorial, worked flawless. But
I have followed this tutorial to create the first azure application http://msdn.microsoft.com/en-us/WAZPlatformTrainingCourse_IntroToWindowsAzureLabVS2010 Because after
I am following this tutorial step by step http://code.google.com/apis/maps/articles/phpsqlajax.html . Actually I copy pasted
I am following this tutorial https://developer.android.com/guide/tutorials/views/hello-tabwidget.html and have completed it. Now I would actually
I'm following the Railscasts tutorial on using OpenID with AuthLogic . This command: $
I have been using Entity Framework CTP with Code-First as in this tutorial by
I am new to WP7 programming and I have been following this tutorial http://weblogs.asp.net/scottgu/archive/2010/03/18/building-a-windows-phone-7-twitter-application-using-silverlight.aspx

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.