.TITLE CLEAR .SBTTL FORTRAN NUMERICAL LIBRARY VERSION .IDENT /20JL84/ .NLIST SYM,TOC ; CLEAR: Set to zero the first N elements of array A:- ; SUBROUTINE DCLEAR(DA,N) REAL*8 or COMPLEX. ; SUBROUTINE CLEAR(A,N) REAL*4, LOGICAL*4, or INTEGER*4. ; SUBROUTINE ICLEAR(IA,N) INTEGER*2 or LOGICAL*2. ; SUBROUTINE BCLEAR(BA,N) LOGICAL*1 or BYTE ; The effect of clearing a LOGICAL array is to set all elements .FALSE.. ; ; SET: Set first N elements of array A to a given value:- ; SUBROUTINE BSET(BA,N,BVAL) LOGICAL*1 or BYTE ; ; This is one several of array initialisation routines using the CIS ; processor for absolute maximum speed. ; ; MODIFICATIONS RECORD: ; ===================== ; 20JL84 CIS processor version. .PSECT $CODE1,RW,I,LCL,REL,CON .ENABL LSB DCLEAR::MOV #3,%1 ; *8 for DOUBLE PRECISION BR 10$ ; Join common code CLEAR:: MOV #2,%1 ; *4 for REAL BR 10$ ICLEAR::MOV #1,%1 ; *2 forINTEGER BR 10$ BCLEAR::CLR %1 ; No scale for BYTE 10$: CLR %4 ; Fill with 0 20$: MOV @4(%5),%2 ; Get no of entries in destination ASH %1,%2 ; * size CLR %0 ; Set source length=0 to do all from %4 MOV 2(%5),%3 ; Get address MOVC ; Fill RETURN ; and exit ; BSET can be done here -- see more complicated code for ISET etc., in SET.MAC. BSET:: CLR %4 ; Get fill value BISB @6(%5),%4 ; Lo byte only CLR %1 ; Don't scale entries BR 20$ ; Join common code .DSABL LSB .END