flat assembler
Message board for the users of flat assembler.

Index > Compiler Internals > [fasmg] label jumping and skipping error

Author
Thread Post new topic Reply to topic
bitRAKE



Joined: 21 Jul 2003
Posts: 3638
Location: vpcmipstrm
bitRAKE 06 Sep 2020, 23:55
If I put the "create" label on its own line the error goes away.
Code:
format PE64 CONSOLE 5.0
include 'win64wxp.inc'
.code

VV:
        use32
create: call 33h:?.64
        retn
?.64:   use64
        retf
Quilt:
invoke ExitProcess,eax
.end Quilt    


Code:
flat assembler  version g.izxz
xerr.asm [7]:
        create: call 33h:?.64
? [11] ? [3] call [34]
Processed: dd @dest.offset
Error: symbol 'VV.64' is undefined or out of scope.    

_________________
¯\(°_o)/¯ unlicense.org
Post 06 Sep 2020, 23:55
View user's profile Send private message Visit poster's website Reply with quote
bitRAKE



Joined: 21 Jul 2003
Posts: 3638
Location: vpcmipstrm
bitRAKE 07 Sep 2020, 02:22
What really threw me was that sometimes it doesn't produce and error:
Code:
        use32
mfree:  call 33h:?.64
        retn
?.64:   use64
        retf    
...weird.

Edit: oh, it's because this followed the previous and it found the prior ?.64
That makes me think the second ":" causing the problem.

_________________
¯\(°_o)/¯ unlicense.org
Post 07 Sep 2020, 02:22
View user's profile Send private message Visit poster's website Reply with quote
Tomasz Grysztar



Joined: 16 Jun 2003
Posts: 8146
Location: Kraków, Poland
Tomasz Grysztar 07 Sep 2020, 04:51
Starting with version ixvg several months ago I modified the definition of the base symbol for identifiers starting with dot, it is now the latest symbol defined before the current line, so the one defined in the same line does not count (it starts being applied with the next line). I did it to increase the consistency of the language - previously you could get different results depending on whether the line was processed by a macro or not.
Post 07 Sep 2020, 04:51
View user's profile Send private message Visit poster's website Reply with quote
bitRAKE



Joined: 21 Jul 2003
Posts: 3638
Location: vpcmipstrm
bitRAKE 07 Sep 2020, 06:33
That does mean I need to change my coding style. Thank you.

_________________
¯\(°_o)/¯ unlicense.org
Post 07 Sep 2020, 06:33
View user's profile Send private message Visit poster's website Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 19284
Location: In your JS exploiting you and your system
revolution 07 Sep 2020, 07:20
That is a break from fasm syntax:
Code:
.y:
labl: jmp .y ; error: undefined symbol 'labl.y'.    
Post 07 Sep 2020, 07:20
View user's profile Send private message Visit poster's website Reply with quote
Tomasz Grysztar



Joined: 16 Jun 2003
Posts: 8146
Location: Kraków, Poland
Tomasz Grysztar 07 Sep 2020, 08:14
There is little reason to back-port this to fasm 1, even if I consider it a needed change in wider context.
Post 07 Sep 2020, 08:14
View user's profile Send private message Visit poster's website Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 19284
Location: In your JS exploiting you and your system
revolution 07 Sep 2020, 08:17
Tomasz Grysztar wrote:
There is little reason to back-port this to fasm 1, even if I consider it a needed change in wider context.
I hope it isn't back ported to fasm. The current behaviour is good. I think the new fasmg behaviour breaks the principle of least surprise.
Post 07 Sep 2020, 08:17
View user's profile Send private message Visit poster's website Reply with quote
Tomasz Grysztar



Joined: 16 Jun 2003
Posts: 8146
Location: Kraków, Poland
Tomasz Grysztar 07 Sep 2020, 08:42
revolution wrote:
I hope it isn't back ported to fasm. The current behaviour is good. I think the new fasmg behaviour breaks the principle of least surprise.
Yeah, sometimes it is just about choosing on which end the principle is going to be broken, because there is not enough blanket to cover everything. fasm[g]'s design has always been about finding a roughly acceptable solution in the face of irreconcilable self-contradictions. I was not happy about it, but I had to make a choice.
Post 07 Sep 2020, 08:42
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


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

Website powered by rwasa.