HLASM - STC = STore Character

The opcode of the STC instruction is X'42'.


  1. Store a single low-order byte from a register into storage.


  1. Register containing value to be stored.
  2. Address where byte is to be stored.


  1. The low-order byte in the register is stored at the address.
  2. The condition code does not change.

Special Cases

  1. None.

Related Instructions

  1. STCY differs from sTC only in that is uses a 20-bit displacement.
  2. STH stores a halfword.
  3. ST stores a fullword.
  4. IC loads a single byte.
  5. STCM stores a set of bytes.
  6. MVI stores a single byte from the instruction stream into storage.


  1. All hardware supports the STC instruction, except the original 360 machines.


  1. None.


Notes on the example below:

  1. R14 is used as an index into the table.
  2. MVI would normally be used to initialize a single byte field, but MVI does not use an index register, and thus cannot be used here.
         YREGS                          * Define register names
* This is a routine to initialize a table
         LA    R15,0                    * Load table entry number (start=0)
         SR    R14,R14                  * R14 indexes into the table
         LA    R0,10                    * Load number of table entries
         LA    R1,C' '                  * Char flag for the table entry
INITLOOP STH   R15,TABLE#(R14)          * Store entry number
         STC   R1,FLAG(R14)             * Store char flag
         LA    R14,12(R14)              * Bump index into the table
         LA    R15,1(R15)               * Bump entry number
         BCT   R0,INITLOOP              * Loop through all 10 table entries
         DS    0F                       * Insure table has fullword alignment
TABLE    DS    0CL12                    * Indicate each entry is 12 bytes
         DC    F'0'                     *
FLAG     DC    C' '                     * Character flag
         DC    X'00'                    * Bit type flag
ENTRY#   DC    H'0'                     * Table entry number
         DC    A(0)                     *
         DC    9XL12'00'                * Rest of the table

To the Opcodes Overview.
To the English Homepage for Hlasm.com.
To the General Homepage for Bixoft and Hlasm.com.

This site is a member of WebRing.
You are invited to browse the list of mainframe-loving sites.
Running Tyrannosaurus Rex Dinos are not dead. They are alive and well and living in data centers all around you. They speak in tongues and work strange magics with computers. Beware the dino! And just in case you're waiting for the final demise of these dino's: remember that dinos ruled the world for 155-million years!
Dinos and other anachronisms
[ Join Now | Ring Hub | Random | << Prev | Next >> ]

Below you find the logo of our sponsor and logos of the web-standards that this page adheres to.