flat assembler
Message board for the users of flat assembler.
![]() Goto page Previous 1, 2, 3 ... 9, 10, 11 ... 19, 20, 21 Next |
Author |
|
revolution
Tomasz Grysztar wrote:
|
|||
![]() |
|
Tomasz Grysztar
edemko wrote: Tomasz, you have told, that was not Tomasz's fasm without ESC-key |
|||
![]() |
|
ouadji
Quote:
Esc key works like fasmw in Wink 6.54 Quote:
never for me. I develop for fun, nothing else. assembler is a drug for me. ![]() money, money, money ... is there anything else in this world ? |
|||
![]() |
|
MHajduk
Hi, ouadji
![]() As far as I know, wink calculator hasn't exponentiation among available operations. Would it be possible to add it? Another thing, in the 'fasmw_654.INI' file you have such line: Code: IDEL_color=0,128,0 Code: IDLE_color=0,128,0 ![]() |
|||
![]() |
|
MHajduk
Two more features which are present in PSPad for example but absent in wink:
![]() |
|||
![]() |
|
MHajduk
One more thing in my monologue
![]() BTW, I'm testing your wink under the Win7 and seems that your calculator causes crashes. Unfortunately, I'm not able to reproduce these bugs (once I input only '-' sign and wink crashed). |
|||
![]() |
|
ouadji
Sorry MHajduk, but there are no changes to the calculator. It's the original Tomasz's calculator. Edit a feature like the calculator doesn't interest me. |
|||
![]() |
|
MHajduk
OK, I understood (FASM versions have been changing so fast lately...). But what about another features (source line numbering and exhibition of the hidden chars)?
|
|||
![]() |
|
ouadji
In fact, this is not my focus right now. There is still much to be done to develop the specific functionality of Wink. My idea is not to build an IDE, this is not the Wink spirit. I think everything has already been done in this area. I understand your request, but add "traditional" features to fasmw is not my priority. That said, it is true that a line numbering in fasmw would be something interesting.
It is much more interesting and fun for me to develop algorithms for real-time parsing .. I like this kind of programming ! Also, add a line numbering requires a good knowledge of Windows API ... I don't have that knowledge. i'm a algorytms_man, a opcode_man ... not a api_man. I like the real programming. Use the Windows functions, it's like using black boxes (in-out) i don't like that. (sorry for my english, i do my best) ps: thank you for the typo, i will fix that. |
|||
![]() |
|
MHajduk
Thanks for the explanations.
![]() Yeah, that's true, real-time lexical analysis and following parsing is a one of the most interesting parts of the programming IMO... and a one of the most difficult aswell. You've done a great job for extending the basic features of the fasm IDE, I really appreciate this. Keep it up! ![]() |
|||
![]() |
|
ouadji
yes, but it's not just the lexical analysys ... i'm still at the beginning of this problem. But every time you press a key, wink scans each time the entire file (not during the scrolling), global labels, local labels, ".." labels, "@@:" labels, proc/endp, multilines comments, backslash ... and to be fully compatible in all cases with the long lines, and respect all the characteristics of the fasm compiler i assure you that wink makes amazing things Quote: You've done a great job ... i really appreciate this ![]() |
|||
![]() |
|
MHajduk
I'm curious how do you perform string comparisons in order to highlight particular tokens. I guess that in the 'key_W.wink' you store the table of the reserved words (I took a look inside) and you just compare strings using 'cmpsb' ... I think it would be more efficient if you compared 32-bit hashes of those names instead... and the 'key_W.wink' would be smaller.
![]() |
|||
![]() |
|
ouadji
32-bit hashes ? i don't understand this. hashes ? in english, what does that mean? |
|||
![]() |
|
MHajduk
I meant 32-bit numbers which are some kind of ~unique~ (in theory, but it works anyway) identifiers corresponding to the keyword. See here: http://en.wikipedia.org/wiki/Cryptographic_hash_function
Assume that you need to check if some token belongs to the category of the reserved words. You don't need to compare whole strings in loop, you just calculate 32-bit hash of your token and search in your table of dwords if such value exists. If yes then you highlight somehow this token. Here you have an exemplary macro (slightly changed) which was used for calculation of the hashes of the imported function names (it was done to hide imports from the DLL libraries). You can fill your table of hashes using this macro: Code: macro make_hash Token* { common local ..result, ..char, ..temp virtual at 0 db Token ..result = 0x7C90EB94 ..temp = 0 repeat $ load ..char byte from % - 1 if ..char = 0 break end if ..temp = (..temp and 0xffffff00) or ..char ..temp = ..temp shl 25 or ..temp shr 7 ..result = ..result xor ..temp end repeat end virtual dd (..result and 0xffffffff) } Code: xor eax, eax mov edx, 7C90EB94h .hash: ror eax, 7 xor edx, eax lodsb test al, al jnz .hash ![]() |
|||
![]() |
|
ouadji
very interesting idea indeed,
I really like this way to "encode" and search tokens I'll look at that more closely, thank you MHajduk edit: I'll test this algorithm on all keywords and check if all values are different. |
|||
![]() |
|
MHajduk
ouadji wrote: edit: ![]() |
|||
![]() |
|
ouadji
Code: xor eax, eax mov edx, 7C90EB94h .hash: ror eax, 7 xor edx, eax lodsb test al, al jnz .hash with "dword", this algorythm does not work. 'blendpd' and 'addpd' the two words give the same result. 96D7E3C8h for both even with a qword, this first result does not give me confidence in this algorithm. It is a pity , I liked this idea. |
|||
![]() |
|
baldr
ouadji,
Collisions are inevitable. You can design hash function carefully to minimize them, though: mnemonics are composed from limited alphabet, up to six-digit base-36 number fits into 32 bits. In fact hashes are often used as a first stage of exact matching algorithms. Consider file comparison to find duplicates: first compare hashes (CRC-32, for example), when they match, compare files bytewise. |
|||
![]() |
|
bitRAKE
Will a perfect hash table work?
http://burtleburtle.net/bob/hash/perfect.html The same hash could be used in another table for dynamic content. Basically, all FASM keywords would be excluded with a single string compare. Last edited by bitRAKE on 11 Sep 2010, 07:05; edited 1 time in total |
|||
![]() |
|
Goto page Previous 1, 2, 3 ... 9, 10, 11 ... 19, 20, 21 Next < Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2020, Tomasz Grysztar. Also on GitHub, YouTube, Twitter.
Website powered by rwasa.