Modify the value of variable in assembly

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Modify the value of variable in assembly

1,124件の閲覧回数
girichavana
Contributor II

Hello Support,

 

I am working on HCS08, with CW 10.1 assembly language programming.

 

I need support to write a assembly routine to modify the value of 32 bit variable.

 

Please support in this.

 

Regards

Giri

ラベル(1)
0 件の賞賛
返信
2 返答(返信)

970件の閲覧回数
ZhangJennie
NXP TechSupport
NXP TechSupport

Hi Giri,

I believe this is the same issue as service request 1-1314984694

CW for 8bit mcu assembly instruction doesn’t have a simple instruction that can modify the value of a 32bit variable. This is limited by the related register width.

See below code: it is to set 32bit variable temp_long as 0xaabbccdd

temp_long ds 4

… …

       ldhx  #$aabb

       sthx  temp_long

       ldhx  #$ccdd

       sthx temp_long+2

Hope this helps!

-----------------------------------------------------------------------------------------

this answer is for you. if you think it helps, please click on the "correct answer" button, thanks!

Best Regards,

JunZhang

0 件の賞賛
返信

970件の閲覧回数
Wlodek_D_
Senior Contributor II

Hello,

Thank you for your post, however please consider moving it to the right community place (e.g. CodeWarrior Development Tools or 8-bit Microcontrollers) to get it visible for active members.

For details please see general advice Where to post a Discussion?

Thank you for using Freescale Community.

0 件の賞賛
返信