Hi,
I have finally understood and realized how the locals ... endl macros work for primitive (db , dw & dd) types...
I have been able to re-create these forms inside my macros - I am trying to create an OO library (inheritance, polymorphism and COM), with err treatment (for Win32) - but I still have the problem of working with structures...
I tried using the macro label . definition, but everytime I use an structure it places a global label (without the '.' ) .
\macro locals
\\{
match t_strStack , STACKFRAMETYPE
\\\{
StartLocalData a_strClass , a_strProc , t_strStack
macro label . \\\\{ deflocal a_strClass , a_strProc, t_strStack , . , : , \\\\}
struc dd [val] \\\\{ \\\\common deflocal a_strClass , a_strProc , t_strStack , . , dd , val \\\\}
struc dw [val] \\\\{ \\\\common deflocal a_strClass , a_strProc , t_strStack , . , dw , val \\\\}
struc db [val] \\\\{ \\\\common deflocal a_strClass , a_strProc , t_strStack , . , db , val \\\\}
\\\}
\\}
\macro endl
\\{
purge label
restruc dd
restruc dw
restruc db
match t_strStack , STACKFRAMETYPE \\\{ EndLocalData a_strClass , a_strProc , t_strStack \\\}
\\}
macro deflocal a_strClass , a_strProc , a_strStack , a_strAddress , a_strSize , [a_astrData]
{
common
match x , LocalDataList \{ LocalDataList equ LocalDataList, \}
LocalDataList equ LocalDataList a_strAddress
local ..var
..var a_strSize a_astrData
match =EBP x , a_strStack ..var \{ a_strAddress equ [ebp - LOCALSIZE + x] \}
match =ESP x , a_strStack ..var \{ a_strAddress equ [esp + x] \}
}
The main thing is that I am trying not only to put it working, but I am also trying to understand all the mechanics involved. That is why I am re-writing the macros.
I appreciate any help.
If there is someone interested in those libraries after I finish them, I might publish it here. In order to do that, I would like to know how interesting people think this would be.