flat assembler
Message board for the users of flat assembler.
![]() |
Author |
|
vid 29 Mar 2006, 07:21
there just isn't such instruction. processor doesn't have one.
|
|||
![]() |
|
Reverend 29 Mar 2006, 09:17
in 32-bit procedure you can move immediately only one dword. But you can try:
Code: pushq 123.3454 movq mm0, qword [esp] movq qword [var], mm0 add esp, 8 ; or pushq 123.3454 fld qword [esp] fstp qword [var] add esp, 8 |
|||
![]() |
|
zolkefli 29 Mar 2006, 10:05
thanks
|
|||
![]() |
|
zolkefli 29 Mar 2006, 11:27
I try
pushq 123.345 error pushq not valid instruction |
|||
![]() |
|
vid 29 Mar 2006, 13:23
you can use more advanced features:
Code: macro movq destptr, value { local ..LO, ..HO virtual at 0 dq 123.456 load ..LO dword from 0 load ..HO dword from 4 end virtual mov ptr dest, ..LO mov ptr dest+4, ..HO } dq var ... movq var, 123.456 (not tested, but idea is there) |
|||
![]() |
|
UCM 29 Mar 2006, 21:29
vid wrote: you can use more advanced features: you mean: Code: macro movq destptr, value { local ..LO, ..HO virtual at 0 dq value ;not 123.456 load ..LO dword from 0 load ..HO dword from 4 end virtual mov [dest], ..LO mov [dest+4], ..HO } dq var ... movq var, 123.456 _________________ This calls for... Ultra CRUNCHY Man! Ta da!! *crunch* |
|||
![]() |
|
vid 30 Mar 2006, 00:54
yup, that's it. And i think ptr would work too
![]() |
|||
![]() |
|
Reverend 30 Mar 2006, 22:03
Yes, that's a great idea, but don't forget that movq is an instruction and your macro overloads it making original one unachievable (eg. movq mm0, qword [esp])
pushq works similar as the movq macro above. I thought it was in official win32ax include, but maybe I'm wrong |
|||
![]() |
|
RedGhost 31 Mar 2006, 05:56
Reverend wrote: Yes, that's a great idea, but don't forget that movq is an instruction and your macro overloads it making original one unachievable (eg. movq mm0, qword [esp]) Code: match pushd =double num,pushd value \{ \local ..high,..low virtual at 0 dq num load ..low dword from 0 load ..high dword from 4 end virtual push ..high push ..low pushd equ \} and Code: match pushd =double =ptr var,pushd value \{ push dword [var+4] push dword [var] pushd equ \} are both from win32ax, so you are indeed correct _________________ redghost.ca |
|||
![]() |
|
vid 31 Mar 2006, 07:55
Reverend: you are right, i forgot there is a movq instruction, i don't play with MMX/SSE stuff a lot. This macro should have another name.
|
|||
![]() |
|
Reverend 31 Mar 2006, 13:42
zolkefli: According to RedGhost's post and FASM macro, you don't write 'pushq 123.345' but 'push double 123.345' instead.
|
|||
![]() |
|
UCM 01 Apr 2006, 02:23
or... pushd double 123.345
|
|||
![]() |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2023, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.