Unexpected EDMK problem
Posted: Thu Feb 11, 2016 10:28 pm
I have encountered an unexpected problem with EDMK.EDMK did not alter register 1. I expected it to set reg 1 to the address of the 9 in the output area. The relevant paragraph in Principles of Operation (SA22-7832-09) is very confusingly (to me, anyway) worded to imply it won't set reg 1 if VAL would be P'000', but it will set reg 1 if there is a non-zero. In my opinion this is a fair use quote.
This was encountered with Hercules. Does real hardware work this way?
EDMK EDPATT,VAL
...
EDPATT DC 0C' NNN',C' ',X'202120'
VAL DC P'009'
...
EDPATT DC 0C' NNN',C' ',X'202120'
VAL DC P'009'
I would normally code something like LA 1,EDPATT+3 to handle the case of P'000', but that would hide the case of P'009'. When I detected this I knew VAL would not be 0, so I did not preset reg 1, and got walloped.EDIT AND MARK is identical to EDIT, except for the additional function of inserting the address of the result byte in general register 1 if the result byte is a zoned source digit and the significance indicator was off before the examination of the source bytes. If no result byte meets the criteria, general register 1 remains unchanged; if more than one result byte meets the criteria, the address of the rightmost such result byte is inserted.
This was encountered with Hercules. Does real hardware work this way?