Inc size for BCHG #6, (A2)+

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Inc size for BCHG #6, (A2)+

Jump to solution
1,895 Views
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

Labels (1)
0 Kudos
Reply
1 Solution
1,071 Views
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.

View solution in original post

0 Kudos
Reply
2 Replies
1,072 Views
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 Kudos
Reply
1,071 Views
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 Kudos
Reply