Nicolas 0 Report post Posted April 30, 2006 (edited) Hi, I'm trying to learn assembly but I can't compile any "hello world" programs... And I don'n know what I'm doing wrong... I downloaded NASM ,NASMW and TASM32. The program is like this: EXAMP1.ASM:;title Hello World Program; This program displays "Hello, World!"dosseg.model small.stack 100h.datahello_message db 'Hello, World!',0dh,0ah,'$'.codemain proc mov ax,@data mov ds,ax mov ah,9 mov dx,offset hello_message int 21h mov ax,4C00h int 21hmain endpend main And when I compile this occurs:C:\>CD NICKSC:\Nicks>nasm EXAMP1.ASMEXAMP1.ASM:5: error: parser: instruction expectedEXAMP1.ASM:6: error: parser: instruction expectedEXAMP1.ASM:12: error: parser: instruction expectedEXAMP1.ASM:17: error: comma or end of line expectedEXAMP1.ASM:22: error: parser: instruction expectedEXAMP1.ASM:23: error: parser: instruction expectedC:\Nicks> Edited April 30, 2006 by Nicolas (see edit history) Share this post Link to post Share on other sites
True2Earn 0 Report post Posted April 30, 2006 this would be assembled into a .COM and not an executable (.EXE). what command line switches are you using? also, which assembler are you using? this should compile under TASM v5 without any problems. just don't leave "EXAMP1.ASM:" in the source code unless you put a semicolon in front of it (. Share this post Link to post Share on other sites
WindAndWater 0 Report post Posted April 30, 2006 Also, make sure that you're using the right assembly for your processor: IA-32, IA-64, x86-32, and x86-64 are all different. I'm not sure how much some assemblers can compensate for the discrepencies as I've only ever used ASM embedded in C with gcc. Share this post Link to post Share on other sites
iGuest 3 Report post Posted November 23, 2009 Carbage is coming out as output when executed under tasmCan't Compile Assembly Programs.Hi! I am beginning to execute 8086 assembler programs with Tasm .The following program when executed does not give output except some carbages.Please tell me what to do. .Model small .Stack .Data sum db ? .Code movax,@data mov ds,ax mov ss,ax movax,0009h add ax,00009 mov sum,ax mov ah,09h lea dx,sum int 21h mov ah,4ch int 21h end -question by gtrajan Share this post Link to post Share on other sites