RM0CHKSUM       PROLOG CHECKSUM ROUTINES                         21-AUG-1978 21:17:04   VAX-11 MACRO X0.3-11               Page   0

TABLE OF CONTENTS   



   (1)      42  DECLARATIONS

   (1)      61  RM$CHKSUM  -  CALCULATE AND CHECK OR STORE CHEC

RM0CHKSUM       PROLOG CHECKSUM ROUTINES                         21-AUG-1978 21:17:04   VAX-11 MACRO X0.3-11               Page   1

002                                                                                                                              (1)



                                     0000     1 	$BEGIN	RM0CHKSUM,002,F$RMS23COM,<PROLOG CHECKSUM ROUTINES>

                                     0000     2 

                                     0000     3 

                                     0000     4 ;

                                     0000     5 ; COPYRIGHT (C) 1977

                                     0000     6 ; DIGITAL EQUIPMENT CORPORATION, MAYNARD, MASSACHUSETTS 01754

                                     0000     7 ;

                                     0000     8 ; THIS SOFTWARE IS FURNISHED  UNDER A LICENSE FOR USE ONLY ON A SINGLE

                                     0000     9 ; COMPUTER  SYSTEM AND  MAY BE  COPIED ONLY WITH  THE INCLUSION OF THE

                                     0000    10 ; ABOVE COPYRIGHT NOTICE.  THIS SOFTWARE, OR ANY OTHER COPIES THEREOF,

                                     0000    11 ; MAY NOT BE PROVIDED OR  OTHERWISE MADE AVAILABLE TO ANY OTHER PERSON

                                     0000    12 ; EXCEPT FOR USE ON SUCH SYSTEM AND TO ONE WHO AGREES TO THESE LICENSE

                                     0000    13 ; TERMS.  TITLE TO AND  OWNERSHIP OF THE  SOFTWARE  SHALL AT ALL TIMES

                                     0000    14 ; REMAIN IN DEC.

                                     0000    15 ;

                                     0000    16 ; THE INFORMATION IN THIS SOFTWARE IS SUBJECT TO CHANGE WITHOUT NOTICE

                                     0000    17 ; AND SHOULD  NOT BE CONSTRUED  AS A COMMITMENT  BY DIGITAL  EQUIPMENT

                                     0000    18 ; CORPORATION.

                                     0000    19 ;

                                     0000    20 ; DEC ASSUMES  NO  RESPONSIBILITY  FOR  THE USE OR  RELIABILITY OF ITS

                                     0000    21 ; SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPLIED BY DEC.

                                     0000    22 ;

                                     0000    23 ;++

                                     0000    24 ; FACILITY: RMS32

                                     0000    25 ;

                                     0000    26 ; ABSTRACT:

                                     0000    27 ;

                                     0000    28 ;	THIS MODULE PROVIDES TWO ROUTINES TO HANDLE THE CHECKSUM

                                     0000    29 ;	WORD FOR FILE PROLOGS.

                                     0000    30 ;

                                     0000    31 ; ENVIRONMENT:

                                     0000    32 ;		STAR PROCESSOR RUNNING STARLET EXEC.

                                     0000    33 ;

                                     0000    34 ; AUTHOR: L F LAVERDURE,	 CREATION DATE: 10-OCT-77

                                     0000    35 ;

                                     0000    36 ; MODIFIED BY:

                                     0000    37 ;

                                     0000    38 ;	L F LAVERDURE,   2-DEC-77  16:08

                                     0000    39 ; 01	- 

                                     0000    40 ;--

RM0CHKSUM       PROLOG CHECKSUM ROUTINES                         21-AUG-1978 21:17:04   VAX-11 MACRO X0.3-11               Page   2

002             DECLARATIONS                                                                                                     (1)



                                     0000    42 	.SBTTL	DECLARATIONS

                                     0000    43 ;

                                     0000    44 ; INCLUDE FILES:

                                     0000    45 ;

                                     0000    46 

                                     0000    47 ;

                                     0000    48 ; MACROS:

                                     0000    49 ;

                                     0000    50 	$RMSDEF

                                     0000    51 

                                     0000    52 ;

                                     0000    53 ; EQUATED SYMBOLS:

                                     0000    54 ;

                                     0000    55 

                                     0000    56 ;

                                     0000    57 ; OWN STORAGE:

                                     0000    58 ;

                                     0000    59 

RM0CHKSUM       PROLOG CHECKSUM ROUTINES                         21-AUG-1978 21:17:04   VAX-11 MACRO X0.3-11               Page   3

002             RM$CHKSUM  -  CALCULATE AND CHECK OR STORE CHEC                                                                  (1)



                                     0000    61 	.SBTTL RM$CHKSUM  -  CALCULATE AND CHECK OR STORE CHECKSUM ROUTINES

                                     0000    62 ;++

                                     0000    63 ; FUNCTIONAL DESCRIPTION:

                                     0000    64 ;

                                     0000    65 ;  ENTRY AT RM$CHKSUM - CALCULATE CHECKSUM AND COMPARE WITH STORED

                                     0000    66 ;                       CHECKSUM.

                                     0000    67 ;  ENTRY AT RM$MAKSUM - CALCULATE CHECKSUM AND STORE.

                                     0000    68 ;

                                     0000    69 ; CALLING SEQUENCE:

                                     0000    70 ;

                                     0000    71 ;	BSBW	RM$CHKSUM

                                     0000    72 ;   OR	BSBW	RM$MAKSUM

                                     0000    73 ;

                                     0000    74 ; INPUT PARAMETERS:

                                     0000    75 ;

                                     0000    76 ;	R5  =  BUFFER ADDR

                                     0000    77 ;

                                     0000    78 ; IMPLICIT INPUTS:

                                     0000    79 ;

                                     0000    80 ;	NONE

                                     0000    81 ;

                                     0000    82 ; OUTPUT PARAMETERS:

                                     0000    83 ;

                                     0000    84 ;	R0	STATUS CODE

                                     0000    85 ;	R1,R2	DESTROYED

                                     0000    86 ;

                                     0000    87 ; IMPLICIT OUTPUTS:

                                     0000    88 ;

                                     0000    89 ;	NONE

                                     0000    90 ;

                                     0000    91 ; COMPLETION CODES:

                                     0000    92 ;

                                     0000    93 ;	SUCCESS=-1, FAILURE=RM$_PLG

                                     0000    94 ;

                                     0000    95 ; SIDE EFFECTS:

                                     0000    96 ;

                                     0000    97 ;	NONE

                                     0000    98 ;

                                     0000    99 ;--

RM0CHKSUM       PROLOG CHECKSUM ROUTINES                         21-AUG-1978 21:17:04   VAX-11 MACRO X0.3-11               Page   4

002             RM$CHKSUM  -  CALCULATE AND CHECK OR STORE CHEC                                                                  (1)



                                     0000   101 ;++

                                     0000   102 ; ENTRY POINT TO CHECK THE CHECKSUM

                                     0000   103 ;--

                                     0000   104 RM$CHKSUM::

                          0C     10  0000   105 	BSBB	CALSUM				; CALCULATE CHECKSUM

            52            61     B1  0002   106 	CMPW	(R1),R2				; IS STORED CHECKSUM SAME

                                     0005   107 						; AS CALCULATED VALUE?

                          17     12  0005   108 	BNEQ	ERRPLG				; BRANCH IF NOT

                                 05  0007   109 	RSB					; RETURN

                                     0008   110 ;++

                                     0008   111 ; ENTRY POINT TO STORE THE CHECKSUM

                                     0008   112 ;--

                                     0008   113 RM$MAKSUM::

                          04     10  0008   114 	BSBB	CALSUM				; CALCULATE SUM

            61            52     B0  000A   115 	MOVW	R2,(R1)				; STORE IT

                                 05  000D   116 	RSB					; AND RETURN

                                     000E   117 ;

                                     000E   118 ;++

                                     000E   119 ; CALCULATE CHECK SUM ROUTINE

                                     000E   120 ;

                                     000E   121 ;	INPUT:	R5 = BUFFER ADDR

                                     000E   122 ;

                                     000E   123 ;	OUTPUT:	R0 = -1

                                     000E   124 ;		R1 = ADDR OF CHECKSUM WORD IN BUFFER

                                     000E   125 ;		R2 = CALCULATE CHECKSUM VALUE

                                     000E   126 ;--

                                     000E   127 CALSUM:

                          52     D4  000E   128 	CLRL	R2				; INIT CHECKSUM

            51            55     D0  0010   129 	MOVL	R5,R1				; COPY BUFFER ADDR

            50         FE 8F     9A  0013   130 	MOVZBL	#254.,R0			; # WORDS TO SUM -1

            52            81     A0  0017   131 10$:	ADDW2	(R1)+,R2			; SUM IT UP

            FA            50     F4  001A   132 	SOBGEQ	R0,10$				; LOOP 255 TIMES

                                 05  001D   133 	RSB

                                     001E   134 ;++

                                     001E   135 ; HANDLE ERROR

                                     001E   136 ;--

                                     001E   137 ERRPLG:	$PSECT_BR	L$RMS0

                                     0000   138 	RMSERR	PLG				; DECLARE ERROR

                                 05  0005   139 	RSB

                                     0006   140 	.END

RM0CHKSUM       PROLOG CHECKSUM ROUTINES                         21-AUG-1978 21:17:04   VAX-11 MACRO X0.3-11               Page   5

SYMBOL TABLE                                                                                                                     (1)



$$.PSECT_EP    = 00000001            RMS$_DME       = 000184D4            RMS$_NORMAL    = 00010001            

$$RMSTEST      = 0000001A            RMS$_DNA       = 000184DC            RMS$_NPK       = 000185FC            

$$RMS_PBUGCHK  = 00000010            RMS$_DNF       = 0001C04A            RMS$_OK_ALK    = 00018039            

$$RMS_TBUGCHK  = 00000008            RMS$_DNR       = 00018272            RMS$_OK_DEL    = 00018041            

$$RMS_UMODE    = 00000004            RMS$_DPE       = 0001C03A            RMS$_OK_DUP    = 00018011            

BIT...         = 0001C134            RMS$_DTP       = 000184E4            RMS$_OK_IDX    = 00018019            

CALSUM           0000000E R     02   RMS$_DUP       = 000184EC            RMS$_OK_LIM    = 00018051            

ERRPLG           0000001E R     02   RMS$_DVI       = 000184F4            RMS$_OK_RLK    = 00018021            

GBL...         = 00000000            RMS$_ENT       = 0001C01A            RMS$_OK_RNF    = 00018049            

L$RMS00          00000000 R     04   RMS$_ENV       = 00018724            RMS$_OK_RRV    = 00018029            

RM$CHKSUM        00000000 RG    02   RMS$_EOF       = 0001827A            RMS$_ORD       = 00018604            

RM$MAKSUM        00000008 RG    02   RMS$_ESA       = 000184FC            RMS$_ORG       = 0001860C            

RMS$V_STVSTATUS= 0000000E            RMS$_ESL       = 00018714            RMS$_PBF       = 00018614            

RMS$_ABO       = 000183EC            RMS$_ESS       = 00018504            RMS$_PENDING   = 00018009            

RMS$_ACC       = 0001C002            RMS$_EXP       = 000182C2            RMS$_PLG       = 0001861C            

RMS$_ACT       = 0001825A            RMS$_EXT       = 0001C022            RMS$_PLV       = 0001872C            

RMS$_AID       = 000183F4            RMS$_FAB       = 0001850C            RMS$_POS       = 00018624            

RMS$_ALN       = 000183FC            RMS$_FAC       = 00018514            RMS$_PRM       = 0001862C            

RMS$_ALQ       = 00018404            RMS$_FEX       = 00018282            RMS$_PRV       = 0001829A            

RMS$_ANI       = 0001840C            RMS$_FLG       = 0001851C            RMS$_QUO       = 00018634            

RMS$_AOP       = 00018414            RMS$_FLK       = 0001828A            RMS$_RAB       = 0001863C            

RMS$_ATR       = 0001C0CC            RMS$_FNA       = 00018524            RMS$_RAC       = 00018644            

RMS$_ATW       = 0001C0D4            RMS$_FND       = 0001C02A            RMS$_RAT       = 0001864C            

RMS$_BKS       = 0001841C            RMS$_FNF       = 00018292            RMS$_RBF       = 00018654            

RMS$_BKZ       = 00018424            RMS$_FNM       = 0001852C            RMS$_RER       = 0001C0F4            

RMS$_BLN       = 0001842C            RMS$_FOP       = 0001853C            RMS$_REX       = 000182A2            

RMS$_BOF       = 00018198            RMS$_FSZ       = 00018534            RMS$_RFA       = 0001865C            

RMS$_BUG       = 00018434            RMS$_FUL       = 00018544            RMS$_RFM       = 00018664            

RMS$_BUG_DAP   = 00018444            RMS$_IAL       = 0001854C            RMS$_RHB       = 0001866C            

RMS$_BUG_DDI   = 0001843C            RMS$_IAN       = 00018554            RMS$_RLF       = 00018674            

RMS$_BUG_XX2   = 0001844C            RMS$_IBF       = 00018754            RMS$_RLK       = 000182AA            

RMS$_BUG_XX3   = 00018454            RMS$_IDX       = 0001855C            RMS$_RMV       = 0001C0FC            

RMS$_BUG_XX4   = 0001845C            RMS$_IFA       = 0001C124            RMS$_RNF       = 000182B2            

RMS$_BUG_XX5   = 00018464            RMS$_IFI       = 00018564            RMS$_RNL       = 000181A0            

RMS$_BUG_XX6   = 0001846C            RMS$_IMX       = 0001856C            RMS$_ROP       = 0001867C            

RMS$_BUG_XX7   = 00018474            RMS$_IOP       = 00018574            RMS$_RPL       = 0001C104            

RMS$_BUG_XX8   = 0001847C            RMS$_IRC       = 0001857C            RMS$_RRV       = 00018684            

RMS$_BUG_XX9   = 00018484            RMS$_ISI       = 00018584            RMS$_RSA       = 000182DA            

RMS$_CAA       = 0001848C            RMS$_KBF       = 0001858C            RMS$_RSL       = 0001873C            

RMS$_CCF       = 0001C0DC            RMS$_KEY       = 00018594            RMS$_RSS       = 00018694            

RMS$_CCR       = 00018494            RMS$_KFF       = 00018031            RMS$_RST       = 0001869C            

RMS$_CDA       = 0001C0E4            RMS$_KRF       = 0001859C            RMS$_RSZ       = 000186A4            

RMS$_CHG       = 0001849C            RMS$_KSZ       = 000185A4            RMS$_RTB       = 000181A8            

RMS$_CHK       = 000184A4            RMS$_LAN       = 000185AC            RMS$_SEQ       = 000186AC            

RMS$_CHN       = 0001C0EC            RMS$_LBL       = 000185B4            RMS$_SHR       = 000186B4            

RMS$_COD       = 000184AC            RMS$_LNE       = 000185BC            RMS$_SIZ       = 000186BC            

RMS$_CONTROLC  = 00010651            RMS$_LOC       = 000185C4            RMS$_SPL       = 0001C042            

RMS$_CONTROLO  = 00010609            RMS$_MBC       = 00018734            RMS$_SQO       = 000186C4            

RMS$_CONTROLY  = 00010611            RMS$_MKD       = 0001C032            RMS$_STALL     = 00018001            

RMS$_CRE       = 0001C00A            RMS$_MRN       = 000185CC            RMS$_STK       = 000186CC            

RMS$_CREATED   = 00010619            RMS$_MRS       = 000185D4            RMS$_SUC       = 00010001            

RMS$_CUR       = 000184B4            RMS$_NAM       = 000185DC            RMS$_SUP       = 000182D2            

RMS$_DAC       = 0001C012            RMS$_NEF       = 000185E4            RMS$_SUPERSEDE = 00010631            

RMS$_DAN       = 000184BC            RMS$_NET       = 0001874C            RMS$_SYN       = 000186D4            

RMS$_DEL       = 00018262            RMS$_NID       = 000185EC            RMS$_SYS       = 0001C10C            

RMS$_DEV       = 000184C4            RMS$_NMF       = 000182CA            RMS$_TEMP1     = 0001826A            

RMS$_DIR       = 000184CC            RMS$_NOD       = 000185F4            RMS$_TEMP2     = 0001868C            

RM0CHKSUM       PROLOG CHECKSUM ROUTINES                         21-AUG-1978 21:17:04   VAX-11 MACRO X0.3-11               Page   6

SYMBOL TABLE                                                                                                                     (1)



RMS$_TMO       = 000181B0            

RMS$_TRE       = 000186DC            

RMS$_TYP       = 000186E4            

RMS$_UBF       = 000186EC            

RMS$_USZ       = 000186F4            

RMS$_VER       = 000186FC            

RMS$_VOL       = 00018704            

RMS$_WBE       = 0001C12C            

RMS$_WER       = 0001C114            

RMS$_WLD       = 00018744            

RMS$_WLK       = 000182BA            

RMS$_WPL       = 0001C11C            

RMS$_WSF       = 0001871C            

RMS$_XAB       = 0001870C            





PROGRAM SECTION SYNOPSIS



.  ABS  .        00000000      00     NOPIC   USR   CON   ABS   LCL NOSHR NOEXE NORD  NOWRT BYTE  

. BLANK .        00000000      01     NOPIC   USR   CON   REL   LCL NOSHR   EXE   RD    WRT BYTE  

F$RMS23COM       00000021      02     NOPIC   USR   CON   REL   GBL NOSHR   EXE   RD  NOWRT BYTE  

$ABS$            00000000      03     NOPIC   USR   CON   ABS   LCL NOSHR   EXE   RD    WRT BYTE  

L$RMS0           00000006      04     NOPIC   USR   CON   REL   GBL NOSHR   EXE   RD  NOWRT BYTE  





THERE WERE NO ERRORS OR WARNINGS.

19518. BYTES LEFT IN FREE MEMORY POOL.

3076. BYTES OF RECLAIMED MEMORY.

OBJ$:RM0CHKSUM,LIS$:RM0CHKSUM/-SP=EXECML$/ML,LIB$:R/ML,SRC$:RM0CHKSUM

19 MLB DIR RDS - 388 GETS TO DEFINE 14 MACROS. 22 INTER. FILE WRITES. 

