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

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/Programming/Languages/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-newsgroup/comp/comp.lang.asm.x86.html

Nathan.

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):

DATASG SEGMENT PARA 'DATA'
infor db "Hello world",10,12+1
inforlen Equ 13
DATASG ENDS

STACKSG SEGMENT PARA STACK 'STACK'
mystack db 160h dup(?)
STACKSG ENDS

CODESG SEGMENT PARA 'CODE'

HELLO PROC FAR
ASSUME CS:CODESG,DS:DATASG,SS:STACKSG
start: MOV AX,DATASG
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
HELLO ENDP

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

CODESG ENDS
END HELLO

Hope this helps.

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.

person who wants help in assume

instead of .code use
assume cs:code, ds:data

commented: Do you honestly think they need this indormation 5 years later? -2

Good day..,

i'm just a student. my i ask a help in making a store using tasm?
hope u can help me

.model small
.stack 100h
.data
 msg db "Hello","$"
 row db 10d
 col db 30d

.code
puts:
 mov ah,09h
 lea dx,msg
 int 21h

ret
 
pos: 
 mov ah,02h
 mov bh,00
 mov dh,row
 mov dl,col
int 10h

ret

main proc
 mov ax,@data
 mov ds,ax

 mov cx,10

balik:
 call pos
 call puts
 inc row
 

 loop balik

mov ax,4c00h
int 21h

main endp
end main

thats it!Just save it inside the folder of your tasm!then run!
By, Ritchie!
ask me regarding that problem or something that pertains such tasm codes!
heres my email add!
[snipped]

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.