TASM Begginer

Reply

Join Date: Sep 2005
Posts: 1
Reputation: zaiboot is an unknown quantity at this point 
Solved Threads: 0
zaiboot zaiboot is offline Offline
Newbie Poster

TASM Begginer

 
0
  #1
Sep 18th, 2005
Hi, i need some help with a directive called ASSUME, and i have to write a program that display a string but i can't use .code nor code
and i have no idea of how can i make it work. Besides i can't find information about ASSUME. Please someone help me. This is the sample program i try to use.
TITLE HELLO

.Model Small
.Stack 160h

.Data
infor db "Hello world",10,12+1
inforlen Equ 13

.Code
start: MOV AX,@data
MOV DS,AX
MOV CX,inforleN
MOV SI,0
again: MOV AL,infor[SI]
CALL printch
INC SI
LOOP again
MOV AX,4c00h
INT 21h

printch Proc Near
MOV BX,0
MOV AH,0Eh
INT 10h
RET
printch EndP

End start
Reply With Quote Quick reply to this message  
Join Date: Mar 2005
Posts: 128
Reputation: Evenbit is on a distinguished road 
Solved Threads: 4
Evenbit's Avatar
Evenbit Evenbit is offline Offline
Junior Poster

Re: TASM Begginer

 
0
  #2
Sep 20th, 2005
Some links and other resources that might help you newbies...

Lot of links at assemblylanguage.net:

http://www.cheapersunglasses.com//asm.html

More links at the Open Directory Project:

http://dmoz.org/Computers/Programmin...ages/Assembly/


- ASSEMBLERS -

MASM32
http://www.movsd.com

NASM: The Netwide Assembler
http://nasm.sourceforge.net

HLA: High Level Assembly Language
http://webster.cs.ucr.edu/AsmTools/HLA/index.html

FASM: The Flat Assembler
http://flatassembler.net/

GoAsm
http://www.godevtool.com/

A86 (DOS) [Free]/A386 (Windows) [Commercial]
http://eji.com/a86/

Or, you can Write Your Own!
http://webster.cs.ucr.edu/AsmTools/...rOwn/index.html


USENET

alt.comp.lang.assembler
alt.lang.asm
alt.os.assembly
alt.os.development
comp.lang.asm.x86
comp.lang.ml
comp.software.extreme-programming

WEB-BASED

http://www.tek-tips.com/threadminder.cfm?pid=272
http://win32asm.cjb.net
http://www.masmforum.com/
http://board.flatassembler.net/

GROUP-BASED

http://groups.yahoo.com/group/aoaprogramming/
http://groups.yahoo.com/group/win32-nasm-users/
http://groups.yahoo.com/group/win32masm/

- Other useful resources -

Intel Manuals and such
http://www.sandpile.org/

Ralph Brown's Interupt List
http://www-2.cs.cmu.edu/afs/cs.cmu..../ralf-home.html

ASSEMBLY LANGUAGE information, tools, forums, and other links available at:
http://www.faqs.org/faqs/by-newsgrou...g.asm.x86.html

Nathan.
while (CPU is present) {some assembly required}
Reply With Quote Quick reply to this message  
Join Date: Jul 2005
Posts: 104
Reputation: Alvein is an unknown quantity at this point 
Solved Threads: 4
Alvein's Avatar
Alvein Alvein is offline Offline
Junior Poster

Re: TASM Begginer

 
0
  #3
Sep 20th, 2005
Originally Posted by zaiboot
Hi, i need some help with a directive called ASSUME, and i have to write a program that display a string but i can't use .code nor code
and i have no idea of how can i make it work. Besides i can't find information about ASSUME. Please someone help me. This is the sample program i try to use.
TITLE HELLO

.Model Small
.Stack 160h

.Data
infor db "Hello world",10,12+1
inforlen Equ 13

.Code
start: MOV AX,@data
MOV DS,AX
MOV CX,inforleN
MOV SI,0
again: MOV AL,infor[SI]
CALL printch
INC SI
LOOP again
MOV AX,4c00h
INT 21h

printch Proc Near
MOV BX,0
MOV AH,0Eh
INT 10h
RET
printch EndP

End start

In such case, you will have to change the ASM convention to MASM (which is weird, cause you're using TASM):

  1. DATASG SEGMENT PARA 'DATA'
  2. infor db "Hello world",10,12+1
  3. inforlen Equ 13
  4. DATASG ENDS
  5.  
  6. STACKSG SEGMENT PARA STACK 'STACK'
  7. mystack db 160h dup(?)
  8. STACKSG ENDS
  9.  
  10. CODESG SEGMENT PARA 'CODE'
  11.  
  12. HELLO PROC FAR
  13. ASSUME CS:CODESG,DS:DATASG,SS:STACKSG
  14. start: MOV AX,DATASG
  15. MOV DS,AX
  16. MOV CX,inforleN
  17. MOV SI,0
  18. again: MOV AL,infor[SI]
  19. CALL printch
  20. INC SI
  21. LOOP again
  22. MOV AX,4c00h
  23. INT 21h
  24. HELLO ENDP
  25.  
  26. printch Proc Near
  27. MOV BX,0
  28. MOV AH,0Eh
  29. INT 10h
  30. RET
  31. printch EndP
  32.  
  33. CODESG ENDS
  34. END HELLO

Hope this helps.
Damn it, I still dream of her....:(
Reply With Quote Quick reply to this message  
Join Date: Jul 2004
Posts: 54
Reputation: Alcides is an unknown quantity at this point 
Solved Threads: 0
Alcides's Avatar
Alcides Alcides is offline Offline
Junior Poster in Training

Re: TASM Begginer

 
0
  #4
Sep 27th, 2005
The address for "Write your own" didn't work in my browser. I don't know if it was abbreviated for some reason or what? Here's the link I found for it:

Write Your Own

Alcides.

Edit: It turns out that it was abbreviated by the code mangler for display. I put the link ith text, instead of using the address itself.
Vapor One
----------
http://www.vaporone.com (THE LEGEND)
http://www.candycola.com (FREE MUSIC)
http://www.pdunderground.com (THE UNDERGROUND)
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC