The MASM Forum Archive 2004 to 2012

General Forums => The Campus => Topic started by: rags on March 08, 2006, 07:07:09 AM

Title: question on converting a c structure
Post by: rags on March 08, 2006, 07:07:09 AM
I have these two stuctures in c:

typedef struct row_list
    {
      int gc;
      int  z;
     }row_list;

typedef struct col_list
    {
      int  lsize;
      int row_offset;
      struct  row_list *ptr;
     }col_list;

That I want to convert to asm. I have this-

row_list STRUCT
       gc DWORD ?
        z  DWORD ?
row_list ENDS

col_list STRUCT
        lsize           DWORD ?
       row_offset  DWORD ?
       Lprow_list   DWORD ?
col_list ENDS



Am I correct in my understanding that -
struct  row_list *ptr
is just a pointer to a row_list structure, thus its just a dword?
regards,
rags
Title: Re: question on converting a c structure
Post by: jckl on March 08, 2006, 07:27:40 AM
i am not 100% sure but i would assume it to be

       Lprow_list   row_list <?>

If i am incorrect then sry.
Title: Re: question on converting a c structure
Post by: asmfan on March 08, 2006, 07:34:43 AM
in 32bit applications any pointer has a size of 32bit or DWORD (DD) type.