Thread: Help on how to write a c++ code which calls TASM to assemble .asm file into .com

  1. #1
    Registered User
    Join Date
    Jun 2018
    Posts
    2

    Exclamation Help on how to write a c++ code which calls TASM to assemble .asm file into .com

    Hi,
    I am new to c++, could anyone point me to how can I write a c++ code which will call TASM to assemble the .asm file into a .com and execute it?


    I've written a c++ code that compiles an input .cpp file into .asm file but could not see any online resource on how to invoke TASM to assemble the generated .asm file.


    Thanks!

  2. #2
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,659
    Why do people insist of reducing an entire football field (64-bit machine, GB of memory, GB of filesystem) to a single blade of grass (16-bit machine, <1MB memory, few MB filesystem) ?

    Why don't you just specify the 'tiny' memory model in your archaic compiler and be done with it.

    Better yet, throw it in the bin and get a compiler which is designed for your machine and OS.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

  3. #3
    Registered User
    Join Date
    Dec 2017
    Posts
    1,633
    Quote Originally Posted by chmscrbbrfck View Post
    I am new to c++
    ...
    I've written a c++ code that compiles an input .cpp file into .asm file
    This doesn't make sense. It sounds like you are saying you wrote a C++ compiler. But you also say you are new to C++. WTF?!
    A little inaccuracy saves tons of explanation. - H.H. Munro

  4. #4
    Registered User
    Join Date
    May 2009
    Posts
    4,183
    Turbo Assembler (TASM) Turbo Assembler - Wikipedia

    Hey it is 29 years old; is there going to be a big party in India when it turns 30?

    Tim S.
    Last edited by stahta01; 06-25-2018 at 09:57 PM.
    "...a computer is a stupid machine with the ability to do incredibly smart things, while computer programmers are smart people with the ability to do incredibly stupid things. They are,in short, a perfect match.." Bill Bryson

  5. #5
    Registered User
    Join Date
    Jun 2018
    Posts
    2
    thanks everyone, I found the answer is to use system() or spawn() to invoke tasm foo.asm etc..

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. C code to write XML file
    By merafiq in forum C Programming
    Replies: 1
    Last Post: 09-27-2015, 06:16 PM
  2. How to call assemble code
    By leetow2003 in forum C Programming
    Replies: 9
    Last Post: 04-07-2012, 10:26 AM
  3. System Calls - write() & read () int
    By easly89 in forum C Programming
    Replies: 2
    Last Post: 12-18-2011, 05:12 AM
  4. System calls (open, close, write)
    By ollie88r in forum C Programming
    Replies: 7
    Last Post: 11-09-2009, 06:16 PM
  5. write and read system calls
    By nacho4d in forum C Programming
    Replies: 4
    Last Post: 01-28-2008, 10:59 AM

Tags for this Thread