Hi all!

I'm learning Assembly by my own with FASM, but i'm having
trouble running and compiling some codes...

like this, for example:

CODE SEGMENT
     ASSUME CS:CODE, DS:CODE
START:
        MOV AX, CODE
        MOV DS, AX
CODE ENDS
END START

i get an error about the "CODE SEGMENT" one. Also in MASM32...

I'm lost... need help!

Recommended Answers

All 7 Replies

well why dont you try tasm (mostly doesnt disappoint ) .
besides why dont u try the following code

.model small
.stack
.data
       str  db "Welcome to assembly $"
.code
          mov ax , @data
          mov ds , ax     ; gets data to data segment
          lea dx , str      ; laods effictive address of str in dx reg
          mov  ah , 09h  ; calls for display
          int 21h
          mov ah , 4ch   ; ends sub - routine 
          int 21h
end

i wold like to know whether this program works o your system or not its just a simple program to display the string content

No, it doesn't.

It gives me an error about ".model small"...

well did u try that in tasm ....? that is the turbo assembler . (its kinda preferred )

Errr... I have installed TASM, but i got no idea how to work with it.

A guide i found uses the CMD prompt in XP. I used it, too, but it cannot find TASM!

sorry for late reply

Errr... I have installed TASM, but i got no idea how to work with it.

well if u have done a conventional installation that is installing in c drive. there must be a folder called TASM must be created
most imp searchfor two files mainly
1. tasm
2.tlink

these are the basic files (well a lot more are needed ) .

well to work with tasm its very simple

1. create (.asm) file and write ur assembly code
2. tasm filename.asm (type this in dos)
it will create an (.obj) file provided if there arent any errors .
if errors exist it will tell with the line numbers

3. tlink filename.obj
this will create an exe version of the file

4.filename thats it , since its exe it will excecute itself

i guess this should do , if something un usual happens let me know

Again, i'm telling you - it does not recognize "tasm". Tells me that it is not an internal command, or something...

Thanks for the help anyway... I'm just going to quit this assembly crap and get back to C.

well trust me pal , there is nothing like assembly .
assembly is the mother of all languages . there s nothing fast enough liike this besides , its good to be very close to machine and know assembly .
if u leave this i would feel guilty that its because of me pal ,
i am ready to help you in all ways i can , so dont loose hop .
remember
"hope is a good thing , and good thing never dies "

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.