Jump to content

Recommended Posts

Posted
Hi, My question is in the screenshot below. It's from Step7 lite. I understand that if you move, for example, a byte to a word the result will be padded out with zeros'. Or a word to a byte will be truncated. But I don't understand what is happening here. Thanks for any help.
Posted
Now that would have been really confusing.MW0 = MB0 + MB1 MW2 = MB2 + MB3 and MD0 = MW0 + MW2 = MB0 + MB1 + MB2 + MB3 MD4 = MW4 + MW6 = MB4 + MB5 + MB6 + MB7 with merker addresses in particular, you have to be very careful that you dont unintentionally cross boundaries between separate addresses. It is very easy to do for example MD10 = MD6 + MD8 which has two cases of crossing boundaries. For words, always use even addresses. For doublewords, use quad-even (not sure if that is the right term) adresses. i.e MD0, MD4, MD8, MD12, MD16 etc.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...