IC, ICM and STC, STCM

IC loads the last byte of a register, leaving the high-order bytes unchanged.  ICM loads selected bytes of a register, corresponding to 1-bits set in the 4-bit mask, from contiguous bytes commencing at the storage address.

         ICM   R3,B'1111',STGFIELD      R3 <- STGFIELD(4)
         L     R3,STGFIELD              SAME AS ABOVE
         STCM  R3,B'1111',STGFIELD      R3 -> STGFIELD(4)
*
         ICM   R3,B'0011',STGFIELD      R3-BYTE-3-4 <- STGFIELD(2)
         LH    R3,STGFIELD              SAME AS ABOVE
         STCM  R3,B'0011',STGFIELD      R3-BYTE-3-4 -> STGFIELD(2)
*
         ICM   R3,B'0001',STGFIELD      R3-BYTE-4 <- STGFIELD(1)
         IC    R3,STGFIELD              SAME AS ABOVE
         STCM  R3,B'0001',STGFIELD      R3-BYTE-4 -> STGFIELD(1)
         STC   R3,STGFIELD              SAME AS ABOVE
*
         ICM   R3,B'1001',STGFIELD      R3-BYTE-1 <- STGFIELD(1)
*                                       R3-BYTE-4 <- STGFIELD+1(1)
         STCM  R3,B'1001',STGFIELD      REVERSE OF THE ABOVE

Copyright © 2006 The Stevens Computing Services Company, Inc.  All rights reserved.