flat assembler
Message board for the users of flat assembler.
Index
> Compiler Internals > This is bug or feature of fasm1 ( "+-1.0" error ) |
Author |
|
revolution 22 Feb 2023, 20:55
Works for me:
Code: if -1.0 relativeto 0 end if |
|||
22 Feb 2023, 20:55 |
|
macomics 22 Feb 2023, 21:11
Code: use64 define numn -1.0 define nump 1.0 if +numn relativeto 0 end if if +nump relativeto 0 end if Code: $ fasm -m 10240 ./tests.asm flat assembler version 1.73.30 (10240 kilobytes memory) ./tests.asm [9]: if +numn relativeto 0 processed: if+-1.0 relativeto 0 error: reserved word used as symbol. Code: use64 define numn -1.0 define nump 1.0 if +(numn) relativeto 0 end if if +nump relativeto 0 end if Code: $ fasm -m 10240 ./tests.asm flat assembler version 1.73.30 (10240 kilobytes memory) 1 passes, 0 bytes. |
|||
22 Feb 2023, 21:11 |
|
revolution 22 Feb 2023, 21:23
You don't need the + prefix. It does nothing useful.
Code: if numn relativeto 0 Code: dd +-1.0 ; error: reserved word used as symbol. |
|||
22 Feb 2023, 21:23 |
|
ProMiNick 23 Feb 2023, 00:15
revolution wrote: You don't need the + prefix. It does nothing useful revolution, see win32ax.inc pushd override Code: macro pushd value { match first=,more, value \{ \local ..continue call ..continue db value,0 ..continue: pushd equ \} match pushd =addr var,pushd value \{ \local ..opcode,..address if +var relativeto 0 | +var relativeto $ and with negate float passed to invokes with win32ax.inc included I could crash compilation process. in case of win32a.inc negate floats passed to invokes OK. _________________ I don`t like to refer by "you" to one person. My soul requires acronim "thou" instead. |
|||
23 Feb 2023, 00:15 |
|
revolution 23 Feb 2023, 00:23
You can use = instead of equ
Code: numn = dword -1.0 ; or qword |
|||
23 Feb 2023, 00:23 |
|
ProMiNick 23 Feb 2023, 00:51
so, what thou suggest revolution for others in case of using negative floats passed to invokes with win32ax.inc includes?
1.Don`t use them together. 2. patch pushd override manualy 3. patch fasmcore that atleast unary+- works on floats |
|||
23 Feb 2023, 00:51 |
|
revolution 23 Feb 2023, 01:27
I think it is a bug because it is inconsistent.
Code: db +-1 ; this is fine dq +-1.0 ; error: reserved word used as symbol. Code: numn equ (-1.0) define numn (-1.0) numn = dword -1.0 numn = qword -1.0 pushd (-1.0) invoke func, (-1.0), foo, bar |
|||
23 Feb 2023, 01:27 |
|
Tomasz Grysztar 23 Feb 2023, 08:03
In fasm 1 floats are not allowed to be a part of an arithmetic expression. A sign character is handled as a special case.
|
|||
23 Feb 2023, 08:03 |
|
revolution 23 Feb 2023, 08:59
Tomasz Grysztar wrote: In fasm 1 floats are not allowed to be a part of an arithmetic expression. A sign character is handled as a special case. Code: apple_pie = +-+-3.141592653589793 Why does pushd macro have the + prefix? |
|||
23 Feb 2023, 08:59 |
|
Tomasz Grysztar 23 Feb 2023, 09:52
revolution wrote: Why does pushd macro have the + prefix? |
|||
23 Feb 2023, 09:52 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.