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 > Macroinstructions > [fasm] structure behavior from docs..

Author
Thread Post new topic Reply to topic
Azagaros



Joined: 18 Jan 2013
Posts: 10
[fasm] structure behavior from docs..
I am trying to understand why the following code does not compile when it is modeled off the documentation code. I realize the documentation is a living document. This is Fasm and not Fasmg which might have better ways to do this.

These idea comes straight out of the Fasm 1.71 docs...

Code:

struc dirtype dirlbadirlendirclust
{
        label . : 3*dword
        .dir_lba    rd dirlba
        .dir_len    rd dirlen
        .dir_clust  rd dirclust
        .size = $ - .
}
;end struc

rootDir dirtype dd 000 ; compiler complains here, referring to label...





the code does not compile in any combinations I have tried. I am not sure if I am running into a compiler error vs the documentation or I am being naive to the actual code structure..


Last edited by Azagaros on 17 Jul 2017, 17:22; edited 2 times in total
Post 17 Jul 2017, 16:55
View user's profile Send private message ICQ Number Reply with quote
Tomasz Grysztar
Assembly Artist


Joined: 16 Jun 2003
Posts: 6396
Location: Kraków, Poland
Yes, this is something that could work with fasmg but not with fasm 1, where sizes can only be specified with size operators and no other values are allowed.
Post 17 Jul 2017, 17:11
View user's profile Send private message Visit poster's website Reply with quote
Azagaros



Joined: 18 Jan 2013
Posts: 10
Do you have fasmg with your simple windows editor? I was looking for fasm 1 solutions because of this issue...
Post 17 Jul 2017, 17:16
View user's profile Send private message ICQ Number Reply with quote
ProMiNick



Joined: 24 Mar 2012
Posts: 59
Location: Russian Federation, Sochi
Windows editor? Is it problem? use fasmw to edit fasmw and fasmg sources & launch them. see example how:
https://board.flatassembler.net/topic.php?t=19966
You even can write it self - I just added menus for fasmg.
There bug with structs and reloc section. in EXEs relocs not needed.

But my example it is only for windows. Because it uses BAT files for automation.
Post 17 Jul 2017, 19:10
View user's profile Send private message Send e-mail Reply with quote
ProMiNick



Joined: 24 Mar 2012
Posts: 59
Location: Russian Federation, Sochi
FASMG & FASM - AllInOne, all sources,all includes. All workable, all portable (whole package I mean).
FASMW used as editor and compilation launcher for both fasm & fasmg sources.

fixed that I didn`t previously: now fasm ver 1.71.64, struct.inc - last ver

Quote:
What not did:
1. old fasm ver 1.71.62 used (you can fix yourself)
2. old struct.inc ver (with errorneus relocs) used (this will be fixed later)
3. because of (2) in examples in structures added negative fixups of PE.RELOCATION (needing in 3 will disapier itself)



How to play with it?:
unzip all & run Init.bat (it will adapt package to current directory, all params go to fasmg.ini not to registry).
fasmg not uses fasmg.ini, but automation scripts uses it.


Description:
Download
Filename: FASM.zip
Filesize: 1.52 MB
Downloaded: 9 Time(s)


_________________
I don`t like to refer by "you" to one person.
My soul requires acronim "thou" instead.
Post 19 Jul 2017, 11:56
View user's profile Send private message Send e-mail 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


Powered by phpBB © 2001-2005 phpBB Group.

Main index   Download   Documentation   Examples   Message board
Copyright © 2004-2016, Tomasz Grysztar.