Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Jul 24th, 2009, 12:34 PM   #1
dre
Newbie
 
Join Date: Jul 2009
Posts: 1
Rep Power: 0 dre is on a distinguished road
How do I compile and run an assembly program using TASM?

I have this small hello world program:

.386
code segment use16
assume cs:code,ds:data,ss:mystack
; ; is used to write comments
begin : ; here begin is a label as it's follows by :
mov ax,data ;put in ds the adresse of data segment
move ds,ax ; using ax regiter as ds is not directly assecible
mov ah,09 ; 09h is the function to write in screen
mov dx,offset message ; the offset of messege is put in dx
int 21h ; call of interrupt 21 to execute the function

mov ah,4ch ; appel a la fonction 4ch (h for hexadecimal)
int 21h ; call to execute the function for ending this
code ends ; program must be in each exe program

data segment use16 ; the dump of data segment and variable in
message db "hello, world !",'$' ; here an array of char ends with '$'
data ends ;

mystack segment stack ; begin of stack
dumping db 256 DUP (?) ; 256 cellule full with (?)
mystack ends ; end of stak


end begin ; end du code source



and i just have tasm downloaded but don't know how to compile this and get it running. i know i have to do something with DOS, i have this program saved in notepad...can somebody please tell me how i can get this program running with TASM?

thank you.
dre is offline   Reply With Quote
Old Jul 27th, 2009, 1:59 AM   #2
DWORD
Newbie
 
Join Date: Feb 2009
Posts: 4
Rep Power: 0 DWORD is on a distinguished road
Re: How do I compile and run an assembly program using TASM?

Quote:
Originally Posted by dre View Post
I have this small hello world program:

.386
code segment use16
assume cs:code,ds:data,ss:mystack
; ; is used to write comments
begin : ; here begin is a label as it's follows by :
mov ax,data ;put in ds the adresse of data segment
move ds,ax ; using ax regiter as ds is not directly assecible
mov ah,09 ; 09h is the function to write in screen
mov dx,offset message ; the offset of messege is put in dx
int 21h ; call of interrupt 21 to execute the function

mov ah,4ch ; appel a la fonction 4ch (h for hexadecimal)
int 21h ; call to execute the function for ending this
code ends ; program must be in each exe program

data segment use16 ; the dump of data segment and variable in
message db "hello, world !",'$' ; here an array of char ends with '$'
data ends ;

mystack segment stack ; begin of stack
dumping db 256 DUP (?) ; 256 cellule full with (?)
mystack ends ; end of stak


end begin ; end du code source



and i just have tasm downloaded but don't know how to compile this and get it running. i know i have to do something with DOS, i have this program saved in notepad...can somebody please tell me how i can get this program running with TASM?

thank you.

Hi there,
You can use TASM.EXE (or TASM32.EXE) as compiler, and TLINK.EXE (or TLINK32.EXE) as linker. You may type tasm.exe and tlink.exe at the command prompt for more information!

Good luck!
DWORD is offline   Reply With Quote
Old Aug 5th, 2009, 7:45 PM   #3
rax
Newbie
 
Join Date: Aug 2009
Posts: 19
Rep Power: 0 rax is on a distinguished road
Re: How do I compile and run an assembly program using TASM?

if you dont have to use TASM and your searching for best pro assembler, try FASM.
its superior to all i know.
rax is offline   Reply With Quote
Old Aug 6th, 2009, 5:43 AM   #4
vikas1234
Programmer
 
Join Date: Aug 2008
Posts: 86
Rep Power: 7 vikas1234 is on a distinguished road
Re: How do I compile and run an assembly program using TASM?

tasm is classic .. when you work on tasm it feels like u r doing something great . Even it is the mulitplication of 2 number ( I know its not easy in assembly language )
vikas1234 is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Installation error setup of program at client simeonyv Visual Basic 1 Jun 18th, 2009 10:18 PM
compile a program from another program hacker024 C++ 6 May 24th, 2009 7:22 PM
Code needed for Linked List program gentleboy C++ 8 Apr 3rd, 2009 2:52 PM
how do i remove this occurence in my program AngelShar C 2 Oct 18th, 2008 6:37 PM
CodeRun - Programming on the Run bigguy Project Ideas 12 Aug 18th, 2007 11:46 PM




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 9:06 AM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC