flat assembler
Message board for the users of flat assembler.

Index > Compiler Internals > how does fasm resolve rb etc r?

Author
Thread Post new topic Reply to topic
idle



Joined: 06 Jan 2011
Posts: 359
Location: Ukraine
idle
Code:
;
;good day people
;experiment with a snippet below
;

    ;db 1,2,3

x1: rb x2
    ;fasm could precount number of db (etc d?) bytes using commas
    ;assemble, uncomment next line, assemble
    ;db 1,2,3
    ;BUT should x2 be seen instant or predicted? how does fasm see/use it?
    ;can we treat db=insert?
    ;thanx
x2:
    
Post 30 Sep 2014, 10:13
View user's profile Send private message Reply with quote
l_inc



Joined: 23 Oct 2009
Posts: 881
l_inc
idle
The initial prediction for values not seen before is zero. If such predictions are made during a pass, fasm does one more pass (starts the compilation from the beginning), but uses the values established during the previous pass as the new predictions. If values established during the next pass are unchanged compared to the previous one (meaning the predictions based on the previous pass are correct), then the compilation successfully completes. Otherwise another pass is made. If the predictions are not stabilized within a certain number of passes (100 by default), the compilation fails with the error "code cannot be generated".

_________________
Faith is a superposition of knowledge and fallacy
Post 30 Sep 2014, 12:33
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-2020, Tomasz Grysztar.

Powered by rwasa.