EmbeddedRelated.com
Forums

CodeWarrior Assembler (structures)

Started by Michael Huslig October 6, 2004
Hi all,

The special edition version of the CodeWarrior assembler has
STRUCT/ENDSTRUCT directives.

One can define a structure:

dataStruct: STRUCT
var1: ds.b 1
var2: ds.w 1
ENDSTRUCT

To create an instance of a structure:

mystruct: TYPE dataStruct

Has anyone tried to create an array of structures?

Mike




Having now played with CW in assembly a little, I think I can answer.
You need to enable this feature.

I enabled mine by clicking On the target tab double click on the
target - Choose Assembler for HC12 - Options button - Input Tab -
check mark the support for Stuctured types. Once you do it asked that
it resets whatever then away you go.

Good luck..
--- In , "Michael Huslig" <mhuslig@k...> wrote:
> Hi all,
>
> The special edition version of the CodeWarrior assembler has
> STRUCT/ENDSTRUCT directives.
>
> One can define a structure:
>
> dataStruct: STRUCT
> var1: ds.b 1
> var2: ds.w 1
> ENDSTRUCT
>
> To create an instance of a structure:
>
> mystruct: TYPE dataStruct
>
> Has anyone tried to create an array of structures?
>
> Mike



I have already set the option and have used the STRUCT/ENDSTRUCT directives.
I have declared variables of a structure type. What I haven't tried is
declaring an array of variables of a structure type.

Mike

----- Original Message -----
From: "zeta_alpha2002" <>
To: <>
Sent: Wednesday, October 06, 2004 5:38 PM
Subject: [68HC12] Re: CodeWarrior Assembler (structures) >
>
> Having now played with CW in assembly a little, I think I can answer.
> You need to enable this feature.
>
> I enabled mine by clicking On the target tab double click on the
> target - Choose Assembler for HC12 - Options button - Input Tab -
> check mark the support for Stuctured types. Once you do it asked that
> it resets whatever then away you go.
>
> Good luck.. >
> --- In , "Michael Huslig" <mhuslig@k...> wrote:
>> Hi all,
>>
>> The special edition version of the CodeWarrior assembler has
>> STRUCT/ENDSTRUCT directives.
>>
>> One can define a structure:
>>
>> dataStruct: STRUCT
>> var1: ds.b 1
>> var2: ds.w 1
>> ENDSTRUCT
>>
>> To create an instance of a structure:
>>
>> mystruct: TYPE dataStruct
>>
>> Has anyone tried to create an array of structures?
>>
>> Mike >
>
> Yahoo! Groups Links >