flat assembler
Message board for the users of flat assembler.

Index > DOS > Newbie question: invalid argument

Author
Thread Post new topic Reply to topic
lucky7456969



Joined: 21 Dec 2013
Posts: 4
lucky7456969 21 Dec 2013, 11:27
Code:
PAGE  59,132

 
target          EQU   'M6'                      ; Target assembler: MASM-6.11

include  srmacros.inc
    


The line "include srmacros.inc" was creating this error
I am sure the file is in the same directory as the asm file
f program.asm where f is a batch program, loading
the dos extender cwsdpmi.exe
error: invalid argument
This is an disassembly of my program.
Thanks
Post 21 Dec 2013, 11:27
View user's profile Send private message Reply with quote
baldr



Joined: 19 Mar 2008
Posts: 1651
baldr 21 Dec 2013, 12:19
lucky7456969,

Look here: ; Target assembler: MASM-6.11.
Post 21 Dec 2013, 12:19
View user's profile Send private message Reply with quote
lucky7456969



Joined: 21 Dec 2013
Posts: 4
lucky7456969 21 Dec 2013, 12:33
I commented out that line, but the error persists.
Is "include" not allowed on fasm?
Thanks
Jack
Post 21 Dec 2013, 12:33
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 20405
Location: In your JS exploiting you and your system
revolution 21 Dec 2013, 12:38
You are going to get more errors with other directives, but for include you need to put the filename in quotation marks. See the examples in the fasm download.
Post 21 Dec 2013, 12:38
View user's profile Send private message Visit poster's website Reply with quote
baldr



Joined: 19 Mar 2008
Posts: 1651
baldr 21 Dec 2013, 13:17
lucky7456969,

Are you trying to rewrite MASM source to fasm syntax? You have to understand both in order to do it effectively.

In the other case, just use MASM to compile (proper tool for each task).
Post 21 Dec 2013, 13:17
View user's profile Send private message Reply with quote
lucky7456969



Joined: 21 Dec 2013
Posts: 4
lucky7456969 22 Dec 2013, 06:44
Thanks guys, I'll try to study the syntax and understand the differences between the two.
I just found the doc in the fasm directory.
Jack
Post 22 Dec 2013, 06:44
View user's profile Send private message Reply with quote
lucky7456969



Joined: 21 Dec 2013
Posts: 4
lucky7456969 23 Dec 2013, 08:02
Another quick question, maybe oversight, couldn't find any info about this

stack_seg_a segment word stack 'STACK'

This is a quick standard declaration of a 16-bit MZ segment
But fasm doesn't seem to like it.

error: illegal instruction
Thanks
Jack
Post 23 Dec 2013, 08:02
View user's profile Send private message Reply with quote
sinsi



Joined: 10 Aug 2007
Posts: 794
Location: Adelaide
sinsi 23 Dec 2013, 08:20
baldr wrote:
lucky7456969,

Are you trying to rewrite MASM source to fasm syntax? You have to understand both in order to do it effectively.

In the other case, just use MASM to compile (proper tool for each task).


This.
Post 23 Dec 2013, 08:20
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 20405
Location: In your JS exploiting you and your system
revolution 23 Dec 2013, 08:24
lucky7456969 wrote:
error: illegal instruction
There are two solutions to this.

1. Look at the 'multiseg' MZ example in the fasm download.
2. Read the fasm manual about how to use the 'segment' directive.
Post 23 Dec 2013, 08:24
View user's profile Send private message Visit poster's website Reply with quote
DOS386



Joined: 08 Dec 2006
Posts: 1903
DOS386 30 Dec 2013, 12:42
lucky7456969 wrote:
error: illegal instruction


Please RTFM of FASM, check the FASM examples included, check the examples in this subforum, and check the FAQ on the top of this subforum and the Main subforum.

http://board.flatassembler.net/topic.php?t=2530 section B. and others

_________________
Bug Nr.: 12345

Title: Hello World program compiles to 100 KB !!!

Status: Closed: NOT a Bug
Post 30 Dec 2013, 12:42
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.