flat assembler
Message board for the users of flat assembler.

Index > Compiler Internals > [bug] fasmg -v 2, weird display corner case

Author
Thread Post new topic Reply to topic
bitRAKE



Joined: 21 Jul 2003
Posts: 4060
Location: vpcmpistri
bitRAKE 01 Sep 2023, 04:09
Code:
virtual at 0
        some::
        db 'fred'
end virtual

calminstruction bug
        local line ;,val ; no bug with local value
        load val, some:0, sizeof some
        display val ; fredfred
end calminstruction

bug    
... this one took a long time to narrow down. It only happens with "-v 2" command line flag, and when the variable is not local. Encountered it before in larger sources, but it always went away when I tried to narrow it down.

_________________
¯\(°_o)/¯ “languages are not safe - uses can be” Bjarne Stroustrup


Last edited by bitRAKE on 01 Sep 2023, 06:31; edited 1 time in total
Post 01 Sep 2023, 04:09
View user's profile Send private message Visit poster's website Reply with quote
Tomasz Grysztar



Joined: 16 Jun 2003
Posts: 8356
Location: Kraków, Poland
Tomasz Grysztar 01 Sep 2023, 06:30
When "val" is not declared as local, the assembly takes 2 passes, otherwise one. The "-v2" switch causes DISPLAY to dump data in real-time, so it shows values from all passes.
Post 01 Sep 2023, 06:30
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-2024, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.