Can there be concurrent updates?  OI works fine if on any modern machine, 
given the interlocked access facilities.

If there are no worries about concurrent updates and you don't like 
executed instructions,

Something like this (assumes AMODE 31, bit number < 4G):

L    area_address_reg,area_address
L    even_reg,bit_num
SRDL even_reg,3      * even_reg has the byte offset
SRL  even_reg+1,29   * odd reg has which bit-within-byte

IC   some_reg,0(even_reg,area_address_reg)
LHI  OR_Reg,X'80'
SRL  OR_Reg,0(even_reg+1)
OR   some_reg,OR_reg
STC  some_reg,0(even_reg+1,address_reg)

can be used. If there could be concurrent updates, the above approach will 
not work.

Peter Relson
z/OS Core Technology Design

Reply via email to