         SYSTEM   SIG7FDP
         SYSTEM   BPM
*
*        SETZERO  SET A DATA AREA TO ZERO
*
*                 ALLOWS THE USER TO BACKGROUND LARGE DATA AREAS TO
*                 EBCD1C ZERO ('F0')
*      USER SYNTAX:
*        ENTER   SETZERO  DATA-NAME-1, DATA-NAME-2.
*                SETZERO: THE ENTRY POINT IN THE RUN-TIME ROUTINE
*            DATA-NAME-1: THE AREA TO SET TO ZERO (DISPLAY)
*            DATA-NAME-2: THE BYTE LENGTH OF THE AREA TO BE SET TO ZEROS
*                         (COMPUTATIONAL).  MAXIMUM VALUE IS 32,767
*        SETBLANK SET A DATA AREA TO BLANKS
*                 ALLOWS THE USER TO BACKGROUND LARGE DATA AREA TO
*                 EBCDIC BLANKS ('40')
*      USER SYNTAX:
*        ENTER  SETBLANK: THE ENTRY POINT IN THE RUN-TIME ROUTINE
*            DATA-NAME-1: THE AREA TO BE SET TO BLANKS (DISPLAY)
*            DATA-NAME-2: THE BYTE LENGTH OF THE AREA TO BE SET TO BLANK
*                         (COMPUTATIONAL).  MAXIMUM VALUE IS 32,767
*        NOTE THAT SETZERO AND SETBLANK ARE TWO DIFFERENT ENTRY POINTS
*        TO THE SAME SUBROUTINE WHICH ACCOMPLISHES THE DATA MOVEMENT
*        AUTHER   YOW-YUAN ROBERT LIN            MAY, 1970
         REF      C:ABA                                                 SETZERO
         DEF      SETZERO
         DEF      SETBLANK
         OPEN     COMMON,LOOK1,LOOK2,LOOK3,NOBYTBG,LOOP,NOWORD,SAVE
         OPEN     RETURN,F0,X40
         OPEN     THROUGH
SETZERO  LCI      0
         STM,0    SAVE
         LI,5     0                 INDEX
         B        COMMON
SETBLANK LCI      0
         STM,0    SAVE
         LI,5     2                 INDEX
COMMON   STW,15   RETURN
         AWM,14   RETURN
         CI,14    2                                                     SETZERO
         BE       %+4                                                   SETZERO
         LI,2     X'9A'                                                 SETZERO
         STB,2    10                                                    SETZERO
         B        C:ABA                                                 SETZERO
         LI,2     X'7FFFF'          MASK FOR BYTE ADDR
         AND,2    *15               R2 = BYTE ADDR
         LW,1     2                 R1 = BYTE ADDR DEST
         LW,3     2
         SLS,3    -2                R3 = WORD ADDR DEST
         AI,3     1                 R3 = NEXT WORD ADDR DEST
         LW,4     3
         SLS,4    2                 R4 = BYTE ADDR OF WORD BOUNDRY
         SW,4     2                 R4 = LEFT REMAIN FIELD LENGTH
         AI,15    1                 UPDATE POINTR TO PARAM
         LI,7     X'FFFF'           MASK FOR BYTE COUNT
         AND,7    *15               R7 = BYTE LENGTH
         LW,7     *7
         SW,7     4                 SUBTRACT LEFT REMAIN FIELD LENGTH
         LI,6     0
         DW,6     L(4)              R6 = RIGHT REMAIN FIELD LENGTH
         STB,4    1                 BYTE COUNT FOR LEFT REMAIN FIELD
         B        LOOK1,5
LOOK1    MBS,0    BA(F0)            MOVE LEFT REMAIN BYTE FIELD
         B        %+2
         MBS,0    BA(X40)           MOVE LEFT REMAIN BYTE FIELD
NOBYTBG  AI,7     0
         BEZ      NOWORD            TO NO STORE WORD
         B        LOOK2,5
LOOK2    LW,8     L(X'F0F0F0F0')    SOURCE WORD FOR ZERO
         B        %+2
         LW,8     L(X'40404040')    SOURCE WORD FOR BLANK
LOOP     STW,8    *3
         AI,3     1                 UPDATE POINTR TO DEST
         BDR,7    LOOP
NOWORD   AI,6     0                 TEST RIGHT REMAIN FIELD
         BEZ      THROUGH
         LW,1     3                 WORD ADDR
         SLS,1    2                 BYTE ADDR
         STB,6    1                 BYTE COUNT TO R1
         B        LOOK3,5
LOOK3    MBS,0    BA(F0)            MOVE RIGHT REMAIN FIELD
         B        %+2
         MBS,0    BA(X40)           MOVE RIGHT REMAIN FIELD
THROUGH  LCI      0
         LM,0     SAVE
         B        *RETURN
SAVE     RES      16
RETURN   RES      1
F0       DATA,1   X'F0'
X40      DATA,1   X'40'
         CLOSE    COMMON,LOOK1,LOOK2,LOOK3,NOBYTBG,LOOP,NOWORD,SAVE
         CLOSE    RETURN,F0,X40
         CLOSE    THROUGH
         END
