Author Topic: asm program shuts down dos box  (Read 9085 times)


  • Guest
asm program shuts down dos box
« on: November 27, 2004, 04:42:20 PM »
Hello all,

i got the "hello world" example compiled successfully and tried to run it but instead of displaying the string, the program simply shuts down my dos box.

Is there any help to see the string?

Below is the code i used:

org 100h                               ;all com programs start at 0x100h
    mov dx,msg                     ;to display our message, we move it into dx
    mov ah,9                          ;we display 9 chars
    int 21h                               ;ok, print it
    mov ah,4Ch                      ;now prepare program shutdown
    int 21h                                ;do it

msg db 'Hello, World!',0Dh,0Ah,'$'  ;the message we are about to display

May be this is XP specific, or did any have a similar problem in other Win32 versions?

Alfonso V

  • Guest
Re: asm program shuts down dos box
« Reply #1 on: November 30, 2004, 09:07:44 AM »
Hello, Alexander

I believe you run clicking on your program icon. If it is right, you must change next property: Click on it with your right mouse button and desactive "close at end" (something similar because my sistem is in spanish) into "program" properties.

Another posibility is execute "cmd" in your windows and change to your program path with "cd \" and then execute your program.

Can this help you?