Message board for the users of flat assembler.
> Compiler Internals > Smallest "code cannot be generated" example
This thread should not contain some new information, it shall only (try to)
explain something related to the assembler.
The following code cannot be generated.
if ~SomeLabel db 0 end if SomeLabel:
The assembler would hang if there were no passes_limit :<, and that's exactly
why Flat Assembler needs it!
This causes also problems in many other sciences.
(For example, an electronical amplifier with negative feedback will
oscillate, the good old "don't hold your mic to close to the speaker"
phenomen. It also occurs in the logistic growth model etc...)
Explanation for beginners: This is a classical negative feedback problem.
Fasm tries to resolve the address of SomeLabel, but this address also depends
on if SomeLabel has already been defined, but it won't succed since the
define byte instruction changes the address of SomeLabel.
MCD - the inevitable return of the Mad Computer Doggy
|17 Jan 2005, 21:46||
Maybe this is the defined's meaning of life.
if ~ defined SomeLabel db 0 end if SomeLabel:
|18 Jan 2005, 10:13||
< Last Thread | Next Thread >
Copyright © 1999-2020, Tomasz Grysztar.
Powered by rwasa.