News:

  • October 13, 2025, 03:39:56 AM

Login with username, password and session length

Author Topic: Indirect addressing  (Read 1897 times)

PLCwannabe

  • Hero Member
  • *****
  • Posts: 197
Indirect addressing
« on: December 30, 2020, 10:58:08 AM »
Is there some way to use indirect addressing in a For Loop for memory locations that are offset by more than 63? Eg.
v100*v1100    (repeat 50 times) V0 is the index loop.

v[v0]*v[1100+vo]   This doesn't work.
« Last Edit: December 30, 2020, 11:00:40 AM by PLCwannabe »

BobO

  • Host Moderator
  • Hero Member
  • *****
  • Posts: 6126
  • Yes Pinky, Do-more will control the world!
Re: Indirect addressing
« Reply #1 on: December 30, 2020, 11:52:20 AM »
Is there some way to use indirect addressing in a For Loop for memory locations that are offset by more than 63? Eg.
v100*v1100    (repeat 50 times) V0 is the index loop.

v[v0]*v[1100+vo]   This doesn't work.

Simple displacements are limited to 63, but you can use full expressions as array indices in a MATH box.
"It has recently come to our attention that users spend 95% of their time using 5% of the available features. That might be relevant." -BobO

PLCwannabe

  • Hero Member
  • *****
  • Posts: 197
Re: Indirect addressing
« Reply #2 on: December 30, 2020, 02:39:12 PM »
Well, that was really easy! Thanks.

BobO

  • Host Moderator
  • Hero Member
  • *****
  • Posts: 6126
  • Yes Pinky, Do-more will control the world!
Re: Indirect addressing
« Reply #3 on: December 30, 2020, 02:47:50 PM »
Well, that was really easy! Thanks.

It's a little confusing at times...why certain limitations some places and not others. in the MATH, we have the full power of the math stack and expression language, but in individual parameters of other instructions, we are limited by what can be packed into a single parameter.

Another thing people frequently miss is that the MATH box *output* can also be a complex array expression.
"It has recently come to our attention that users spend 95% of their time using 5% of the available features. That might be relevant." -BobO