Inc size for BCHG #6, (A2)+

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

Inc size for BCHG #6, (A2)+

跳至解决方案
1,897 次查看
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,073 次查看
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,074 次查看
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,073 次查看
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 项奖励
回复