Host Engineering Forum
General Category => Do-more CPUs and Do-more Designer Software => Topic started by: Controls Guy on March 28, 2021, 03:32:04 PM
-
Expansion of free form expressions as indices has been discussed a few times, but I know it's a big deal.
I realized that many times when I'm using a MATH box to get free expressions, it's only to use something other than Vxx + offset as an index, but not a full on complex expression.
Would it be an easier intermediate step to allow other types of memory in addition to V? So for example, MHR + offset would be legal in compares, contacts, etc?
-
Or possibly, if explicitly cast as unsigned like MHRxx:UW
-
Expansion of free form expressions as indices has been discussed a few times, but I know it's a big deal.
I realized that many times when I'm using a MATH box to get free expressions, it's only to use something other than Vxx + offset as an index, but not a full on complex expression.
Would it be an easier intermediate step to allow other types of memory in addition to V? So for example, MHR + offset would be legal in compares, contacts, etc?
We've kicked around an "Expression" contact - which I think would address your need. Basically, if the result of the expression is non-zero, the contact is true. Hence, you would not even need to use a relational operator in it, you could just do something like
D[SQRT(R27) + 42 - T0.Acc] & (0x0001 << (V99 - 1))
----------------------] E [-----------------------
-
Yes, that would definitely be cool. Given the option I'd take the expansion of simple pointers but with elimination of the V restriction instead though.
The other day I did
STR ST1
MATH DST511 "MC2532" "Y[MHR12]"
where with the thing I'm asking for I'd have been able to do
STR MC2532 OUT Y[MHR12]
BUT.....if you have a higher priority on the expression contact, I'll definitely take it! :D
-
The V dependency is structural. The only way around it is expressions.
-
The V dependency is structural. The only way around it is expressions.
OK, got it. Thanks!