flat assembler
Message board for the users of flat assembler.
 Home   FAQ   Search   Register 
 Profile   Log in to check your private messages   Log in 
flat assembler > Main > FASM vocabulary

Author
Thread Post new topic Reply to topic
vid
Verbosity in development


Joined: 05 Sep 2003
Posts: 7109
Location: Slovakia

FASM vocabulary

i noticed there's a problem with vocabulary... there are not standard terms for some things, or people don't know these terms. So i tried to put problematic terms together. Let us know if i missed something or you dislike some term...

[edit]maybe we could even complete some lists (like special symbols...)[/edit]

haha, master.slave, .a_b etc. are symbols
(, :, \ etc. are special symbols
'aaaa' or "12345" is quoted string
123, 0B800h are numbers
;anything is comment
\ at the end of line or immediately before comment is line break

db, label, include, etc. are directives
include, rept, macro, equ, etc. are preprocessor directives
rd, if, file, = etc. are assembler directives

byte, >=, eq, ptr etc. are operators
byte, word, dword, etc. are size operators
+, *, div, shr are numeric operators
>=, <>, &, eq, defined are logical operators (sometimes called relational operators)

mov ax, 10 is instruction, in this example
mov is instruction mnemonic
ax and 10 are instruction operands (or instruction arguments)
rep is example of instruction prefix

[0B800h], ptr ebx, [ss:ebx+4*edi+8] are memory addresses, in this example:
ss: is called segment prefix
ebx is called base
4* is called scale
edi is called index
+8 is called displacement

a equ 5 defines equate
define a 5 defines equate too
5 is then value of equate
when a is substituted by 5 we say that equate a was replaced
we restore equate with restore a
a fix 5 define fix (or we say that symbol a is fixed to 5)
we unfix fix with fix a a
(in official manual equate and fix are commonly called symbolic constants)

<name>: and label <name> ... define label.
label starting with dot, like .ret, .a.b, is called local label
definition of non-local label also defines namespace <name>
a = <value> define numeric constant
a, a + b, (a shl 2)+b, 1, 1+5 are numeric expressions (regardless if "a" is label or numeric constant)

macro <name> <args> { <body } define macro (it is macro definition), where:
<name> is macro name
<args> are macro aguments
<body> is macro body
macro is then used with line containing name <arg_values>
when macro is used, it is expanded by preprocessor
symbol inside macro body preceded by \ is called escaped symbol


Last edited by vid on 06 Jul 2006, 09:36; edited 8 times in total
Post 31 Jan 2006, 17:50
View user's profile Send private message Visit poster's website AIM Address MSN Messenger ICQ Number Reply with quote
vid
Verbosity in development


Joined: 05 Sep 2003
Posts: 7109
Location: Slovakia

can we say that "equ" overdefines equate and "define" redefines equate?
Post 23 Feb 2006, 00:48
View user's profile Send private message Visit poster's website AIM Address MSN Messenger ICQ Number Reply with quote
Tomasz Grysztar
Assembly Artist


Joined: 16 Jun 2003
Posts: 6824
Location: Kraków, Poland

What's the reason behing such calling?
BTW: note that fasm's EQU is basically the same thing as XDEFINE in NASM.
Post 23 Feb 2006, 06:23
View user's profile Send private message Visit poster's website Reply with quote
vid
Verbosity in development


Joined: 05 Sep 2003
Posts: 7109
Location: Slovakia

if you want to differ in text that you need to "equ"-define or "define"-define symbolic consant. but maybe it's really not needed...
Post 23 Feb 2006, 08:56
View user's profile Send private message Visit poster's website AIM Address MSN Messenger ICQ Number Reply with quote
UCM



Joined: 25 Feb 2005
Posts: 285
Location: Canada

aren't "div" and "shr" instruction mnemonics?
Post 23 Feb 2006, 21:34
View user's profile Send private message Reply with quote
vid
Verbosity in development


Joined: 05 Sep 2003
Posts: 7109
Location: Slovakia

i thought that too...
Post 24 Feb 2006, 04:40
View user's profile Send private message Visit poster's website AIM Address MSN Messenger ICQ Number Reply with quote
MazeGen



Joined: 06 Oct 2003
Posts: 953
Location: Czechoslovakia

According to the context, they are either mnemonics or operators.
Post 24 Feb 2006, 07:18
View user's profile Send private message Visit poster's website Reply with quote
Tomasz Grysztar
Assembly Artist


Joined: 16 Jun 2003
Posts: 6824
Location: Kraków, Poland

"div" is only a mnemonic, "shr", "shl", "and", "or", "xor" and "not" are both mnemonics and operators (after TASM). There is also "mod" which is operator, but not mnemonic.
Post 24 Feb 2006, 10:34
View user's profile Send private message Visit poster's website Reply with quote
vid
Verbosity in development


Joined: 05 Sep 2003
Posts: 7109
Location: Slovakia

so is it "mnemonics" or "mnemonic" ???
Post 24 Feb 2006, 13:18
View user's profile Send private message Visit poster's website AIM Address MSN Messenger ICQ Number Reply with quote
Plue



Joined: 15 Dec 2005
Posts: 151

\ at the end of line or immediately before comment is a line continuation character

one mnemonic
two or more mnemonics
Post 24 Feb 2006, 18:56
View user's profile Send private message Reply with quote
vid
Verbosity in development


Joined: 05 Sep 2003
Posts: 7109
Location: Slovakia


Quote:
when macro is used, it is "expanded" by preprocessor


i still lack some proper term for this...
Post 30 Aug 2006, 08:17
View user's profile Send private message Visit poster's website AIM Address MSN Messenger ICQ Number Reply with quote
Madis731



Joined: 25 Sep 2003
Posts: 2146
Location: Estonia

I think it is somewhat related to unpacking - it has an algorithm that gets defined by the macro itself. How about "extracted" by the preprocessor or maybe "translated" like in edcrypting or language-translation.
Post 30 Aug 2006, 09:19
View user's profile Send private message Visit poster's website Yahoo Messenger MSN Messenger Reply with quote
vid
Verbosity in development


Joined: 05 Sep 2003
Posts: 7109
Location: Slovakia

nice ideas... but i think that ours Dungeon Master should decide Razz
Post 30 Aug 2006, 09:31
View user's profile Send private message Visit poster's website AIM Address MSN Messenger ICQ Number Reply with quote
f0dder



Joined: 19 Feb 2004
Posts: 3172
Location: Denmark

"macro expansion" would be the term normally used...
Post 30 Aug 2006, 11:25
View user's profile Send private message Visit poster's website Reply with quote
ChrisLeslie



Joined: 04 Jun 2006
Posts: 50
Location: Australia

I think that Tomasz should take the hint that it is a good idea to tabulate all such definitions in one place somewhere near the begining of the manual.

Good on you vid! as the FASM product will be greatly enhanced and popularised by more well defined documentation.

Chris
Post 30 Aug 2006, 22:23
View user's profile Send private message Reply with quote
f0dder



Joined: 19 Feb 2004
Posts: 3172
Location: Denmark


ChrisLeslie wrote:
I think that Tomasz should take the hint that it is a good idea to tabulate all such definitions in one place somewhere near the begining of the manual.



Or at the end, as an appendix - I personally think that'd be better.

_________________
Image - carpe noctem
Post 30 Aug 2006, 23:21
View user's profile Send private message Visit poster's website Reply with quote
vid
Verbosity in development


Joined: 05 Sep 2003
Posts: 7109
Location: Slovakia

okay, for now i am calling it "expansion"

fodder: btw, WHERE is it used aside FASM?
Post 31 Aug 2006, 05:01
View user's profile Send private message Visit poster's website AIM Address MSN Messenger ICQ Number Reply with quote
UCM



Joined: 25 Feb 2005
Posts: 285
Location: Canada

C, C++, (almost) all other assemblers Wink
Post 31 Aug 2006, 12:44
View user's profile Send private message Reply with quote
f0dder



Joined: 19 Feb 2004
Posts: 3172
Location: Denmark

vid: masm, nasm, (other assemblers), C/C++ preprocessors all do macro expansion. Pascal doesn't Smile
Post 31 Aug 2006, 13:13
View user's profile Send private message Visit poster's website 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


Main index   Download   Documentation   Examples   Message board
Copyright © 2004-2018, Tomasz Grysztar.
Powered by rwasa.