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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T06:54:22+00:00 2026-05-25T06:54:22+00:00

I have the following source snippet from a book that I’m reading now. So

  • 0

I have the following source snippet from a book that I’m reading now. So I created an asm file and typed exactly. Then used nasm command (nasm -f elf test.asm) then tried to compile into an executable file by using gcc (gcc test.o -o test) then I get the following error.

Error:

ld: warning: ignoring file test.o, file was built for unsupported file format which is not the architecture being linked (x86_64)

Source code:

[BITS 16]

[SECTION .text]

START:
    mov dx, eatmsg
    mov ah, 9
    int 21H

    mov ax, 04C00H
    int 21H

[SECTION .data]

eatmsg  db "Eat at Joe's!", 13, 10, "$"

I guess the source code is not compatible with current generation of CPUs (the book is old…).

How do I fix this source code to run under x86_64 CPUs ?

  • 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-25T06:54:22+00:00Added an answer on May 25, 2026 at 6:54 am

    If you want to continue using that old book to learn the basics (which is just fine, nothing wrong with learning the basics/old way before moving on to modern OS), you can run it in DOSBox, or a FreeDOS VM.

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

Sidebar

Related Questions

I have the following SVG source code that generates a number of boxes with
suppose that,we have following code auto_ptr<T> source() { return auto_ptr<T>( new T(1) ); }
I have the following Javascript snippet that receives an customerID via parameter (i'm going
I have the following (fairly) simple JavaScript snippet that I have wired into Greasemonkey.
I have the following jquery Autocomplete form that pulls data in from a local
I have the following (sample)code to filter search results from a LLBLGen data source:
I have following source. In insertMessage(..), it calls selectMessage to check whether duplicate record
I have the following source code: Processmethod() { QDialog *ProcessMessage = new QDialog; Ui::DialogProcessMessage
I have the following source code: void Processmethod() { QDialog *ProcessMessage = new QDialog;
I have the following XML source structure: <turnovers> <turnover repid=1 amount=500 rate=0.1/> <turnover repid=5

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.