11/18/2019 8:16 AM | |
Joined: 10/7/2005 Last visit: 4/24/2025 Posts: 3047 Rating:
|
Hi Robin Hud
It does not and the contents of your code snippet will lead to AR1 containing a so called "area-internal" pointer. Area-internal is just a fancy way for saying that the pointer value has no reference to any memory area and is simply a BYTE.BIT address. If you now use AR1 to access variables from a DB, you must explicitly open the correct DB beforehand and stipulate the memory area, e.g. "L DBW [AR1,P#0.0]" if you want to load a DBW from the currently open DB. Saying that, lets say your code would for example be "L P#DBX 32.0" instead of "L P#32.0", it would create a so called "area-crossing" pointer (i.e. the pointer now does contain a reference to the memory area which in this case is a DB memory area). Even so, you would still have to explicitly open the correct DB beforehand and the only thing you can now omit is the "DB" part in the AR1 instruction and simply write "L W [AR1,P#0.0]" to load a DBW. Then again, if you now write "L MW [AR1,P#0.0]", Step7 will simply ignore the fact that your pointer has DB memory area in it and load a Memory Word instead. |
Cheers |
|
This contribution was helpful to
1 thankful Users |
Follow us on