flat assembler
Message board for the users of flat assembler.
Index
> Main > Fasm wishlist Goto page 1, 2 Next |
Author |
|
vid 26 Oct 2006, 13:31
- why WAS this posted in Projects/ideas?
- why store pi in EAX, which you can't use for floating point operations? - how would you want code like this assembled (eg. what should be resulting instructions)? eax=edx + (edx*eax) + (ecx*edx) really, what you want is not assembly. sorry to wake you up |
|||
26 Oct 2006, 13:31 |
|
Tomasz Grysztar 26 Oct 2006, 13:34
Except for the "mov eax, 3.14159265". which is pretty valid with fasm.
|
|||
26 Oct 2006, 13:34 |
|
f14t 26 Oct 2006, 13:36
I posted it here because it's an idea.
Thanks alot to you that i am absolutely woken up. |
|||
26 Oct 2006, 13:36 |
|
f14t 26 Oct 2006, 13:40
Tomasz Grysztar wrote: Except for the "mov eax, 3.14159265". which is pretty valid with fasm. Hey vid now shoot me in head with a bulky-stone-age cannon. Why do you think Tomasz's Fasm allows Code: mov eax, 3,14159265 Quote: Pity is Good. |
|||
26 Oct 2006, 13:40 |
|
vid 26 Oct 2006, 14:43
He allows it because floating point number can be represented by dword value. and dword value can be stored in EAX. But i was asking WHY to do it, not if it is possible.
|
|||
26 Oct 2006, 14:43 |
|
dead_body 26 Oct 2006, 14:48
the code like:
eax=eax*ecx-edx is very hard to generate(optimized) first, someone must do think like: invoke MessageBox,0,"string1!\n!string2"," ",0 or db "\n",0 which is equal to db 13,10,0 and then all other. |
|||
26 Oct 2006, 14:48 |
|
vid 26 Oct 2006, 16:06
in FASM, you use invoke MessageBox, 0, <"string1",13,10,"string2">, "", 0
|
|||
26 Oct 2006, 16:06 |
|
f14t 27 Oct 2006, 11:21
vid wrote: He allows it because floating point number can be represented by dword value. and dword value can be stored in EAX. But i was asking WHY to do it, not if it is possible. Vid you seem to me like really curious. So here's WHY Code: cmp ebx, 5 jb .lesser mov eax, 5.5 jmp .rate_set .lesser: mov eax, 2.2 jmp .rate_set ; ; ... ; .rate_set: mov [interest_rate], eax jmp .do_prinitng ; ; ... ; |
|||
27 Oct 2006, 11:21 |
|
vid 27 Oct 2006, 11:24
this work? i am not sure about structure of flotaing point numbers, but i wouldn't count on this
|
|||
27 Oct 2006, 11:24 |
|
f14t 27 Oct 2006, 11:27
vid wrote: this work? i am not sure about structure of flotaing point numbers, but i wouldn't count on this Yeah, it works. Count on me. And everybody please see my additions to Fasm Wishlist regularly. Last edited by f14t on 27 Oct 2006, 11:48; edited 1 time in total |
|||
27 Oct 2006, 11:27 |
|
vid 27 Oct 2006, 11:40
Quote: Yeah, it works. i won't: http://en.wikipedia.org/wiki/IEEE_floating-point_standard#Single-precision_32_bit upper bit is sign. so this doesn't work: Code: mov eax, -1 ;10111111100000... cmp eax, 1 ;00111111100000... jb lesser ;doesn't jump neither does signed conditional jumps: Code: mov eax, 1 ;001111111000000... cmp eax, 2 ;010000000000000... jl lesser ;doesn't jump so? |
|||
27 Oct 2006, 11:40 |
|
f14t 27 Oct 2006, 11:51
Hey Buddy !
Please watch my code carefully before commenting on it. Have you mistaken ebx for eax ? |
|||
27 Oct 2006, 11:51 |
|
vid 27 Oct 2006, 13:02
no - explain
|
|||
27 Oct 2006, 13:02 |
|
Madis731 27 Oct 2006, 13:32
Yeah, the multiplying stuff would need a huge optimizing library:
http://www.azillionmonkeys.com/qed/amult.html http://www.azillionmonkeys.com/qed/adiv.html Otherwise it wouldn't make it any better to write this way.... |
|||
27 Oct 2006, 13:32 |
|
Tomasz Grysztar 27 Oct 2006, 15:01
vid: yes, his code is an excellent example of why I also thought of this feature as useful. Note that fp values are just stored temporarily in EAX, to be later put in some place in memory. You can then do FLD or any other FPU operation on that memory, but to move it into the right place you could use the general register aswell, what saves you defining additional variables (that would anyway have to be moved through some register to place the values where you want them, finally).
|
|||
27 Oct 2006, 15:01 |
|
Plue 27 Oct 2006, 16:14
vid wrote: He allows it because floating point number can be represented by dword value. and dword value can be stored in EAX. But i was asking WHY to do it, not if it is possible. Pseudo-code: A := 5.5 = FLOAT Because this: Code: MOV ecx, [v_FLOAT] XOR edx, edx CMP ecx, 1084227584 SETE dl MOV [v_A], edx is faster than this: Code: FLD dword [v_FLOAT] FLD dword [F0] XOr ecx, ecx FCOMIP st1 FSTP st0 JZ rq_L1 MOV ecx, 1 rq_L1: MOV [v_A], ecx .. F0 dd 1085276160 _________________ Roses are red Violets are blue Some poems rhyme And some don't. |
|||
27 Oct 2006, 16:14 |
|
Dex4u 27 Oct 2006, 16:52
This maybe a bit off topic(sorry), but one thing on my wishlist has nothing to do with fasms internals, it a fasm server that you can assemble you code by typing it into a browser and ether coming back with a zip file with the code assembed or error messages.
Great for code at school or work or internet cafe etc . |
|||
27 Oct 2006, 16:52 |
|
r22 29 Oct 2006, 19:41
Dex4u, that's a very secure idea for the server. Someone could send 40mb of gibberish and hang the server while it tries to compile it.
But the technology you are thinking of would be CGI with a few modifications to fasm's command line compiler. |
|||
29 Oct 2006, 19:41 |
|
vid 29 Oct 2006, 20:01
somebody already did it i think. search board for few words of "fasm online compilation service".
problem arises with include files, and as tomasz said, it's possible to list files on server with "load" directive |
|||
29 Oct 2006, 20:01 |
|
Goto page 1, 2 Next < Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.