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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T09:35:24+00:00 2026-05-25T09:35:24+00:00

I am trying to compile this OS with nasm on a 64-bit OS X

  • 0

I am trying to compile this OS with nasm on a 64-bit OS X computer. However, the assembler is giving me errors that seem to be coming from the fact that it doesn’t realize that this code is 64-bit instead of 32-bit. How can I fix this without modifing the code?

The errors:

$ nasm kernel64.asm -o kernel64.sys
init_64.asm:153: error: symbol `lodsq' redefined
init_net.asm:38: error: symbol `stosq' redefined
init_net.asm:40: error: symbol `stosq' redefined
init_net.asm:42: error: symbol `stosq' redefined
init_net.asm:49: error: symbol `stosq' redefined
init_net.asm:51: error: symbol `stosq' redefined
init_net.asm:53: error: symbol `stosq' redefined
syscalls/string.asm:363: error: parser: instruction expected
syscalls/screen.asm:264: error: symbol `jrcxz' redefined
syscalls/screen.asm:264: error: parser: instruction expected
syscalls/debug.asm:23: error: symbol `pushfq' redefined
syscalls/misc.asm:119: error: symbol `jrcxz' redefined
syscalls/misc.asm:119: error: parser: instruction expected
syscalls/misc.asm:126: error: symbol `jrcxz' redefined
syscalls/misc.asm:126: error: parser: instruction expected
syscalls/misc.asm:132: error: symbol `jrcxz' redefined
syscalls/misc.asm:132: error: parser: instruction expected
syscalls/misc.asm:326: warning: numeric constant 0x23D8AD1401DE7383 does not fit in 32 bits
syscalls/smp.asm:121: error: symbol `stosq' redefined
syscalls/smp.asm:123: error: symbol `stosq' redefined
syscalls/smp.asm:179: error: symbol `lodsq' redefined
syscalls/smp.asm:181: error: symbol `lodsq' redefined
drivers/net/rtl8169.asm:219: error: symbol `stosq' redefined
drivers/net/i8254x.asm:195: error: symbol `stosq' redefined
drivers/net/i8254x.asm:200: error: symbol `stosq' redefined
interrupt.asm:102: error: symbol `iretq' redefined
interrupt.asm:116: error: symbol `iretq' redefined
interrupt.asm:166: error: symbol `iretq' redefined
interrupt.asm:239: error: symbol `iretq' redefined
interrupt.asm:307: error: symbol `iretq' redefined
interrupt.asm:322: error: symbol `iretq' redefined
interrupt.asm:537: error: symbol `lodsq' redefined
cli.asm:22: error: symbol `jrcxz' redefined
cli.asm:22: error: parser: instruction expected
cli.asm:26: error: symbol `jrcxz' redefined
cli.asm:26: error: parser: instruction expected
  • 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-25T09:35:24+00:00Added an answer on May 25, 2026 at 9:35 am

    I think your NASM version is too old. The BareMetal OS installation instructions page says to use the latest release of NASM which is 2.9.10 (now) , and you are using version 0.98.40. Also the NASM manual says:

    The NASM 2 series support x86-64, and is the production version of NASM since 2007.

    and the BareMetal OS installation manual says:

    NASM will compile the Assembly source files into a executable binary file. NASM is also used to compile any applications that are writtin in Assembly. Make sure you are using the latest version of NASM as older versions do not work correctly.

    Therefore install the latest version.

    http://www.nasm.us/

    http://www.nasm.us/doc/nasmdocc.html

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

Sidebar

Related Questions

I'm trying to compile this function from Learn You a Haskell for Great Good
I am trying to compile this piece of code found below. However, I got
I'm trying to compile this little piece of code from the boost documentation: (http://www.boost.org/doc/libs/1_46_1/libs/iostreams/doc/tutorial/filter_usage.html)
I'm trying to compile this example But that one header isn't enough and I've
I'm trying to compile this .ccp file. I got it from https://github.com/loarabia/Clang-tutorial . //
I'm trying to compile this piece of code from the book The C Programming
I'm trying to compile this example and play around with it a bit. I've
I don't understand why I am getting compiler errors when trying to compile this:
I trying to compile this code: Int64 itag = BitConverter.ToInt64(temp, 0); itag &= 0xFFFFFFFFFFFFFC00;
I'm trying to compile this simple program to start learning how to use timers:

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.