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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T16:40:20+00:00 2026-05-11T16:40:20+00:00

At the risk of appearing a dinosaur, I have some old C++ code, compiled

  • 0

At the risk of appearing a dinosaur, I have some old C++ code, compiled with Borland C++, which sets registers, and interfaces to an Assembler module, which I would like to modernize. I have just installed MS VC++ Express, and needless to say a lot of things don’t work! The default seems to be Win32, which is fine, so I have blanked out FAR and HUGE. PASCAL seems to map to __stdcall. So I have a macro

 #define THRCOMP  extern "C" int FAR PASCAL _Export

where THRCOMP goes in front of a module name. This presumably results in something like

extern "C" int __stdcall _Export <modname>;

which the compiler doesn’t like, and puts out a message about an “anachronism” (doesn’t say what!). What is wrong?

Also the old code sets has in-line Assembler which I need to turn into a separately compiled subroutine – is there a (free) Assembler, and can it link Assembler obj decks in with C++?

By the way, I can’t see my obj decks – but WinZip picked them up! Explanation?

Generally, is there a guide to migrating old C++ code?

Thanks in advance.

  • 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-11T16:40:20+00:00Added an answer on May 11, 2026 at 4:40 pm

    A couple of specific things from your example:

    • VC doesn’t like _Export at all.
    • the anachronism is that you have modifiers (like __stdcall) on a data declaration. If <modname> doesn’t have parens it’s a data declaration and the modifiers don’t do anything. If <modname> is a function implemented in assembly, you should still have the declaration include the argument list.

    For example:

    extern "C" int __stdcall  modname( int x);
    

    You can get a free assembler from the Windows Driver Kit (WDK – what used to be called the DDK), but if you’re current code is written using Borland’s TASM compiler it might not be using the same syntax so there might be quite a bit of work porting it. However, if the current assembler is 16-bit code, you’re going to have a lot of work porting it to 32-bit assembler anyway…

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

Sidebar

Related Questions

We have some code that removes dangerous attributes and tags from HTML. I noticed
Some high risk data operations need to be logged. In this case, the high
I know the security risk associated and have brought it up with the business,
I believe the newest style of Flash-based advertisements might be a security risk. Have
At the risk of being downmodded, I want to ask what the best mechanism
At the risk of becoming the village idiot, can someone explain to me why
As a temporary quick fix to mitigate the major risk while working on the
Our system (exotic commodity derivative trade capture and risk management) is being redeveloped shortly.
For example: http://stackoverflow.com/questions/396164/exposing-database-ids-security-risk and http://stackoverflow.com/questions/396164/blah-blah loads the same question. (I guess this is DB
I've heard that exposing database IDs (in URLs, for example) is a security risk,

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.