flat assembler
Message board for the users of flat assembler.
![]() |
Author |
|
r22
push dword ptr fs:[0] 64 67 FF 36 00 00
\/ how do i do it in fasm? fasm push dword ptr fs:[0] 64 FF 34 00 00 00 00 makes it a large dword ptr fs:0 any help would be appreciated |
|||
![]() |
|
JohnFound
Code: push dword [fs:0] ; or pushd [fs:0] |
|||
![]() |
|
Tomasz Grysztar
fasm doesn't use 16-bit addressing in 32-bit mode unless you tell to do it (with "push [fs:word 0]"), because the prefixed instructions even if shorted, usually were decoded slower. The earliest versions of fasm did such optimization, but later I've decided that this was the bad choice.
However I have just noticed that in the latest releases, during making the changes to adapt the assembler for future integration of AMD64 support, I have introduced a small bug, which caused fasm to ignore the size operator for address (so "push [fs:word 0]" is by fasm 1.56 assembled exactly the same as "push [fs:0]). I am fixing it now, look out for the new release. |
|||
![]() |
|
Madis731
If I understood correctly - push [fs:word 0] should assemble to 6-byte operation/command, but it still pushes DWORD to the stack.
To my knowledge this command should push word (I mean written exactly as push [fs:word 0]), but I fear to argue here because I know that ADD, SUB, AND, ... have shorter forms but still dealing with 4-byte variables (m32/r32). Just checking - did I understand correctly? |
|||
![]() |
|
vid
johnfound: i thought "pushd" is just a macro
Last edited by vid on 19 Jan 2005, 11:54; edited 1 time in total |
|||
![]() |
|
Tomasz Grysztar
Quote: If I understood correctly - push [fs:word 0] should assemble to 6-byte operation/command, but it still pushes DWORD to the stack. As I wrote above, there is a bug in 1.56 causing it - check with some earlier release, or with the 1.57 - which is coming out. Quote: To my knowledge this command should push word (I mean written exactly as push [fs:word 0]) To push word use the "push word [fs:0]" command, everything inside the square brackets define the address on which you operate, so if you put size operator there, it applies to address size. |
|||
![]() |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2020, Tomasz Grysztar. Also on GitHub, YouTube, Twitter.
Website powered by rwasa.