flat assembler
Message board for the users of flat assembler.

Index > Macroinstructions > Upper & Lower Case in keywords

Author
Thread Post new topic Reply to topic
asmfan



Joined: 11 Aug 2006
Posts: 392
Location: Russian
asmfan 11 Mar 2007, 09:56
I found that some FASM keywords can be written in both cases - format/FORMAT, include/INCLUDE, data/DATA etc. but some cannot - library. As for me - i prefer upper case for keywords.
Also there is such case problem in declaring structures:
Code:
struct  LUID
  LowPart   DD      ?  ;<- this is a problem
  HighPart  dd      ?
ends
    

compilation fails with
Quote:
Error: definition of LUID contains illegal instructions.

As i said i prefet Upper case for pseudo/macro instructions and keywords.
Tomasz could you please correct that?
Thanks.

_________________
Any offers?
Post 11 Mar 2007, 09:56
View user's profile Send private message Reply with quote
IceStudent



Joined: 19 Dec 2003
Posts: 60
Location: Ukraine
IceStudent 11 Mar 2007, 10:25
Quote:
but some cannot - library

library - it is a macros. A problem with struct - because it is also macros and it parse only lower-case data definition keywords.

Quote:
As for me - i prefer upper case for keywords.

You are prefer, but I am hate it, because it seems as very very old assembly language style. But fasm - is modern language :idea:
Post 11 Mar 2007, 10:25
View user's profile Send private message Reply with quote
asmfan



Joined: 11 Aug 2006
Posts: 392
Location: Russian
asmfan 11 Mar 2007, 10:41
Quote:
library - it is a macros. A problem with struct - because it is also macros

I know it thus i posted this in *Macroinstructions* branch.
Quote:
You are prefer, but I am hate it, because it seems as very very old assembly language style. But fasm - is modern language Idea

I dindn't say that it should be only upper case. Just said that variety of choices is good. And hate is totally wrong word from you.

_________________
Any offers?
Post 11 Mar 2007, 10:41
View user's profile Send private message Reply with quote
Tomasz Grysztar



Joined: 16 Jun 2003
Posts: 8367
Location: Kraków, Poland
Tomasz Grysztar 11 Mar 2007, 14:10
asmfan wrote:
I know it thus i posted this in *Macroinstructions* branch.

Thus you should recognize that there's a difference between a keyword and a macroinstruction.

See the Win32 headers document:
Win32 headers documentation wrote:
It's important to note that all macroinstructions, as opposed to internal directives of flat assembler, are case sensitive and the lower case is used for the most of them. If you'd prefer to use the other case than default, you should do the appropriate adjustments with fix directive.
Post 11 Mar 2007, 14:10
View user's profile Send private message Visit poster's website Reply with quote
asmfan



Joined: 11 Aug 2006
Posts: 392
Location: Russian
asmfan 11 Mar 2007, 14:54
Ok, another question
Quote:

local tmp[260]:WORD ;"word" doesn't work

takes only upper case. As like *struct* takes only lower (as i posted above).

[EDITED]
To be precice - all the db, dw, dd and dq in *struct* are macroses itself ?

_________________
Any offers?
Post 11 Mar 2007, 14:54
View user's profile Send private message Reply with quote
asmfan



Joined: 11 Aug 2006
Posts: 392
Location: Russian
asmfan 11 Mar 2007, 15:08
yep, having a glance at struct.inc i found macroses.
Post 11 Mar 2007, 15:08
View user's profile Send private message Reply with quote
asmfan



Joined: 11 Aug 2006
Posts: 392
Location: Russian
asmfan 11 Mar 2007, 15:46
Actually, i would prefer that macroses that declare inside themselves some other macroses, based upon keywords (db,dw etc.) declare also analogues in uppercase by themselves, say
Code:
DD      fix     dd
    

be inside "struct" macro, not doing like
Code:
DD      fix     dd
struct  LUID
  LowPart   DD      ?
  HighPart  dd      ?
ends
    

to avoid problems.

_________________
Any offers?
Post 11 Mar 2007, 15:46
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-2025, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.