flat assembler
Message board for the users of flat assembler.

Index > Compiler Internals > Variable "parenthesis_stack"

Author
Thread Post new topic Reply to topic
CandyMan



Joined: 04 Sep 2009
Posts: 413
Location: film "CandyMan" directed through Bernard Rose OR Candy Shop
CandyMan 04 Oct 2009, 14:43
Compilation of the file, where the forefront looks this way "[bits 32]" is ending with most often hanging the computer instead of with information about the mistake. It is taking place, when parenthesis_stack<>0. Most easily it is possible to confirm the mistake using FASM for DOS.
Post 04 Oct 2009, 14:43
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 20299
Location: In your JS exploiting you and your system
revolution 04 Oct 2009, 14:45
Can you please provide a short piece of code that demonstrates the problem.
Post 04 Oct 2009, 14:45
View user's profile Send private message Visit poster's website Reply with quote
CandyMan



Joined: 04 Sep 2009
Posts: 413
Location: film "CandyMan" directed through Bernard Rose OR Candy Shop
CandyMan 04 Oct 2009, 14:58
Example code

_________________
smaller is better


Last edited by CandyMan on 23 Oct 2014, 15:27; edited 1 time in total
Post 04 Oct 2009, 14:58
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 20299
Location: In your JS exploiting you and your system
revolution 04 Oct 2009, 15:03
I am using a slightly older version and get this:
Code:
flat assembler  version 1.67.38  (100000 kilobytes memory)
test.asm [1]:
[bits 32]
error: illegal instruction.    
What version are you using and what do you get?
Post 04 Oct 2009, 15:03
View user's profile Send private message Visit poster's website Reply with quote
CandyMan



Joined: 04 Sep 2009
Posts: 413
Location: film "CandyMan" directed through Bernard Rose OR Candy Shop
CandyMan 04 Oct 2009, 15:15
The mistake doesn't always appear.
Use UPX compressed FASMD/FASM under DOS.
Can be version 1.68 or 1.69.7
Post 04 Oct 2009, 15:15
View user's profile Send private message Reply with quote
Tomasz Grysztar



Joined: 16 Jun 2003
Posts: 8351
Location: Kraków, Poland
Tomasz Grysztar 04 Oct 2009, 16:07
I'm not able to reproduce the problem, is the UPX compression a requirement?
Post 04 Oct 2009, 16:07
View user's profile Send private message Visit poster's website Reply with quote
CandyMan



Joined: 04 Sep 2009
Posts: 413
Location: film "CandyMan" directed through Bernard Rose OR Candy Shop
CandyMan 04 Oct 2009, 16:20
The problem lies in the not-initiated variable "parenthesis_stack"
At first recompile fasm with
parenthesis_stack dd -1
and later compile test.asm
Post 04 Oct 2009, 16:20
View user's profile Send private message Reply with quote
Tomasz Grysztar



Joined: 16 Jun 2003
Posts: 8351
Location: Kraków, Poland
Tomasz Grysztar 04 Oct 2009, 16:33
OK, got it.
Perhaps having it UPX-ed helped to make this area not zeroed at startup, and thus helped catching this bug. Thanks for the report. Release with fix is coming out in a few minutes.
Post 04 Oct 2009, 16:33
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.