Trailing-Edge
-
PDP-10 Archives
-
BB-Z759A-SM
-
cobol-source/spac.mac
There are 9 other files named spac.mac in the archive. Click here to see a list.
; UPD ID= 1043 on 4/29/83 at 12:07 AM by NIXON
TITLE SPAC FOR COBLIB
SUBTTL CHECK STRING FOR SPACES /ACK
SEARCH COPYRT
SALL
;THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY ONLY BE USED
; OR COPIED IN ACCORDANCE WITH THE TERMS OF SUCH LICENSE.
COPYRIGHT (C) 1974, 1983, 1984 BY DIGITAL EQUIPMENT CORPORATION
SEARCH LBLPRM ;DEFINE PARAMETERS.
%%LBLP==:%%LBLP
EXTERN EASTB. ;FORCE EASTBL TO BE LOADED.
HISEG
.COPYRIGHT ;Put standard copyright statement in REL file
;REVISION HISTROY:
;V10 *****
; 13-DEC-74 /ACK CREATION.
; 5/10/75 /DBT BIS CODE
;*****
COMMENT \
THIS ROUTINE CHECKS A STRING TO SEE IF IT CONTAINS ONLY SPACES.
CALL:
MOVEI 16,PARAMETER ADDRESS
PUSHJ 17,SPAC.6/SPAC.7/SPAC.9
PARAMETER:
BITS 0-5 BYTE POINTER RESIDUE FOR INPUT FIELD.
BIT 6 IGNORED (1 IF A SIGN IS PRESENT.)
BITS 7-17 SIZE OF THE INPUT FIELD.
BITS 18-35 ADDRESS OF THE FIRST CHARACTER OF THE INPUT FIELD.
RETURNS:
CALL+1 IF THE STRING LENGTH IS ZERO OR CONTAINS A CHARACTER
OTHER THAN A SPACE.
CALL+2 IF THE STRING CONTAINS ALL SPACES.
REGISTERS USED:
CH,SPACE,JAC, IPTR, CNT, SW
\
ENTRY SPAC.6 ;IF THE STRING IS SIXBIT.
ENTRY SPAC.7 ;IF THE STRING IS ASCII.
ENTRY SPAC.9 ;IF THE STRING IS EBCDIC.
EXTERN SIXSP. ;WHAT A SIXBIT SPACE LOOKS LIKE.
EXTERN ASCSP. ;WHAT AN ASCII SPACE LOOKS LIKE.
EXTERN EBCSP. ;WHAT AN EBCDIC SPACE LOOKS LIKE.
SPACES: EXP SIXSP.
EXP ASCSP.
BLOCK 1
EXP EBCSP.
EXTERN BSET1. ;SETS UP THE PARAMETERS.
SPAC.6: JSP BISCH, SPAC ;ENTER HERE IF THE INPUT IS SIXBIT,
SPAC.7: JSP BISCH, SPAC ; HERE IF IT IS ASCII OR
BLOCK 1
SPAC.9: JSP BISCH, SPAC ; HERE IF IT IS EBCDIC.
SPAC: SUBI BISCH, SPAC.6-5 ;FIND OUT WHAT THE INPUT LOOKS LIKE.
MOVE BIST0+E0.FLT,SPACES-6(BISCH) ;SELECT THE APPROPRATE SPACE.
;FOR FILL CHARACTER
JSP JAC, BSET1. ;GO SET UP THE PARAMETERS.
;NOTE: IF THE STRING LENGTH IS ZERO
; WE RETURN TO CALL+1, NOT HERE.
SETZB DSTPT,DSTCNT ;NO DESTINATION - COMPARE AGAINST
; THE FILL CHARACTER
MOVE BIST0+E0.INS,[CMPSN] ;COMPARE NOT EQUAL
EXTEND B.FLAG,BIST0
AOS (PP) ;EQUAL TO SPACES
POPJ PP, ;NOT SPACES
END