flat assembler
Message board for the users of flat assembler.

Index > Heap > Meanings of keywords..

Author
Thread Post new topic Reply to topic
Hicel



Joined: 09 Sep 2004
Posts: 55
Hicel
I was just curious and interested what exactly is the difference between those keywords.. it should be simple for english people since they understand it hopefully but I'm not english and cannot differ between the real meanings:

Directive <-> Statement
Argument <-> Instruction <-> Parameter

Could someone describe this in words?
I'm sorry but I googled arround used translators but did not came up with any good results Wink

Thanks.
Post 18 Nov 2005, 21:46
View user's profile Send private message Reply with quote
BXM



Joined: 03 Nov 2005
Posts: 26
Location: mars
BXM
In assembly language, an instruction is an order given to the processor.
For example
Code:
mov al,10    
Shows the instruction (mov), a destination operand (al) and a source operand (10).

A directive is an instruction to the assembler, but it is not translated into a machine instruction. For example
Code:
myvar db 'hello',0    
db is the directive which stands for "define byte"

A statement is a line of instructions, in C language a statement ends with a semicolon ; it is called "statement terminator" (lol).
So each statement can contain several instructions, or function calls.
For example
Code:
puts(atoi("b"));    

In assembly, there's no ; but it is basically a similar process.

As for Parameter and Argument, they are simply homonyms (same meaning but different words). Like mathematic operands are effectively arguments (or parameters) passed to a function. Same for "b" and the result of atoi("b") : they are both arguments.

Edit: ; is not a coma but a semicolon


Last edited by BXM on 21 Nov 2005, 09:08; edited 1 time in total
Post 19 Nov 2005, 12:28
View user's profile Send private message Reply with quote
Hicel



Joined: 09 Sep 2004
Posts: 55
Hicel
Thank you BXM that cleared up some things in my mind! Will copy your reply as .html on my hardrive Wink

Thank you very much!
Post 20 Nov 2005, 15:19
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 can attach files in this forum
You can download files in this forum


Copyright © 1999-2020, Tomasz Grysztar. Also on YouTube, Twitter.

Website powered by rwasa.