flat assembler
Message board for the users of flat assembler.
![]() |
Author |
|
Roman 16 Jun 2025, 12:08
fasmw 1.73
i found this code Code: if a relativeto b & a > b db a - b end if Not understand clear what do relativeto b & a > b |
|||
![]() |
|
Roman 16 Jun 2025, 12:10
I do this
Code: a = 30 b = 4 if a relativeto b & a > b mov al, a - b. ;I get mov al,30-4 end if But we can do simple if a > b Why need a relativeto ? |
|||
![]() |
|
Roman 18 Jun 2025, 08:39
Thanks.
relativeto not work with xmm registers. |
|||
![]() |
|
revolution 18 Jun 2025, 09:02
xmm registers can't be used for addressing. So relaiveto wouldn't make sense with them.
Code: mov eax,[xmm0] ; ??? virtual at xmmo ; ??? |
|||
![]() |
|
Roman 18 Jun 2025, 21:43
xmm registers can store address!
one xmm register can store four addresses. Code: mov eax,mylabel movd xmm0,eax if b relativeto xmm movd ebx,xmm0 end if |
|||
![]() |
|
macomics 18 Jun 2025, 22:30
Roman wrote: xmm registers can store address! The storage option has nothing to do with it. relativeto checks the set from the addressing block (expressions in [] or rex+modr/m+sib fields) |
|||
![]() |
|
Tomasz Grysztar 19 Jun 2025, 10:50
The XMM registers can, in fact, occur in a [] address, like in this example straight from the manual:
Code: vgatherqps xmm0,[xmm2],xmm3 ; gather two floats Code: label a at xmm0+3 assert a relativeto xmm0 Code: ;assert xmm0 relativeto xmm0 ; fails assert +xmm0 relativeto xmm0 In case of fasm2, such distinction no longer exists. All registers are defined as linear polynomial terms (with ELEMENT), so even when you use a plain register argument to a simple instruction, it is parsed as an expression (what makes "add eax,ebx+0" accepted syntax, while in fasm 1 it was not). |
|||
![]() |
|
Roman 19 Jun 2025, 11:51
Thanks.
I knew it ![]() work fine Code: label myrq at +xmm3 if myrq relativeto xmm3 display 're' ;I get 're' end if |
|||
![]() |
|
revolution 19 Jun 2025, 11:56
Sorry for the misinformation from me, and thank to Tomasz for setting the record straight.
|
|||
![]() |
|
Roman 19 Jun 2025, 17:17
relativeto what symbols using ?
I mean symbols -,+,&,:,# |
|||
![]() |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.