Hi When i type this, struct cmd_pkt{ int type; int OGF; int OCF; int len; unsigned int far data_pkt[256]; }; struct cmd_pkt c_pkt; After I complied it, it prompt me with this error. Error 172: '?DT?BT_COMMAND': segment too bigt (act = 526, max = 128) The maximum value that I can put before getting this error is 40. What causes this error? Can this error be overcome? When I tried this(meaning without the structure), unsigned int far data_pkt[256] it did not give me any error. Why? I'm using the MCBx51 V2.1 Prototype Board with the 80251 chip.. Thanks in advance.
Note that the point of a structure is that you can group elements one after another in memory all together. If you were able to specify different memory areas for each member, then the elements of the structure would not be placed in memory in order. Note that this is how and ANSI and ISO standards define the behavior of structs in C. Perhaps you should look at a good C programming book. Jon