Trailing-Edge
-
PDP-10 Archives
-
CFS_TSU04_19910205_1of1
-
update/cblsrc/zerc.mac
There are 7 other files named zerc.mac in the archive. Click here to see a list.
; UPD ID= 1049 on 4/29/83 at 12:58 AM by NIXON
TITLE ZERC FOR COBOTS
SUBTTL CHECK STRING FOR ZERO CHAR
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) 1976, 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 HISTORY:
;V10 *****
; 27-AUG-76 CREATION [454]
;*****
COMMENT \
THIS ROUTINE CHECKS A STRING TO SEE IF IT CONTAINS ONLY SPACES.
CALL:
MOVEI 16,PARAMETER ADDRESS
PUSHJ 17,ZERC.6/ZERC.7/ZERC.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 ZERO.
CALL+2 IF THE STRING CONTAINS ALL ZEROS.
REGISTERS USED:
CH,ZERO,JAC, IPTR, CNT, SW
\
ENTRY ZERC.6 ;IF THE STRING IS SIXBIT.
ENTRY ZERC.7 ;IF THE STRING IS ASCII.
ENTRY ZERC.9 ;IF THE STRING IS EBCDIC.
EXTERN SIXZR. ;WHAT A SIXBIT ZERO LOOKS LIKE.
EXTERN ASCZR. ;WHAT AN ASCII ZERO LOOKS LIKE.
EXTERN EBCZR. ;WHAT AN EBCDIC ZERO LOOKS LIKE.
ZEROS: EXP SIXZR.
EXP ASCZR.
BLOCK 1
EXP EBCZR.
EXTERN BSET1. ;SETS UP THE PARAMETERS.
ZERC.6: JSP BISCH, ZERC ;ENTER HERE IF THE INPUT IS SIXBIT,
ZERC.7: JSP BISCH, ZERC ; HERE IF IT IS ASCII OR
BLOCK 1
ZERC.9: JSP BISCH, ZERC ; HERE IF IT IS EBCDIC.
ZERC: SUBI BISCH, ZERC.6-5 ;FIND OUT WHAT THE INPUT LOOKS LIKE.
MOVE BIST0+E0.FLT, ZEROS-6(BISCH) ;SELECT THE APPROPRATE ZERO.
;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 0] ;COMPARE NOT EQUAL
EXTEND B.FLAG,BIST0
AOS (PP) ;EQUAL TO ZEROS
POPJ PP, ;NOT ZEROS
END