flat assembler
Message board for the users of flat assembler.
![]() |
Author |
|
revolution 04 Aug 2006, 10:59
double is an 8 byte value. You must use two PUSH's to push the lower and upper halves separately.
|
|||
![]() |
|
GR-K 12 Aug 2006, 16:17
The IA-32 processors are not have command for adding of two values in stack at the same time. If you are using the "push 2 3" directive it's become to macroinstruction and FASM generates "push 2/push 3".
Oh, yeah! And IA-64 CPUs too! I am lost that we are in 21st century :) |
|||
![]() |
|
vid 12 Aug 2006, 20:37
"push double 2.0" this can be only macroinstruction call, maybe you meant "pushd double 2.0", where "pushd" is common win32 include macro used with stdcall and invoke.
"push 2 3" is not macro, it's unsyntactical allowed exception, because many people (well... tomasz) are used to it |
|||
![]() |
|
Tomasz Grysztar 12 Aug 2006, 20:44
Yeah that's one of the TASM legacies in fasm.
|
|||
![]() |
|
GR-K 13 Aug 2006, 07:46
OK, it's work as macroinstruction. Two commands will be genarated anyway
![]() ![]() |
|||
![]() |
|
vid 13 Aug 2006, 11:09
yes, see FASMLIB adaptation of pushd macro:
Code: macro __libcall_pushd value* { ... ;if value is "double [something]" or "double ptr something" use 2 pushes match ifend =double [var],ifend value \{ push dword [var+4] push dword [var] \} match ifend =double =ptr var,ifend value \{ push dword [var+4] push dword [var] \} ;if value is "double something" use 2 pushes (more tricky, needs to be loaded) match ifend =double num,ifend value \{ \local ..high,..low virtual at 0 dq num load ..low dword from 0 load ..high dword from 4 end virtual push dword ..high push dword ..low \} ... } |
|||
![]() |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2023, Tomasz Grysztar. Also on GitHub, YouTube, Twitter.
Website powered by rwasa.