flat assembler
Message board for the users of flat assembler.
![]() |
Author |
|
dead_body 21 Nov 2006, 10:54
Code: macro version_string [string*] { common version_string string } VERSION_MAJOR fix 0 VERSION_MINOR fix 1 VERSION_REVISION fix 0 VERSION_BUILD fix 0 version_string db `VERSION_MAJOR # "." # `VERSION_MINOR # "." # `VERSION_REVISION # " build " # `VERSION_BUILD, 0 ` - works only in macroinstruction??? |
|||
![]() |
|
Tomasz Grysztar 21 Nov 2006, 11:04
From Understanding fasm, section "Tokenization of source and line makers":
Quote: (...)lines that are preprocessed, are actually the sequences of tokens, not the raw text of the source. And such sequences can be born in a two different ways - either created directly from the source text, or generated by macroinstruction. Thus we've got a two different "line makers" - one being "source reader" and one "macroinstruction processor". |
|||
![]() |
|
Tomasz Grysztar 21 Nov 2006, 11:08
PS. I would recommend doing it this way:
Code: VERSION_MAJOR equ 0 VERSION_MINOR equ 1 VERSION_REVISION equ 0 VERSION_BUILD equ 0 match major:minor:revision:build, VERSION_MAJOR:VERSION_MINOR:VERSION_REVISION:VERSION_BUILD { version_string db `major # "." # `minor # "." # `revision # " build " # `build, 0 } |
|||
![]() |
|
Raedwulf 21 Nov 2006, 13:56
Thank you, Tomasz & deadbody
![]() |
|||
![]() |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2023, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.