flat assembler
Message board for the users of flat assembler.

Index > Main > EQU= INCBIN QUOTE RAW help wanted

Author
Thread Post new topic Reply to topic
Bitdog



Joined: 18 Jan 2004
Posts: 97
Bitdog 10 Feb 2004, 03:33
Hello,
I've got some Fasm questions:
(DOS + Fasm 1.51 + command line usage + .com or .exe OUTfiles)

Is EQU the same as = sign ?
I get two different values when creating an absolute LABEL addr using them.

When an EXE starts up:
format MZ
sets CS:0 as CS:IP start up
can I change that to a floating IP entery point defined with
start:
or some other label?

AND, DS - 10h less than CS, so DS:80h = my ARGC command line input count, then ARGV following.
IS it always this way? IS this a given er constant fact ?
DOES Fasm allow a definable .exe header ? and HOW?

IS CS - 30h my environment for an EXE at run time ?
IS string search for CMNDLINE= PATH= BLASTER= CMNDENV=
the proper method? or are they set at a prefixed offset of CS-30h
or even DS-20h ?

DOES Fasm have an INCBIN "filename.ext"
that dumps in a RAW file to the executable like Nasm does?

DOES Fasm have a thingie like

RAW LABELname {
Just write some text in here and refer to it via MOV SI,LABELname
This would be the second line inserted into the OUTfile
This ending would have no CRLF on the end.} sizeofLABELname
This ending would have a CRLF on the end.
} sizeofLABELname
That would be easy to make messages
that have a label and an SIZE EQU $-LABELname

I suspose I could read the manual.doc
But a little help could save me some wasted nights.
Any help would be appreciated.
Thankx in advance.

Bitdog


Last edited by Bitdog on 10 Feb 2004, 09:52; edited 2 times in total
Post 10 Feb 2004, 03:33
View user's profile Send private message Reply with quote
comrade



Joined: 16 Jun 2003
Posts: 1150
Location: Russian Federation
comrade 10 Feb 2004, 04:31
EQU is text equate, and is substituted before assembly stage, so conditional ifs do not play a role. = is what you would use to define numerical constants, which can be worked with. INCBIN is "file" directive in FASM.
Code:
mymusic file "tune.mod"    

defines data label "mymusic" with contents of file tune.mod

_________________
comrade (comrade64@live.com; http://comrade.ownz.com/)
Post 10 Feb 2004, 04:31
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger ICQ Number Reply with quote
JohnFound



Joined: 16 Jun 2003
Posts: 3499
Location: Bulgaria
JohnFound 10 Feb 2004, 04:44
Bitdog wrote:
Is EQU the same as = sign ?
I get two different values when creating an absolute LABEL addr using them.


No, they are not equal. Actually in 99% of time you should use "=" to define numeric constants. "equ" defines not numeric but symbol constants at preprocessing time. Read the manual for details.

Quote:
When an EXE starts up:
format MZ
sets CS:0 as CS:IP start up
can I change that to a floating IP entery point defined with
start:
or some other label?


There are few directives that you can use with MZ format:
segment - define segment
entry - define entry point
stack - sets up the stack size
heap - sets up heap maximum size

Refer in manual: "2.4.1 MZ executable" for details. And I am sure there was example in the DOS package.

Quote:
DOES Fasm have an INCBIN "filename.ext"
that dumps in a RAW file to the executable like Nasm does?


Yes, it is "file" directive, I don't know what is NASM syntax of this, but "file" may include in raw form entire file or only part of it.

Refer in manual: "1.2.2 Data definitions" for syntax description.

Quote:
DOES Fasm have a thingie like
RAW LABELname {


No, unfortunately. Maybe in some of next versions. Smile

Regards
Post 10 Feb 2004, 04:44
View user's profile Send private message Visit poster's website ICQ Number 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.