|
-
May 20th, 2012, 05:25 AM
#1
Hello.asm Compiles without errors yet no Hello.exe generates
Hello there,
I am newbi in assembly programming. Kindly consider the following simple hello world program in assembly;
.model small
.stack 100h
.data
message DB "Hello world !$"
.code
main:
mov ax,@data
mov ds,ax
mov dx,offset message
mov ah,09 ;print contents of DX on STDOUT
int 21h
mov ax,4ch ;Terminate to DOS successfully
int 21h
end main
I saved the file as "Hello.asm". To compile, I do this:
D:\MASM611\BIN>masm Hello.asm;
Here is the output:
Microsoft ® MASM Compatibility Driver
Copyright © Microsoft Corp 1993. All rights reserved.
Invoking: ML.EXE /I. /Zm /c /Ta Hello.asm
Microsoft ® Macro Assembler Version 6.11
Copyright © Microsoft Corp 1981-1993. All rights reserved.
Assembling: Hello.asm
Then I am linking like this:
D:\MASM611\BIN>link Hello;
After that no .EXE file is created although compiling and linking issues no error:
D:\MASM611\BIN>dir Hello.*
Volume in drive D is New Volume
Volume Serial Number is 667D-17CC
Directory of D:\MASM611\BIN
05/20/2012 10:06 AM 252 Hello.asm
05/20/2012 11:18 AM 166 Hello.obj
2 File(s) 418 bytes
0 Dir(s) 15,581,913,088 bytes free
Kindly help me. If there are no errors then why .EXE is not executed.
Best Regards
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|