How would you create your own structure in asm, example in c:

struct computer {
   float cost;
   int year;
   int cpu_speed;
   char cpu_type[16];
   } model;
any ideas? any and all help would be apreciated. thanx. -brad
Posted on 2001-03-10 22:43:00 by Rage9
Structures in Assembly are just as easy as they are in C: computer struct ; struc if you're using TASM cost dd ? ; floats are 32 bit year dd ? ; or dw for 16 bit integer cpu_speed dd ? cpu_type db 16 dup (?) computer ends And there you go...a structure. If you want to define a structure data, then you have to use this: model computer <> And that's it. Fairly straight forward. This message was edited by Racso, on 3/10/2001 10:58:42 PM
Posted on 2001-03-10 22:58:00 by Racso
Same structure in MASM

computer STRUCT  
   cost      REAL8    ?
   year      DWORD    ?
   cpu_speed DWORD    ?
   cpu_type  BYTE     16 DUP(0)
computer ENDS
Posted on 2001-03-11 00:48:00 by Ernie
Thanx very much! -brad
Posted on 2001-03-11 09:53:00 by Rage9