/OCOMP--OCTAL COMPARE AND DUMP /BY: / DENNIS MCGHIE / DIVISION OF CARDIOVASCULAR SURGERY / STANFORD MEDICAL CENTER / STANFORD, CALIF. 94305 /MODIFIED BY: / / JIM CRAPUCHETTES / FRELAN ASSOCIATES / P.O. BOX 298 / MENLO PARK, CALIF. 94025 / OCOMP IS AN OS/8 UTILITY PROGRAM USED TO / COMPARE OR DUMP OS/8 FILES. BOTH MASKING AND / SEARCHING ARE ALLOWED. THE MASK IS ENTERED BY / THE "=" OPTION (ONLY THE LEAST SIGNIFICANT 12 / BITS ARE USED). THE SEARCH FEATURE IS SPECIFIED / BY THE "/S" OPTION. ALL OUTPUT IS IN OCTAL. / / THE THREE MODES OF OPERATION ARE: / / 1. COMPARE: TWO INPUT FILES SPECIFIED AND ARE / COMPARED WORD-FOR-WORD UNDER THE MASK IF / ANY IS SPECIFIED (IF NONE IS SPECIFIED, ALL / BITS ARE COMPARED). ANY DIFFERENCES CAUSE / THE WORD FROM FILE #1 (IN OCTAL) TO BE PUT / IN THE OUTPUT FILE. / / 2. DUMP: ONLY ONE INPUT FILE IS SPECIFIED AND / IT IS DUMPED (IN OCTAL) ON THE OUTPUT FILE. / IF A MASK IS SPECIFIED, ONLY THOSE WORDS / WITH ALL MASKED BITS IN THE 1 STATE ARE / OUTPUT. / / 3. SEARCH: ONLY ONE INPUT FILE IS SPECIFIED, / ALONG WITH "/S". ONLY THOSE WORDS EQUAL TO / THE MASK ARE DUMPED ON THE OUTPUT FILE. EJECT /OTHER PROGRAM ACTIONS: / / A. SPECIFYING NO INPUT AND/OR OUTPUT FILES / WILL CAUSE A RETURN TO THE COMMAND DECODER. / / B. "USER ERROR ..." MESSAGES WILL BE OUTPUT / UNDER THE FOLLOWING CONDITIONS: / / ERROR CONDITION / 1 MORE THAN TWO INPUT FILES. / 2 OUTPUT FILE TOO SMALL. / 3 OUTPUT HANDLER FETCH OR OUTPUT FILE / ENTER FAILED. / 4 INPUT HANDLER FETCH FAILED. / 5 INPUT FILE #1 ERROR. / 6 INPUT FILE #2 ERROR. / 7 OUTPUT FILE ERROR. / 8 OUTPUT FILE CLOSE FAILED. / / C. "FILE 2 IS LONGER THAN FILE 1" WILL BE OUTPUT / IN THE OUTPUT FILE IF THIS IS TRUE. IF FILE / #1 IS LONGER THAN FILE #2, THE REMAINDER OF / FILE #1 WILL BE DUMPED TO THE OUTPUT FILE. / / D. "NOTHING OUTPUT" WILL BE PUT IN THE OUTPUT / FILE IF NOTHING ELSE IS OUTPUT. / / E. THE PROGRAM LEAVES THE USR IN CORE AFTER IT / IS CALLED IN. / / F. THE DEFAULT INPUT EXTENSION IS ".SV". / / G. THE PROGRAM IS NOT RESTARTABLE. /COMMAND DECODER USAGE: / / .R OCOMP / *OFILE