flat assembler
Message board for the users of flat assembler.
Index
> Macroinstructions > Easy inheriting of structures. |
Author |
|
pelaillo 05 Mar 2004, 13:03
Nice trick!
The number of points indicates the degree of inherition and we save the extra chars. The code is more readable. |
|||
05 Mar 2004, 13:03 |
|
S.T.A.S. 05 Mar 2004, 14:07
Cool!!
I like its simplicity But, what do you think about solving "double dot problem" ? Currently, I'm playing with some modification of huge Privalov's "struct" macro, posted somewhere here. (well, trying to understand it) It's incomplete yet, but such things are already possible: mov eax, [esi+TCommonFile.hFileName] mov ebx, [esi+TFormSource.hFileName] At the moment it has some problem, when complex structures are inherited with overriding of default values. Overriding works for simple fields like DWORD, but not for TCommonFile. In the case posted here this doesn't matter, since there are just "dd ?" fields. I can post current unfinished version, if you think 2 dots are bit boring and illogical (though, I'd like to finish it before posting) |
|||
05 Mar 2004, 14:07 |
|
JohnFound 05 Mar 2004, 14:23
S.T.A.S. wrote: But, what do you think about solving "double dot problem" ? Well, maybe it is feature, not a problem. As pelaillo writes in above post, double point shows that the field is inherited. In addition, I don't want to make it via kilometer long macroses. It is the KISS principle - "keep it short and simple". For example, base "struct" macro is KISS-macro, while extended Privalov's variant is maybe more powerfull, but it is not KISS-macro. Regards. |
|||
05 Mar 2004, 14:23 |
|
S.T.A.S. 05 Mar 2004, 16:19
JohnFound wrote: Well, maybe it is feature, not a problem.. Yes, I see your point. It's useful, indeed. (and I write it with ") That's why I renamed "not KISS-macro" into "class" - it has another purpose. BTW, could you say something about string constant macro? Is it a KISS-macro or not? I hoped I could be useful for Fresh.. |
|||
05 Mar 2004, 16:19 |
|
JohnFound 05 Mar 2004, 16:40
S.T.A.S. wrote: BTW, could you say something about string constant macro? Is it a KISS-macro or not? I hoped I could be useful for Fresh.. Well I like it. It is complex enough, but still it is the simplest solution of this proble - i.e. KISS. I think to include it in Fresh standard macro library, but not immediately and maybe in some modified mode (I don't like so many period signs. I understand that you want to make it more global with adding .const.dw for example, but maybe separate names are more appropriate in this case.) Regards. P.S. btw, if you want to contribute to Fresh, in this moment, there are some freezed tasks, that need solution, but I have no time for them... for example visible controls style editor - Scientica was wrote one, but it is obsolete, because of changes in the design and he visibly have no time to renew it. |
|||
05 Mar 2004, 16:40 |
|
S.T.A.S. 05 Mar 2004, 23:00
JohnFound wrote: I don't like so many period signs. I understand that you want to make it more global with adding .const.dw for example, but maybe separate names are more appropriate in this case. I think this macro is to be integrated into something like invoke. P.S. About style editor.. I must say, I'm quite unpractised with GUI (and many other parts of API). I'd skip even DispatchMessage in damn window I must create, but this works a bit buggy in XP.. May be something else if I'll have time and knowledge |
|||
05 Mar 2004, 23:00 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.