flat assembler
Message board for the users of flat assembler.

Index > Main > tasm to fasm?

Author
Thread Post new topic Reply to topic
godomega



Joined: 21 Jun 2005
Posts: 8
godomega
At the moment Im learning ASM from a tutorial.
And I allways used Tasm, in the tutorial the writers says that all his tutorial code is in Tasm format...
ButIi think he's using an old version of tasm(I use 5.0),
becausse I cannot compile his code in my tasm compiler.
the strange thing is that the Masm code he also provides is compilable in tasm...
but in chapter 9, the hello world example, he doesn't include mams format anymore..

so now my quistion is can anyone tell me how to translate this in Fasm format?
and why it issn't working in my tasm compiler..?

Code:
ideal
p286n
model tiny

codeseg
   org 100h
   jmp start

   message db 'Hello World!$'
start:
   mov dx, offset message
   mov ah, 09
   int 21h

   mov ax, 4c00h
   int 21h
end
    


and can you create COM structures in fasm?

.. thanks Rolling Eyes
Post 21 Jun 2005, 09:08
View user's profile Send private message Reply with quote
smiddy



Joined: 31 Oct 2004
Posts: 559
smiddy
First, I'll translate this for you:

Code:
   org 100h 
   jmp start 

   message db 'Hello World!$' 
start: 
   mov dx, message 
   mov ah, 09 
   int 21h 

   mov ax, 4c00h 
   int 21h 
    


You would compile this like this: FASM HELLO.ASM HELLO.COM

I suggest you read the online documentation here: http://flatassembler.net/docs.php This should answer most of your questions and be a great primer for those you will ask in the future. Wink
Post 21 Jun 2005, 09:46
View user's profile Send private message Reply with quote
vid
Verbosity in development


Joined: 05 Sep 2003
Posts: 7105
Location: Slovakia
vid
Code:
org 100h
   jmp start
   message db 'Hello World!$'
start:
   mov dx, message  ;NOTE - no OFFSET
   mov ah, 09 
   int 21h 

   mov ax, 4c00h 
   int 21h
    

no need to mess with segmnets in .COM program (tiny model)

read http://flatassembler.net/docs.php?article=design
Post 21 Jun 2005, 10:02
View user's profile Send private message Visit poster's website AIM Address MSN Messenger ICQ Number Reply with quote
godomega



Joined: 21 Jun 2005
Posts: 8
godomega
Thanks for your help..
but Why didn't my code worked in my tasm compiler?
(i'll still use fasm though Wink )
Post 21 Jun 2005, 15:34
View user's profile Send private message Reply with quote
smiddy



Joined: 31 Oct 2004
Posts: 559
smiddy
I don't know...I'll have to give it a shot when I get home. If Bogdan is listening he could probably help you with TASM though. His web site is: http://www.hostileencounter.com/os_main.html His OS is written in TASM and may give you some insight on the issues. I have only used TASM very little and it was 1989-ish. Pre-protected-mode too in my programming style.
Post 21 Jun 2005, 16:10
View user's profile Send private message Reply with quote
decard



Joined: 11 Sep 2003
Posts: 1092
Location: Poland
decard
I'm not sure, but maybe this line causes an error:
Code:
mov dx, offset message    

In Ideal mode it should be:
Code:
mov dx, message    

But I can't check it myself, I don't have tasm.
Post 21 Jun 2005, 18:28
View user's profile Send private message Visit poster's website Reply with quote
smiddy



Joined: 31 Oct 2004
Posts: 559
smiddy
Using TASM 4.1 I got this:

Code:
C:\smiddyOS\SolarOS-3>..\tasm5.0\tasm hello.asm
Turbo Assembler  Version 4.1  Copyright (c) 1988, 1996 Borland International

Assembling file:   hello.asm
Error messages:    None
Warning messages:  None
Passes:            1
Remaining memory:  418k
    


That is with the initial code you have in the first post. What is the error you're receiving and what version are you using?
Post 22 Jun 2005, 01:56
View user's profile Send private message Reply with quote
godomega



Joined: 21 Jun 2005
Posts: 8
godomega
thanks for the replies:
im using Tasm 5 and i get the error While linking. not when compiling.
so when i Tlink my code with COM structure.
i get this:

(tlink /t hello.obj)
Fatal: Cannot generate COM file : invalid initial entry point address
Post 24 Jun 2005, 14:16
View user's profile Send private message Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2020, Tomasz Grysztar.

Powered by rwasa.