MSDOS "Hello World" EXE

An open question - but I can not find anything to start!

I want to compile an MS-DOS "Hello World" EXE file.

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

A HELOWRLD.EXE, which I can run in my MSDOS field.

Thanksyou!

+6
dos
source share
8 answers

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

 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 -nc:\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> _ 

More about DEBUG.EXE: http://en.wikipedia.org/wiki/Debug_ (command)

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

+23
source share

Follow these steps:

  • Get and install Turbo C 2.0 from here, legally .
  • Copy this code (*)
  • Compile it.
  • Your hello.exe is ready to run.

This is the code you should copy (*):

 int main(int argc, char **argv) { printf("Hello, world.\n"); return 0; } 
+7
source share

DJGPP is a complete 32-bit C / C ++ development system for Intel 80386 (and higher) DOS-based PCs. This includes the ports of many GNU development utilities. Development tools require an 80386 or newer computer for the software they produce. In most cases, manufacturers' programs can be sold commercially without a license or royalties.

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

+4
source share

To develop C and C ++, use one of these free and open source:

  • DJGPP - DOS GCC port. It creates 32-bit protected-mode DOS applications.
  • Open Watcom - I am not so familiar with this, but it is actively developing and can configure 16- and 32-bit DOS, Windows and OS / 2.
+2
source share

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

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

+2
source share

You need an MS-DOS C compiler. Is there an older version of Borland C floating around? Alternatively, you can find the GNU C compiler port for DOS.

0
source share

Install the 16-bit Turbo C / C ++ compiler. Then create a new noname00.c file.
Write this code.

 //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 the source directory.
Try running it in your own MS-DOS window.
It should work.

0
source share

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

Work is also performed on a Windows-> 16-bit Dos compiler (it can generate .COM), but during work, which is not yet in the released branch.

0
source share

All Articles