On 12/16/2014 12:45 PM, Cali zMan wrote:
I am trying to use the SPMs to construct the following:
If A or ((B or C) and D) Do stuff
But I can't seem to get the right combination of ORs, ANDs, and ORIFs to
make this work.
The closest thing to working and what seems to me like it should work is:
IF (A),OR, (B),ORIF, (C),AND, (D)
A positive result for checking 'A' causes the code inside the 'IF' to run
(which I want), but after the check for 'B', it jumps down into the code
without checking 'D' like I want.
The order of the tests is important, too. 'A' is a TM, 'B' is an ICM and if
it's negative, 'C' is an LCR for the register. If the resulting LCR is positive
(or 'B' was positive to start with), then I do 'D', an ICM for a non-zero value.
The resulting code should look like:
TM A,BIT
JO DOSTUFF
ICM R1,15,CtlBlk
JP DOTEST
LCR R1,R1
JZ DONTDOSTUFF
DOTESTDS 0H
ICM R1,15,FIELD(R1)
JZ DONTDOSTUFF
DOSTUFFDS 0H
...
DONTDOSTUFF DS 0H
Well, why don't you forget the Structure Program Macros
and just code it as above?
-Steve Comstock
I've tried everything I can think of without splitting the 'IF' statement
up, but thought I would ask here before doing that.