flat assembler
Message board for the users of flat assembler.
Index
> Windows > Learning fasm from masm Goto page Previous 1, 2, 3, 4, 5, 6 Next |
Author |
|
edfed 19 Sep 2012, 21:29
nmake wrote: Tomasz, will fasm support floating point calculations during compile-time later? Another question, does fasm produce any form of signatures in the final executable to identify fasm programs? +1.0 for the float expression evaluation at compile. but generating a signature in the output file by the compiler is contrary to the ssso principle, all is in the source. if you want to sign your file, do it from scratch by putting a db "compiled with fasm",0 message somewhere in the source code. |
|||
19 Sep 2012, 21:29 |
|
nmake 20 Sep 2012, 01:11
Yes I definitely need floating point calculation compile-time. Without them I can't produce my complex graphics macros. It is a world apart without fpu compile-time abilities. So I am very much so intrigued to ask mr Tomasz to consider implementing it.
My second question may have appeared wrong, my question was if fasm secretly or not secretly produce any patterns in the executable that doesn't necessarily break with any principles yet it can be used to identify fasm programs. My question is if fasm use a special pattern anywhere in the executable that can be used to backtrace it to fasm. Patterns is a matter of who find the pattern and that boils down to intelligence, which can be used to invalidate a principle like the ssso. Anything that is not intellectually detected can't break any principles either if you know what I mean. |
|||
20 Sep 2012, 01:11 |
|
revolution 20 Sep 2012, 01:42
It is no secret. Each assembler produces a "fingerprint" by the encoding selection. There are many places in the x86 encoding where things can be encoded in different ways with the same length binary and no change in functional correctness.
|
|||
20 Sep 2012, 01:42 |
|
Tomasz Grysztar 20 Sep 2012, 08:33
JohnFound wrote: This sounds really interesting. Would you like to share some details? But I'm already working on this feature, so you should know it all soon anyway. nmake wrote: Tomasz, will fasm support floating point calculations during compile-time later? |
|||
20 Sep 2012, 08:33 |
|
edfed 20 Sep 2012, 08:34
in the case you state, there is no problem... maybe it can just be good to have alternate mnemonics for the alternate encodings.
but if the software add undesired bloat like db "encoded by fasm",0 somewhere in the binary, that would be a problem. |
|||
20 Sep 2012, 08:34 |
|
l_inc 20 Sep 2012, 11:56
JohnFound
IMHO my request describes the feature quite comprehensive. |
|||
20 Sep 2012, 11:56 |
|
nmake 02 Oct 2012, 14:37
eax is the object handle returned from LoadImage function.
ecx points to a local DIBSECTION structure. Why does this fail? Program crashes with the following code. If I comment it out, the program runs fine again. invoke GetObject,eax,[sizeof.DIBSECTION],ecx I am having problem with sizeof, how is it used properly and can someone give me a few variations of how to use it. I am aware that you can declare a sizeof element in a structure, but that would be hard to do with all the structures that I have in my equate include files. hehe. Btw I had to add the DIBSECTION structure to my gdi32 equates file, it was not in there from the beginning. |
|||
02 Oct 2012, 14:37 |
|
revolution 02 Oct 2012, 15:05
nmake wrote: eax is the object handle returned from LoadImage function. |
|||
02 Oct 2012, 15:05 |
|
nmake 03 Oct 2012, 11:16
If I remove the brackets compiling fails if I use it in a parameter of invoke, but if i use mov eax,sizeof.DIBSECTION and then pass eax as a parameter it works. The odd thing is that if I use brackets when passing it as a parameter, it works. So I wonder what you mean?
Btw, do you have experience with directsound? I have made a directsound library consisting of some 1300 lines of assembly isntructions, its a complete directsound wrapper library. But sounds get this crackling sound just as the sound finishes to play, all sounds have this crackling noise at the end. I wonder if this is caused by a primary buffer that contains noise after the sound is played. I tried to google it and a few people suggested that you needed to write the primary buffer with silence, set volume to max and loop the silence for a duration and that would fix it. I haven't tried it yet, but can anyone (who have any experience with dsound) tell me? |
|||
03 Oct 2012, 11:16 |
|
nmake 03 Oct 2012, 11:25
I have never coded 64 bit assembly before, I have always used 32 bit. Can anyone tell me how exactly register rotation works, is register rotation a standard default behavior on the majority of 64 bit processors? Does this mean I can reuse rax throughout my code without stalling the cpu?
|
|||
03 Oct 2012, 11:25 |
|
revolution 03 Oct 2012, 11:30
Try to imagine sizeof.DIBSECTION as a numeric value, let's say it is 16. If you try this your program will crash:
Code: mov eax,[16] ;What is at memory address 16? Code: push [16] ;This will always crash in Windows |
|||
03 Oct 2012, 11:30 |
|
revolution 03 Oct 2012, 11:34
nmake wrote: I have never coded 64 bit assembly before, I have always used 32 bit. Can anyone tell me how exactly register rotation works, is register rotation a standard default behavior on the majority of 64 bit processors? Does this mean I can reuse rax throughout my code without stalling the cpu? AFAIK: All current x86 CPUs do have some form of renaming. But this should not affect how you write your code. |
|||
03 Oct 2012, 11:34 |
|
nmake 03 Oct 2012, 11:39
revolution wrote: Try to imagine sizeof.DIBSECTION as a numeric value, let's say it is 16. If you try this your program will crash: The typical pagesize is 4096 bytes and the granularity is 65536 and the lowest memory address is the same, 65536 $10000 and the highest memmory address accessible is $7ffeffff |
|||
03 Oct 2012, 11:39 |
|
nmake 03 Oct 2012, 11:40
revolution wrote:
I see, but does this mean that if I use the rax register throughout my program, the cpu will not stall? |
|||
03 Oct 2012, 11:40 |
|
revolution 03 Oct 2012, 11:44
nmake wrote: I see, but does this mean that if I use the rax register throughout my program, the cpu will not stall? |
|||
03 Oct 2012, 11:44 |
|
nmake 03 Oct 2012, 11:59
As far as I get it, I should continue to prevent register stalling as I would normally do?
|
|||
03 Oct 2012, 11:59 |
|
revolution 03 Oct 2012, 12:06
nmake wrote: As far as I get it, I should continue to prevent register stalling as I would normally do? BTW: I hope you are not breaking the cardinal rule: "Get it working then get it fast." |
|||
03 Oct 2012, 12:06 |
|
nmake 03 Oct 2012, 13:03
How can I make things worse if the cpu renames it either way? If I use rax or rcx should not make any difference if the cpu already renames them? But I agree, timing your code often pays off better than trying to understand the code fully to a hundred percent.
|
|||
03 Oct 2012, 13:03 |
|
revolution 03 Oct 2012, 13:22
nmake wrote: How can I make things worse if the cpu renames it either way? If I use rax or rcx should not make any difference if the cpu already renames them? |
|||
03 Oct 2012, 13:22 |
|
Goto page Previous 1, 2, 3, 4, 5, 6 Next < Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.