Inc size for BCHG #6, (A2)+

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

Inc size for BCHG #6, (A2)+

ソリューションへジャンプ
2,010件の閲覧回数
tupdegrove
Contributor III

Test M[a2].[6]

 

I know this is a byte operation but is register a2 post incremented by 1 or 4 bytes?

 

Tim

ラベル(1)
0 件の賞賛
返信
1 解決策
1,186件の閲覧回数
kef
Specialist I

What's this: Test M[a2].[6] ?

 

All (Ax)+ like operations will increment Ax by sizeof of operand. Sizeof is 1 in your case (BCHG.B), and A2 will be incremented by 1.

元の投稿で解決策を見る

0 件の賞賛
返信
2 返答(返信)
1,187件の閲覧回数
kef
Specialist I

What's this: Test M[a2].[6] ?

 

All (Ax)+ like operations will increment Ax by sizeof of operand. Sizeof is 1 in your case (BCHG.B), and A2 will be incremented by 1.

0 件の賞賛
返信
1,186件の閲覧回数
tupdegrove
Contributor III

Thanks Kef. Got it.  An inc by 1 makes sense if mem[a2] just represents an 8-bit value.  However, I would think the more common case on a 32-bit cpu would be to inc by 4 because mem[a2] is the ls byte of a 32-bit value.

 

Tim

0 件の賞賛
返信