flat assembler
Message board for the users of flat assembler.

Index > Main > [MASM vs FASM syntax] Illegal Instruction - DOSSEG

Author
Thread Post new topic Reply to topic
Hazique35



Joined: 01 Apr 2013
Posts: 7
Hazique35
Here is my code:

Code:
DOSSEG
.MODEL SMALL
.STACK 200h
.DATA

OurString DB "This is a string of characters"
DB "Do you lack imagination? Put something here!$"

.CODE

START:
MOV AX, SEG OurString
MOV DS, AX

MOV DX, OFFSET OurString
MOV AH, 9h
INT 21h

MOV DX, OFFSET OurString
MOV AH, 9h
INT 21h

MOV AX, 4C00h
INT 21h
END START
    


This code is taken from a tutorial I was following that should be compiled in tasm, but this is the only IDE that I can get working (and that I like), and I hate the Masm32 editor... Anyway, what is wrong with DOSSEG? How are programs supposed to be written in Fasm, is there a constant way to write the entry point and end point of the program?

thanks
Post 01 Apr 2013, 17:41
View user's profile Send private message Reply with quote
baldr



Joined: 19 Mar 2008
Posts: 1651
baldr
Hazique35,

Have you read manual or looked in EXAMPLES folder?
Post 01 Apr 2013, 17:45
View user's profile Send private message Reply with quote
DOS386



Joined: 08 Dec 2006
Posts: 1901
DOS386
> Illegal Instruction - DOSSEG

There are more (OFFSET, MODEL, ...). Your code is MASM code. Get FASM code (see DOS subforum and this subforum and included examples).

> but this is the only IDE that I can get working

FASM has an IDE for DOS and Windows ... but supports only FASM syntax.

PS: Welcome to the FASM forum Smile

PPSS: I fixed your post style and enhanced subject

PPPSSS: today we have April 1st Shocked
Post 01 Apr 2013, 17:47
View user's profile Send private message Reply with quote
Hazique35



Joined: 01 Apr 2013
Posts: 7
Hazique35
alright, thanks guys!
Post 01 Apr 2013, 18:00
View user's profile Send private message Reply with quote
Hazique35



Joined: 01 Apr 2013
Posts: 7
Hazique35
Hello again, Ive looked at the hello example, and the when I try and include a file, it says that it cannot find the file. Do I have to type the path to the folder? Ive tried a whole bunch of combos but it doesnt seem to be working.
Post 01 Apr 2013, 18:13
View user's profile Send private message Reply with quote
Hazique35



Joined: 01 Apr 2013
Posts: 7
Hazique35
Sorry, I tried using the path to the folder and it worked
Post 01 Apr 2013, 18:18
View user's profile Send private message Reply with quote
baldr



Joined: 19 Mar 2008
Posts: 1651
baldr
Hazique35,

It's better to define INCLUDE path (either as environment variable, or in FASMW.INI).
Post 01 Apr 2013, 19:35
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. Also on GitHub, YouTube, Twitter.

Website powered by rwasa.