flat assembler
Message board for the users of flat assembler.
Index
> Main > I read docs about definite, but not understood all functions |
Author |
|
Tomasz Grysztar 30 Nov 2022, 09:44
See the thread where this feature was announced: https://board.flatassembler.net/topic.php?t=21058
In short: DEFINITE is very similar to DEFINED, except it does not forward-reference, so you can check whether a symbol has been defined earlier in the source (while DEFINED would consider if the symbol ends up defined anywhere, even further down the text). Code: A = 1 assert defined A assert defined B assert ~ defined C assert definite A assert ~ definite B assert ~ definite C B = 2 A thing of note for both DEFINED and DEFINITE is that both operate on numeric (as opposed to symbolic) constants/variables. The variables created with EQU or DEFINE are replaced with their corresponding text before the expression containing DEFINED/DEFINITE is interpreted. So if you use DEFINED/DEFINITE with a symbol name that is assigned a value with EQU or DEFINE, you end up checking what is inside the symbolic value. Code: A = 1 S equ A assert defined S S equ C assert ~ defined S |
|||
30 Nov 2022, 09:44 |
|
Roman 30 Nov 2022, 12:02
I found this.
Code: if ~ definite Module Module = 1 ; define only if it has not already been defined earlier end if How I understood definite using for someName = some value. And not using for EQU |
|||
30 Nov 2022, 12:02 |
|
Tomasz Grysztar 30 Nov 2022, 13:09
Roman wrote: How I understood definite using for someName = some value. |
|||
30 Nov 2022, 13:09 |
|
Roman 02 Dec 2022, 07:14
Interesting idea. Get number from lLoop8
Code: lLoop8: inc eax if definite lLoop8 Somehow get from lLoop8 number 8 to Reg ecx cmp eax,ecx Jb lLoop8 end if |
|||
02 Dec 2022, 07:14 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.