flat assembler
Message board for the users of flat assembler.

Index > DOS > Could someone give me a basic skeleton of a FASM Program?

Author
Thread Post new topic Reply to topic
zck127



Joined: 16 Jun 2004
Posts: 5
zck127 19 Jun 2004, 04:14
Could someone please give me code for a basic skeleton of a fasm program? I have experience in NASM, MASM, and TASM. A completed Hello, World program will do. Thanx.
Post 19 Jun 2004, 04:14
View user's profile Send private message Reply with quote
Cas



Joined: 26 Feb 2004
Posts: 82
Location: Argentina
Cas 19 Jun 2004, 07:00
Very Happy In FASM, you don't need any kind of skeleton if what you're trying to build is a COM file (something short, as you ask). Even for an EXE file, there will be no much more you will have to write. You can make the COM file like this:

Code:
org 100h
mov ah,9
mov dx,message
int 21h
xor ah,ah
int 21h
int 20h
message: db "Hello, world!", 0Ah, 0Dh, "$"
    


That should be enough. For an EXE file, it's the same. You just have to add a format MZ at the beginning and define a main segment and an entry point. But this all is explained in the FAQ and plus, there are examples in the FASM ZIP that show this quite well! Confused

_________________
«Earth is my country; science is my religion» - Christian Huygens
Post 19 Jun 2004, 07:00
View user's profile Send private message Yahoo Messenger MSN Messenger Reply with quote
zck127



Joined: 16 Jun 2004
Posts: 5
zck127 20 Jun 2004, 05:04
thanx for your help:)!
Post 20 Jun 2004, 05:04
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-2024, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.