Page 1 of 1

structures in trunk kernel

Posted: Wed Feb 22, 2012 5:54 pm
by hidnplayr
In net branch, I used nested structures, for example:

Code: Select all

struct  UDP_SOCKET              IP_SOCKET

        LocalPort               dw ?
        RemotePort              dw ?
        firstpacket             db ?

ends 
Where UDP_SOCKET is a child of IP_SOCKET

For this i used struct.inc that is bundled with fasm.
The main (trunk) kernel however uses a simpler macro. The problem is that the macro in trunk uses a dot before all labels, while this macro does not.
Does anybody see a problem with me converting trunk kernel to use newer macro?

(I do not want to merge both kernels yet, but I need to update old code in net kernel, and it will be needed if i want to merge later.)

Re: structures in trunk kernel

Posted: Wed Feb 22, 2012 6:38 pm
by Serge
I think it's a good idea.

Re: structures in trunk kernel

Posted: Wed Feb 22, 2012 6:47 pm
by hidnplayr
Ok done, hope I did not make many errors, but I think not.
Also, only the nescessary structs were changed to compile with struct.inc, not all structs were reviewed.

Re: structures in trunk kernel

Posted: Thu Feb 23, 2012 10:31 pm
by hidnplayr
I updated most of the remaining structs to use this new syntax, and checked output files for binary differences, looks good :)