MSDOS “Hello World” EXE









up vote
6
down vote

favorite
5












An open question - but I cant find anywhere to start!!



I want to compile a "Hello World" MS-DOS exe.



Not a program that runs in XP 16bit mode, or in MSDos mode on top of Windows OSs.



A HELOWRLD.EXE that I can run on my MSDOS box.



Thanksyou!










share|improve this question



















  • 2




    In what (programming) language?
    – wqw
    Apr 15 '10 at 12:11






  • 3




    echo Hello World (that will write what u need), perhaps you need something more specific, tell us
    – Hernán Eche
    Apr 15 '10 at 12:15







  • 1




    Here are examples in many languages (OS listed next to them). As others have pointed out - most likely you are going to use C, C++, Assembly, or even dos batch. ntecs.de/old-hp/uu9r/lang/html/lang.en.html
    – ktharsis
    Apr 15 '10 at 12:19






  • 1




    An MS-DOS exe does run in 16 bit mode, unless one of the various 32 bit extenders are used.
    – kmarsh
    Apr 15 '10 at 12:38














up vote
6
down vote

favorite
5












An open question - but I cant find anywhere to start!!



I want to compile a "Hello World" MS-DOS exe.



Not a program that runs in XP 16bit mode, or in MSDos mode on top of Windows OSs.



A HELOWRLD.EXE that I can run on my MSDOS box.



Thanksyou!










share|improve this question



















  • 2




    In what (programming) language?
    – wqw
    Apr 15 '10 at 12:11






  • 3




    echo Hello World (that will write what u need), perhaps you need something more specific, tell us
    – Hernán Eche
    Apr 15 '10 at 12:15







  • 1




    Here are examples in many languages (OS listed next to them). As others have pointed out - most likely you are going to use C, C++, Assembly, or even dos batch. ntecs.de/old-hp/uu9r/lang/html/lang.en.html
    – ktharsis
    Apr 15 '10 at 12:19






  • 1




    An MS-DOS exe does run in 16 bit mode, unless one of the various 32 bit extenders are used.
    – kmarsh
    Apr 15 '10 at 12:38












up vote
6
down vote

favorite
5









up vote
6
down vote

favorite
5






5





An open question - but I cant find anywhere to start!!



I want to compile a "Hello World" MS-DOS exe.



Not a program that runs in XP 16bit mode, or in MSDos mode on top of Windows OSs.



A HELOWRLD.EXE that I can run on my MSDOS box.



Thanksyou!










share|improve this question















An open question - but I cant find anywhere to start!!



I want to compile a "Hello World" MS-DOS exe.



Not a program that runs in XP 16bit mode, or in MSDos mode on top of Windows OSs.



A HELOWRLD.EXE that I can run on my MSDOS box.



Thanksyou!







dos






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Apr 19 '10 at 16:42

























asked Apr 15 '10 at 12:09









divinci

7,434103753




7,434103753







  • 2




    In what (programming) language?
    – wqw
    Apr 15 '10 at 12:11






  • 3




    echo Hello World (that will write what u need), perhaps you need something more specific, tell us
    – Hernán Eche
    Apr 15 '10 at 12:15







  • 1




    Here are examples in many languages (OS listed next to them). As others have pointed out - most likely you are going to use C, C++, Assembly, or even dos batch. ntecs.de/old-hp/uu9r/lang/html/lang.en.html
    – ktharsis
    Apr 15 '10 at 12:19






  • 1




    An MS-DOS exe does run in 16 bit mode, unless one of the various 32 bit extenders are used.
    – kmarsh
    Apr 15 '10 at 12:38












  • 2




    In what (programming) language?
    – wqw
    Apr 15 '10 at 12:11






  • 3




    echo Hello World (that will write what u need), perhaps you need something more specific, tell us
    – Hernán Eche
    Apr 15 '10 at 12:15







  • 1




    Here are examples in many languages (OS listed next to them). As others have pointed out - most likely you are going to use C, C++, Assembly, or even dos batch. ntecs.de/old-hp/uu9r/lang/html/lang.en.html
    – ktharsis
    Apr 15 '10 at 12:19






  • 1




    An MS-DOS exe does run in 16 bit mode, unless one of the various 32 bit extenders are used.
    – kmarsh
    Apr 15 '10 at 12:38







2




2




In what (programming) language?
– wqw
Apr 15 '10 at 12:11




In what (programming) language?
– wqw
Apr 15 '10 at 12:11




3




3




echo Hello World (that will write what u need), perhaps you need something more specific, tell us
– Hernán Eche
Apr 15 '10 at 12:15





echo Hello World (that will write what u need), perhaps you need something more specific, tell us
– Hernán Eche
Apr 15 '10 at 12:15





1




1




Here are examples in many languages (OS listed next to them). As others have pointed out - most likely you are going to use C, C++, Assembly, or even dos batch. ntecs.de/old-hp/uu9r/lang/html/lang.en.html
– ktharsis
Apr 15 '10 at 12:19




Here are examples in many languages (OS listed next to them). As others have pointed out - most likely you are going to use C, C++, Assembly, or even dos batch. ntecs.de/old-hp/uu9r/lang/html/lang.en.html
– ktharsis
Apr 15 '10 at 12:19




1




1




An MS-DOS exe does run in 16 bit mode, unless one of the various 32 bit extenders are used.
– kmarsh
Apr 15 '10 at 12:38




An MS-DOS exe does run in 16 bit mode, unless one of the various 32 bit extenders are used.
– kmarsh
Apr 15 '10 at 12:38












8 Answers
8






active

oldest

votes

















up vote
24
down vote



accepted










I think DEBUG.EXE still ships with windows (at least it does with XP). Run debug and enter something along the lines of the following transcript:



c:src> debug
-a 100
1373:0100 mov ah,9
1373:0102 mov dx,108
1373:0105 int 21
1373:0107 ret
1373:0108 db "Hello world!$"
1373:0115
-n c:hi.com
-r bx
BX 0000
:0
-r cx
CX 0000
:15
-w
Writing 00015 bytes
-q

c:src> c:hi.com
Hello world!

c:src> _


Read more on DEBUG.EXE at: http://en.wikipedia.org/wiki/Debug_(command)



And the INT 21 display string http at: http://www.uv.tietgen.dk/staff/mlha/PC/Prog/asm/int/21/09.htm






share|improve this answer


















  • 3




    +1 for the old school
    – Laurynas Biveinis
    Apr 15 '10 at 12:42










  • All the answers have been really helpful - but as you opened a door for me :) awarded Thanks!!
    – divinci
    Apr 19 '10 at 16:43










  • It isn't there in Windows 7 x64, probably because it's a 16-bit app.
    – nyuszika7h
    Feb 11 '11 at 18:10










  • 21 byte executable!! Love it!!
    – Peter
    Aug 14 '12 at 20:04

















up vote
8
down vote













Follow these steps:



  1. Get and install Turbo C 2.0 from here, legally.

  2. Copy this code (*)

  3. Compile it.

  4. Your hello.exe is ready to run.

This is code you should copy (*):



int main(int argc, char **argv)

printf("Hello, world.n");
return 0;






share|improve this answer


















  • 2




    There's also DJGPP, which is real free software and not just abandonware: delorie.com/djgpp
    – Joachim Sauer
    Apr 15 '10 at 12:17






  • 1




    yep, see my answer ;)
    – Simone Margaritelli
    Apr 15 '10 at 12:18






  • 1




    Can I suggest you get the Borland compilers from the Borland mesum itself? Abandonware is not a legal concept and the code is still copyright by Borland/Inprise/Enchilada or whatever they call themselves this week. See edn.embarcadero.com/museum
    – paxdiablo
    Apr 15 '10 at 12:27






  • 2




    No, you can download it legally from Embarcadero, the current copyright owners (see the link I gave). And even if it wasn't obtainable from anywhere, that doesn't make it legal. The site given in the answer doesn't look like you're buying a legal used copy so much as downloading a file you have no right to - why do that when you can do it legally?
    – paxdiablo
    Apr 15 '10 at 12:46






  • 2




    No problems, Pablo, but it'll always be the Borland museum to we who care :-)
    – paxdiablo
    Apr 15 '10 at 12:54


















up vote
4
down vote














DJGPP is a complete 32-bit C/C++
development system for Intel 80386
(and higher) PCs running DOS. It
includes ports of many GNU development
utilities. The development tools
require a 80386 or newer computer to
run, as do the programs they produce.
In most cases, the programs it
produces can be sold commercially
without license or royalties.




http://www.delorie.com/djgpp/






share|improve this answer



























    up vote
    2
    down vote













    For C and C++ development, use one of these free and open source compilers:




    • DJGPP - a DOS port of GCC. It builds 32-bit protected mode DOS applications.


    • Open Watcom - I'm not as familiar with this one, but it's actively developed and can target 16- and 32-bit DOS, Windows, and OS/2.





    share|improve this answer



























      up vote
      2
      down vote













      This will do it straight in the command line debugger in DOS.
      http://www2.latech.edu/~acm/helloworld/dosdebug.html



      It does write a COM file and not an EXE (there is a difference) but should be a good start for you.






      share|improve this answer



























        up vote
        0
        down vote













        You want a MS-DOS C compiler. Is there still an old version of Borland C floating around? Also, you might find a port of the GNU C compiler for DOS.






        share|improve this answer



























          up vote
          0
          down vote













          Install Turbo C/C++ 16-bit compiler. Then create new noname00.c file.

          Write this code in it.



          //Include necessary files stdio.h and conio.h for function prototypes.
          //The "int agrc , char *argv" are optional parameters to main program.If you don't want to use //it you can just write "int main()"
          int main(int argc,char *argv)

          printf("Hello World !!!!");
          getch();
          return 0;



          the .exe file generated by this compiler can be found in source directory.

          Try to run it in your own MS-DOS Box.

          It should run.






          share|improve this answer





























            up vote
            0
            down vote













            For Pascal you will want Free Pascal. It generates 32-bit Go32v2 binaries like DJGPP, and can compile old TP code.



            Work is also being done on a Windows->16-bit Dos compiler (can generate .COM), but while working, that is not in a released branch yet.






            share|improve this answer



















              protected by melpomene Nov 11 at 13:14



              Thank you for your interest in this question.
              Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).



              Would you like to answer one of these unanswered questions instead?














              8 Answers
              8






              active

              oldest

              votes








              8 Answers
              8






              active

              oldest

              votes









              active

              oldest

              votes






              active

              oldest

              votes








              up vote
              24
              down vote



              accepted










              I think DEBUG.EXE still ships with windows (at least it does with XP). Run debug and enter something along the lines of the following transcript:



              c:src> debug
              -a 100
              1373:0100 mov ah,9
              1373:0102 mov dx,108
              1373:0105 int 21
              1373:0107 ret
              1373:0108 db "Hello world!$"
              1373:0115
              -n c:hi.com
              -r bx
              BX 0000
              :0
              -r cx
              CX 0000
              :15
              -w
              Writing 00015 bytes
              -q

              c:src> c:hi.com
              Hello world!

              c:src> _


              Read more on DEBUG.EXE at: http://en.wikipedia.org/wiki/Debug_(command)



              And the INT 21 display string http at: http://www.uv.tietgen.dk/staff/mlha/PC/Prog/asm/int/21/09.htm






              share|improve this answer


















              • 3




                +1 for the old school
                – Laurynas Biveinis
                Apr 15 '10 at 12:42










              • All the answers have been really helpful - but as you opened a door for me :) awarded Thanks!!
                – divinci
                Apr 19 '10 at 16:43










              • It isn't there in Windows 7 x64, probably because it's a 16-bit app.
                – nyuszika7h
                Feb 11 '11 at 18:10










              • 21 byte executable!! Love it!!
                – Peter
                Aug 14 '12 at 20:04














              up vote
              24
              down vote



              accepted










              I think DEBUG.EXE still ships with windows (at least it does with XP). Run debug and enter something along the lines of the following transcript:



              c:src> debug
              -a 100
              1373:0100 mov ah,9
              1373:0102 mov dx,108
              1373:0105 int 21
              1373:0107 ret
              1373:0108 db "Hello world!$"
              1373:0115
              -n c:hi.com
              -r bx
              BX 0000
              :0
              -r cx
              CX 0000
              :15
              -w
              Writing 00015 bytes
              -q

              c:src> c:hi.com
              Hello world!

              c:src> _


              Read more on DEBUG.EXE at: http://en.wikipedia.org/wiki/Debug_(command)



              And the INT 21 display string http at: http://www.uv.tietgen.dk/staff/mlha/PC/Prog/asm/int/21/09.htm






              share|improve this answer


















              • 3




                +1 for the old school
                – Laurynas Biveinis
                Apr 15 '10 at 12:42










              • All the answers have been really helpful - but as you opened a door for me :) awarded Thanks!!
                – divinci
                Apr 19 '10 at 16:43










              • It isn't there in Windows 7 x64, probably because it's a 16-bit app.
                – nyuszika7h
                Feb 11 '11 at 18:10










              • 21 byte executable!! Love it!!
                – Peter
                Aug 14 '12 at 20:04












              up vote
              24
              down vote



              accepted







              up vote
              24
              down vote



              accepted






              I think DEBUG.EXE still ships with windows (at least it does with XP). Run debug and enter something along the lines of the following transcript:



              c:src> debug
              -a 100
              1373:0100 mov ah,9
              1373:0102 mov dx,108
              1373:0105 int 21
              1373:0107 ret
              1373:0108 db "Hello world!$"
              1373:0115
              -n c:hi.com
              -r bx
              BX 0000
              :0
              -r cx
              CX 0000
              :15
              -w
              Writing 00015 bytes
              -q

              c:src> c:hi.com
              Hello world!

              c:src> _


              Read more on DEBUG.EXE at: http://en.wikipedia.org/wiki/Debug_(command)



              And the INT 21 display string http at: http://www.uv.tietgen.dk/staff/mlha/PC/Prog/asm/int/21/09.htm






              share|improve this answer














              I think DEBUG.EXE still ships with windows (at least it does with XP). Run debug and enter something along the lines of the following transcript:



              c:src> debug
              -a 100
              1373:0100 mov ah,9
              1373:0102 mov dx,108
              1373:0105 int 21
              1373:0107 ret
              1373:0108 db "Hello world!$"
              1373:0115
              -n c:hi.com
              -r bx
              BX 0000
              :0
              -r cx
              CX 0000
              :15
              -w
              Writing 00015 bytes
              -q

              c:src> c:hi.com
              Hello world!

              c:src> _


              Read more on DEBUG.EXE at: http://en.wikipedia.org/wiki/Debug_(command)



              And the INT 21 display string http at: http://www.uv.tietgen.dk/staff/mlha/PC/Prog/asm/int/21/09.htm







              share|improve this answer














              share|improve this answer



              share|improve this answer








              edited Apr 15 '10 at 13:37









              paxdiablo

              624k16812361656




              624k16812361656










              answered Apr 15 '10 at 12:33









              Niels Castle

              7,4652553




              7,4652553







              • 3




                +1 for the old school
                – Laurynas Biveinis
                Apr 15 '10 at 12:42










              • All the answers have been really helpful - but as you opened a door for me :) awarded Thanks!!
                – divinci
                Apr 19 '10 at 16:43










              • It isn't there in Windows 7 x64, probably because it's a 16-bit app.
                – nyuszika7h
                Feb 11 '11 at 18:10










              • 21 byte executable!! Love it!!
                – Peter
                Aug 14 '12 at 20:04












              • 3




                +1 for the old school
                – Laurynas Biveinis
                Apr 15 '10 at 12:42










              • All the answers have been really helpful - but as you opened a door for me :) awarded Thanks!!
                – divinci
                Apr 19 '10 at 16:43










              • It isn't there in Windows 7 x64, probably because it's a 16-bit app.
                – nyuszika7h
                Feb 11 '11 at 18:10










              • 21 byte executable!! Love it!!
                – Peter
                Aug 14 '12 at 20:04







              3




              3




              +1 for the old school
              – Laurynas Biveinis
              Apr 15 '10 at 12:42




              +1 for the old school
              – Laurynas Biveinis
              Apr 15 '10 at 12:42












              All the answers have been really helpful - but as you opened a door for me :) awarded Thanks!!
              – divinci
              Apr 19 '10 at 16:43




              All the answers have been really helpful - but as you opened a door for me :) awarded Thanks!!
              – divinci
              Apr 19 '10 at 16:43












              It isn't there in Windows 7 x64, probably because it's a 16-bit app.
              – nyuszika7h
              Feb 11 '11 at 18:10




              It isn't there in Windows 7 x64, probably because it's a 16-bit app.
              – nyuszika7h
              Feb 11 '11 at 18:10












              21 byte executable!! Love it!!
              – Peter
              Aug 14 '12 at 20:04




              21 byte executable!! Love it!!
              – Peter
              Aug 14 '12 at 20:04












              up vote
              8
              down vote













              Follow these steps:



              1. Get and install Turbo C 2.0 from here, legally.

              2. Copy this code (*)

              3. Compile it.

              4. Your hello.exe is ready to run.

              This is code you should copy (*):



              int main(int argc, char **argv)

              printf("Hello, world.n");
              return 0;






              share|improve this answer


















              • 2




                There's also DJGPP, which is real free software and not just abandonware: delorie.com/djgpp
                – Joachim Sauer
                Apr 15 '10 at 12:17






              • 1




                yep, see my answer ;)
                – Simone Margaritelli
                Apr 15 '10 at 12:18






              • 1




                Can I suggest you get the Borland compilers from the Borland mesum itself? Abandonware is not a legal concept and the code is still copyright by Borland/Inprise/Enchilada or whatever they call themselves this week. See edn.embarcadero.com/museum
                – paxdiablo
                Apr 15 '10 at 12:27






              • 2




                No, you can download it legally from Embarcadero, the current copyright owners (see the link I gave). And even if it wasn't obtainable from anywhere, that doesn't make it legal. The site given in the answer doesn't look like you're buying a legal used copy so much as downloading a file you have no right to - why do that when you can do it legally?
                – paxdiablo
                Apr 15 '10 at 12:46






              • 2




                No problems, Pablo, but it'll always be the Borland museum to we who care :-)
                – paxdiablo
                Apr 15 '10 at 12:54















              up vote
              8
              down vote













              Follow these steps:



              1. Get and install Turbo C 2.0 from here, legally.

              2. Copy this code (*)

              3. Compile it.

              4. Your hello.exe is ready to run.

              This is code you should copy (*):



              int main(int argc, char **argv)

              printf("Hello, world.n");
              return 0;






              share|improve this answer


















              • 2




                There's also DJGPP, which is real free software and not just abandonware: delorie.com/djgpp
                – Joachim Sauer
                Apr 15 '10 at 12:17






              • 1




                yep, see my answer ;)
                – Simone Margaritelli
                Apr 15 '10 at 12:18






              • 1




                Can I suggest you get the Borland compilers from the Borland mesum itself? Abandonware is not a legal concept and the code is still copyright by Borland/Inprise/Enchilada or whatever they call themselves this week. See edn.embarcadero.com/museum
                – paxdiablo
                Apr 15 '10 at 12:27






              • 2




                No, you can download it legally from Embarcadero, the current copyright owners (see the link I gave). And even if it wasn't obtainable from anywhere, that doesn't make it legal. The site given in the answer doesn't look like you're buying a legal used copy so much as downloading a file you have no right to - why do that when you can do it legally?
                – paxdiablo
                Apr 15 '10 at 12:46






              • 2




                No problems, Pablo, but it'll always be the Borland museum to we who care :-)
                – paxdiablo
                Apr 15 '10 at 12:54













              up vote
              8
              down vote










              up vote
              8
              down vote









              Follow these steps:



              1. Get and install Turbo C 2.0 from here, legally.

              2. Copy this code (*)

              3. Compile it.

              4. Your hello.exe is ready to run.

              This is code you should copy (*):



              int main(int argc, char **argv)

              printf("Hello, world.n");
              return 0;






              share|improve this answer














              Follow these steps:



              1. Get and install Turbo C 2.0 from here, legally.

              2. Copy this code (*)

              3. Compile it.

              4. Your hello.exe is ready to run.

              This is code you should copy (*):



              int main(int argc, char **argv)

              printf("Hello, world.n");
              return 0;







              share|improve this answer














              share|improve this answer



              share|improve this answer








              edited Apr 15 '10 at 12:47









              paxdiablo

              624k16812361656




              624k16812361656










              answered Apr 15 '10 at 12:16









              Pablo Santa Cruz

              131k23197250




              131k23197250







              • 2




                There's also DJGPP, which is real free software and not just abandonware: delorie.com/djgpp
                – Joachim Sauer
                Apr 15 '10 at 12:17






              • 1




                yep, see my answer ;)
                – Simone Margaritelli
                Apr 15 '10 at 12:18






              • 1




                Can I suggest you get the Borland compilers from the Borland mesum itself? Abandonware is not a legal concept and the code is still copyright by Borland/Inprise/Enchilada or whatever they call themselves this week. See edn.embarcadero.com/museum
                – paxdiablo
                Apr 15 '10 at 12:27






              • 2




                No, you can download it legally from Embarcadero, the current copyright owners (see the link I gave). And even if it wasn't obtainable from anywhere, that doesn't make it legal. The site given in the answer doesn't look like you're buying a legal used copy so much as downloading a file you have no right to - why do that when you can do it legally?
                – paxdiablo
                Apr 15 '10 at 12:46






              • 2




                No problems, Pablo, but it'll always be the Borland museum to we who care :-)
                – paxdiablo
                Apr 15 '10 at 12:54













              • 2




                There's also DJGPP, which is real free software and not just abandonware: delorie.com/djgpp
                – Joachim Sauer
                Apr 15 '10 at 12:17






              • 1




                yep, see my answer ;)
                – Simone Margaritelli
                Apr 15 '10 at 12:18






              • 1




                Can I suggest you get the Borland compilers from the Borland mesum itself? Abandonware is not a legal concept and the code is still copyright by Borland/Inprise/Enchilada or whatever they call themselves this week. See edn.embarcadero.com/museum
                – paxdiablo
                Apr 15 '10 at 12:27






              • 2




                No, you can download it legally from Embarcadero, the current copyright owners (see the link I gave). And even if it wasn't obtainable from anywhere, that doesn't make it legal. The site given in the answer doesn't look like you're buying a legal used copy so much as downloading a file you have no right to - why do that when you can do it legally?
                – paxdiablo
                Apr 15 '10 at 12:46






              • 2




                No problems, Pablo, but it'll always be the Borland museum to we who care :-)
                – paxdiablo
                Apr 15 '10 at 12:54








              2




              2




              There's also DJGPP, which is real free software and not just abandonware: delorie.com/djgpp
              – Joachim Sauer
              Apr 15 '10 at 12:17




              There's also DJGPP, which is real free software and not just abandonware: delorie.com/djgpp
              – Joachim Sauer
              Apr 15 '10 at 12:17




              1




              1




              yep, see my answer ;)
              – Simone Margaritelli
              Apr 15 '10 at 12:18




              yep, see my answer ;)
              – Simone Margaritelli
              Apr 15 '10 at 12:18




              1




              1




              Can I suggest you get the Borland compilers from the Borland mesum itself? Abandonware is not a legal concept and the code is still copyright by Borland/Inprise/Enchilada or whatever they call themselves this week. See edn.embarcadero.com/museum
              – paxdiablo
              Apr 15 '10 at 12:27




              Can I suggest you get the Borland compilers from the Borland mesum itself? Abandonware is not a legal concept and the code is still copyright by Borland/Inprise/Enchilada or whatever they call themselves this week. See edn.embarcadero.com/museum
              – paxdiablo
              Apr 15 '10 at 12:27




              2




              2




              No, you can download it legally from Embarcadero, the current copyright owners (see the link I gave). And even if it wasn't obtainable from anywhere, that doesn't make it legal. The site given in the answer doesn't look like you're buying a legal used copy so much as downloading a file you have no right to - why do that when you can do it legally?
              – paxdiablo
              Apr 15 '10 at 12:46




              No, you can download it legally from Embarcadero, the current copyright owners (see the link I gave). And even if it wasn't obtainable from anywhere, that doesn't make it legal. The site given in the answer doesn't look like you're buying a legal used copy so much as downloading a file you have no right to - why do that when you can do it legally?
              – paxdiablo
              Apr 15 '10 at 12:46




              2




              2




              No problems, Pablo, but it'll always be the Borland museum to we who care :-)
              – paxdiablo
              Apr 15 '10 at 12:54





              No problems, Pablo, but it'll always be the Borland museum to we who care :-)
              – paxdiablo
              Apr 15 '10 at 12:54











              up vote
              4
              down vote














              DJGPP is a complete 32-bit C/C++
              development system for Intel 80386
              (and higher) PCs running DOS. It
              includes ports of many GNU development
              utilities. The development tools
              require a 80386 or newer computer to
              run, as do the programs they produce.
              In most cases, the programs it
              produces can be sold commercially
              without license or royalties.




              http://www.delorie.com/djgpp/






              share|improve this answer
























                up vote
                4
                down vote














                DJGPP is a complete 32-bit C/C++
                development system for Intel 80386
                (and higher) PCs running DOS. It
                includes ports of many GNU development
                utilities. The development tools
                require a 80386 or newer computer to
                run, as do the programs they produce.
                In most cases, the programs it
                produces can be sold commercially
                without license or royalties.




                http://www.delorie.com/djgpp/






                share|improve this answer






















                  up vote
                  4
                  down vote










                  up vote
                  4
                  down vote










                  DJGPP is a complete 32-bit C/C++
                  development system for Intel 80386
                  (and higher) PCs running DOS. It
                  includes ports of many GNU development
                  utilities. The development tools
                  require a 80386 or newer computer to
                  run, as do the programs they produce.
                  In most cases, the programs it
                  produces can be sold commercially
                  without license or royalties.




                  http://www.delorie.com/djgpp/






                  share|improve this answer













                  DJGPP is a complete 32-bit C/C++
                  development system for Intel 80386
                  (and higher) PCs running DOS. It
                  includes ports of many GNU development
                  utilities. The development tools
                  require a 80386 or newer computer to
                  run, as do the programs they produce.
                  In most cases, the programs it
                  produces can be sold commercially
                  without license or royalties.




                  http://www.delorie.com/djgpp/







                  share|improve this answer












                  share|improve this answer



                  share|improve this answer










                  answered Apr 15 '10 at 12:16









                  Simone Margaritelli

                  2,20983565




                  2,20983565




















                      up vote
                      2
                      down vote













                      For C and C++ development, use one of these free and open source compilers:




                      • DJGPP - a DOS port of GCC. It builds 32-bit protected mode DOS applications.


                      • Open Watcom - I'm not as familiar with this one, but it's actively developed and can target 16- and 32-bit DOS, Windows, and OS/2.





                      share|improve this answer
























                        up vote
                        2
                        down vote













                        For C and C++ development, use one of these free and open source compilers:




                        • DJGPP - a DOS port of GCC. It builds 32-bit protected mode DOS applications.


                        • Open Watcom - I'm not as familiar with this one, but it's actively developed and can target 16- and 32-bit DOS, Windows, and OS/2.





                        share|improve this answer






















                          up vote
                          2
                          down vote










                          up vote
                          2
                          down vote









                          For C and C++ development, use one of these free and open source compilers:




                          • DJGPP - a DOS port of GCC. It builds 32-bit protected mode DOS applications.


                          • Open Watcom - I'm not as familiar with this one, but it's actively developed and can target 16- and 32-bit DOS, Windows, and OS/2.





                          share|improve this answer












                          For C and C++ development, use one of these free and open source compilers:




                          • DJGPP - a DOS port of GCC. It builds 32-bit protected mode DOS applications.


                          • Open Watcom - I'm not as familiar with this one, but it's actively developed and can target 16- and 32-bit DOS, Windows, and OS/2.






                          share|improve this answer












                          share|improve this answer



                          share|improve this answer










                          answered Apr 15 '10 at 12:20









                          Josh Kelley

                          41.2k15102190




                          41.2k15102190




















                              up vote
                              2
                              down vote













                              This will do it straight in the command line debugger in DOS.
                              http://www2.latech.edu/~acm/helloworld/dosdebug.html



                              It does write a COM file and not an EXE (there is a difference) but should be a good start for you.






                              share|improve this answer
























                                up vote
                                2
                                down vote













                                This will do it straight in the command line debugger in DOS.
                                http://www2.latech.edu/~acm/helloworld/dosdebug.html



                                It does write a COM file and not an EXE (there is a difference) but should be a good start for you.






                                share|improve this answer






















                                  up vote
                                  2
                                  down vote










                                  up vote
                                  2
                                  down vote









                                  This will do it straight in the command line debugger in DOS.
                                  http://www2.latech.edu/~acm/helloworld/dosdebug.html



                                  It does write a COM file and not an EXE (there is a difference) but should be a good start for you.






                                  share|improve this answer












                                  This will do it straight in the command line debugger in DOS.
                                  http://www2.latech.edu/~acm/helloworld/dosdebug.html



                                  It does write a COM file and not an EXE (there is a difference) but should be a good start for you.







                                  share|improve this answer












                                  share|improve this answer



                                  share|improve this answer










                                  answered Apr 15 '10 at 12:23









                                  ktharsis

                                  3,09511430




                                  3,09511430




















                                      up vote
                                      0
                                      down vote













                                      You want a MS-DOS C compiler. Is there still an old version of Borland C floating around? Also, you might find a port of the GNU C compiler for DOS.






                                      share|improve this answer
























                                        up vote
                                        0
                                        down vote













                                        You want a MS-DOS C compiler. Is there still an old version of Borland C floating around? Also, you might find a port of the GNU C compiler for DOS.






                                        share|improve this answer






















                                          up vote
                                          0
                                          down vote










                                          up vote
                                          0
                                          down vote









                                          You want a MS-DOS C compiler. Is there still an old version of Borland C floating around? Also, you might find a port of the GNU C compiler for DOS.






                                          share|improve this answer












                                          You want a MS-DOS C compiler. Is there still an old version of Borland C floating around? Also, you might find a port of the GNU C compiler for DOS.







                                          share|improve this answer












                                          share|improve this answer



                                          share|improve this answer










                                          answered Apr 15 '10 at 12:15









                                          Daren Thomas

                                          41.9k36129183




                                          41.9k36129183




















                                              up vote
                                              0
                                              down vote













                                              Install Turbo C/C++ 16-bit compiler. Then create new noname00.c file.

                                              Write this code in it.



                                              //Include necessary files stdio.h and conio.h for function prototypes.
                                              //The "int agrc , char *argv" are optional parameters to main program.If you don't want to use //it you can just write "int main()"
                                              int main(int argc,char *argv)

                                              printf("Hello World !!!!");
                                              getch();
                                              return 0;



                                              the .exe file generated by this compiler can be found in source directory.

                                              Try to run it in your own MS-DOS Box.

                                              It should run.






                                              share|improve this answer


























                                                up vote
                                                0
                                                down vote













                                                Install Turbo C/C++ 16-bit compiler. Then create new noname00.c file.

                                                Write this code in it.



                                                //Include necessary files stdio.h and conio.h for function prototypes.
                                                //The "int agrc , char *argv" are optional parameters to main program.If you don't want to use //it you can just write "int main()"
                                                int main(int argc,char *argv)

                                                printf("Hello World !!!!");
                                                getch();
                                                return 0;



                                                the .exe file generated by this compiler can be found in source directory.

                                                Try to run it in your own MS-DOS Box.

                                                It should run.






                                                share|improve this answer
























                                                  up vote
                                                  0
                                                  down vote










                                                  up vote
                                                  0
                                                  down vote









                                                  Install Turbo C/C++ 16-bit compiler. Then create new noname00.c file.

                                                  Write this code in it.



                                                  //Include necessary files stdio.h and conio.h for function prototypes.
                                                  //The "int agrc , char *argv" are optional parameters to main program.If you don't want to use //it you can just write "int main()"
                                                  int main(int argc,char *argv)

                                                  printf("Hello World !!!!");
                                                  getch();
                                                  return 0;



                                                  the .exe file generated by this compiler can be found in source directory.

                                                  Try to run it in your own MS-DOS Box.

                                                  It should run.






                                                  share|improve this answer














                                                  Install Turbo C/C++ 16-bit compiler. Then create new noname00.c file.

                                                  Write this code in it.



                                                  //Include necessary files stdio.h and conio.h for function prototypes.
                                                  //The "int agrc , char *argv" are optional parameters to main program.If you don't want to use //it you can just write "int main()"
                                                  int main(int argc,char *argv)

                                                  printf("Hello World !!!!");
                                                  getch();
                                                  return 0;



                                                  the .exe file generated by this compiler can be found in source directory.

                                                  Try to run it in your own MS-DOS Box.

                                                  It should run.







                                                  share|improve this answer














                                                  share|improve this answer



                                                  share|improve this answer








                                                  edited Apr 15 '10 at 12:36









                                                  Joachim Sauer

                                                  232k49480559




                                                  232k49480559










                                                  answered Apr 15 '10 at 12:33









                                                  desaiparth

                                                  611513




                                                  611513




















                                                      up vote
                                                      0
                                                      down vote













                                                      For Pascal you will want Free Pascal. It generates 32-bit Go32v2 binaries like DJGPP, and can compile old TP code.



                                                      Work is also being done on a Windows->16-bit Dos compiler (can generate .COM), but while working, that is not in a released branch yet.






                                                      share|improve this answer
























                                                        up vote
                                                        0
                                                        down vote













                                                        For Pascal you will want Free Pascal. It generates 32-bit Go32v2 binaries like DJGPP, and can compile old TP code.



                                                        Work is also being done on a Windows->16-bit Dos compiler (can generate .COM), but while working, that is not in a released branch yet.






                                                        share|improve this answer






















                                                          up vote
                                                          0
                                                          down vote










                                                          up vote
                                                          0
                                                          down vote









                                                          For Pascal you will want Free Pascal. It generates 32-bit Go32v2 binaries like DJGPP, and can compile old TP code.



                                                          Work is also being done on a Windows->16-bit Dos compiler (can generate .COM), but while working, that is not in a released branch yet.






                                                          share|improve this answer












                                                          For Pascal you will want Free Pascal. It generates 32-bit Go32v2 binaries like DJGPP, and can compile old TP code.



                                                          Work is also being done on a Windows->16-bit Dos compiler (can generate .COM), but while working, that is not in a released branch yet.







                                                          share|improve this answer












                                                          share|improve this answer



                                                          share|improve this answer










                                                          answered Jun 23 '15 at 7:07









                                                          Marco van de Voort

                                                          22k43979




                                                          22k43979















                                                              protected by melpomene Nov 11 at 13:14



                                                              Thank you for your interest in this question.
                                                              Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).



                                                              Would you like to answer one of these unanswered questions instead?



                                                              這個網誌中的熱門文章

                                                              How to read a connectionString WITH PROVIDER in .NET Core?

                                                              In R, how to develop a multiplot heatmap.2 figure showing key labels successfully

                                                              Museum of Modern and Contemporary Art of Trento and Rovereto