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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T04:47:14+00:00 2026-06-17T04:47:14+00:00

I am now practicing assembly codes mixed with c++ codes, and I can compile

  • 0

I am now practicing assembly codes mixed with c++ codes, and I can compile the mixed codes for win32 platform without any problem as the following codes illustrate:

int main()
{

  char alphabet = 'X';
  printf ("Type letter = ");
  __asm
  {                               
       mov ah, 02
       mov dl, [alphabet]       
       int 21h                         
   }


  printf ("\n");
  return (0);
}

However, when I try to compile the above codes for x64 platform, it fails. The error message I have got is as follows:

error C4235: nonstandard extension used : '__asm' keyword not supported on this architecture

I use VC2010 for compiling, and I was wondering why VC2010 does not support assembly language compiling and what I should do in this situation. Thanks!

  • 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-17T04:47:15+00:00Added an answer on June 17, 2026 at 4:47 am

    The compiler simply does not support inline assembly in 64-bit code.

    Your options:

    • write assembly code in separate .asm files and assemble and link them together with the rest of the project
    • include in your program pre-compiled assembly code as data in some array and execute it (you’ll need to make sure the assembly code is relocatable, that is, it can be executed when placed at an arbitrary location, and you’ll need to change the memory protection for the pages underneath the array to executable)
    • use intrinsic functions if they are sufficient
    • don’t use assembly at all

    And as it’s been mentioned, chances of int 21h function 2 working in a Windows program are exactly zero. That API is only available to DOS programs.

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

Sidebar

Related Questions

i'm having a problem about my program right now. i'm practicing a program in
I am practicing overloading operators in C++ right now and I have a problem.
I just got into python very recently and now I'm practicing by (what I
ListViews have always been my weak point and right now I am practicing putting
I have been practicing TDD in C# for several years now and recently have
I have been practicing TDD and (some) XP for a few years now and
I just started practicing TDD in my projects. I'm developing a project now using
Now, this may be really stupid. But can we deploy a Java Swing Application
I am practicing TDD for some time now, I want to advance my skills
i'm new at php and i'm practicing with the basics of php now i

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.