.TITLE CVTLIS .IDENT /01-001/ ;+ ; Copyright © 1992 by Hunter Goatley. This code may be freely distributed ; and modified for non-commercial purposes as long as this copyright notice ; is retained. ;- ;++ ; ; Facility: CVTLIS ; ; Author: Hunter Goatley ; Western Kentucky University ; Academic Computing, STH 226 ; Bowling Green, KY 42101 ; E-mail: goathunter@WKUVX1.BITNET ; Voice: 502-745-5251 ; ; Date: June 13, 1990 ; ; Functional Description: ; ; This program converts DEC's .LIS files from the Source Listings ; on CD back to the appropriate .MAR, .B32, and .C files. ; ; Highly dependent on the .LIS format produced for the source listings ; CD. ; ; Future development: ; ; Add capability to produce .MAR file for .B32 .LIS ; Check for .END for MACRO files ; ; Modified by: ; ; 01-001 Hunter Goatley 5-JUL-1990 11:36 ; Added support for VAX C listings. Modified MACRO to handle ; multiple .SBTTL records without putting a before each ; one. Also modified MACRO to comment out macro expansions ; in the code (previously, there was no distinction; now the ; expansions are still in-line, but commented out). ; ; 01-000 Hunter Goatley 13-JUN-1990 11:31 ; Original version. ; ;-- .LINK /FPARSE.OBJ/ .DSABL GLOBAL ; Declare external references .ENABL SUPPRESSION ; Don't list unreference symbols .NOSHOW BINARY ; Include binary in listings ; ; External routines: ; .EXTRN LIB$GET_FOREIGN ; Get foreign DCL command line .EXTRN LIB$PUT_OUTPUT ; Write to SYS$OUTPUT .EXTRN FPARSE ; File parse $DSCDEF ; Descriptor symbols $FABDEF ; File Access Block symbols $NAMDEF ; Name Block symbols $RABDEF ; Record Access Block symbols $RMSDEF ; RMS status symbols $SSDEF ; System service status symbols .SHOW BINARY ; Include binary in listings .MACRO READ RABADDR,ERR,EOF=0,?LAB1,?LAB2 ;* Read using $GET with error $GET RAB=RABADDR ; Get the record CMPL #RMS$_EOF,R0 ; Was it end of file? BNEQ LAB2 ; Branch if not to handle error MOVL #SS$_NORMAL,R0 ; Convert it to "OK" .IF EQ EOF ;* EOF hander not given... LAB1: BRW ERR ; Branch to return OK LAB2: BLBC R0,LAB1 ; Branch if error occurred .IFF ;* EOF handler given BRW EOF ; Branch to EOF handler LAB2: BLBS R0,LAB1 ; Check for success BRW ERR ; Branch to error handler if not LAB1: .ENDC ;* End of EOF check .ENDM READ ;* End of READ macro .MACRO PUT_FF RABREG ;* Write out a MOVW #0,RAB$W_RSZ(RABREG) ; Write null record first $PUT RAB=(RABREG) ; Write it out to disk MOVW #FF_LEN,RAB$W_RSZ(RABREG) ; Store length in RAB MOVAB FF_RECORD,RAB$L_RBF(RABREG) ; Store address in RAB $PUT RAB=(RABREG) ; Write it out to disk .ENDM PUT_FF ;* End of PUT_FF macro .MACRO ON_ERR DEST,?LAB BLBS R0,LAB BRW DEST LAB: .ENDM ON_ERR TAB = 9 FF = 12 .PSECT CVTLIS_DATA_RD,NOEXE,NOWRT,LONG,SHR CONTENTS: .ASCII /Table of contents/ CONT_LEN = .-CONTENTS .ALIGN LONG SYMBOLS: .ASCII /Symbol table/ SYMBOL_LEN = .-SYMBOLS .ALIGN LONG SBTTL: .ASCII /.SBTTL/ SBTTL_LEN = .-SBTTL .ALIGN LONG FF_RECORD: .ASCII FF_LEN = .-FF_RECORD .ALIGN LONG RTNSIZ: .ASCII /; Routine Size: / RTNSIZ_LEN = .-RTNSIZ .ALIGN LONG ROUTINE: .ASCII /ROUTINE / ROUTINE_LEN = .-ROUTINE .ALIGN LONG EXTERNAL: .ASCII /EXTERNAL ROUTINE / EXTERNAL_LEN = .-EXTERNAL .ALIGN LONG GLOBAL: .ASCII /GLOBAL ROUTINE / GLOBAL_LEN = .-GLOBAL .ALIGN LONG FORWARD: .ASCII /FORWARD ROUTINE / FORWARD_LEN = .-FORWARD .ALIGN LONG ELUDOM: .ASCII /ELUDOM/ ELUDOM_LEN = .-ELUDOM END_VAX_C: .ASCII /Command Line/ END_VAX_C_LEN = .-END_VAX_C .ALIGN LONG MACRO_D: .ASCID /MACRO/ .ALIGN LONG BLISS_D: .ASCID /BLISS/ .ALIGN LONG CC_D: .ASCID /VAX C/ .ALIGN LONG MAR: .ASCID /SYS$DISK:[].MAR/ .ALIGN LONG B32: .ASCID /SYS$DISK:[].B32/ .ALIGN LONG C: .ASCID /SYS$DISK:[].C/ .ALIGN LONG CREATING: .ASCID /Creating !AS file !AS..../ .ALIGN LONG CONVERTED: .ASCID /File !AS converted to file !AS/ .ALIGN LONG PARSE_FILENAME: .LONG 5 ; FPARSE argument list .ADDRESS FILENAME ; ... The file name .ADDRESS INPUT_BUFFER ; ... .LONG 0 ; ... .LONG 0 ; ... .ADDRESS 10$ ; ... The options 10$: .LONG ^B00000100 ; ... Return file name only .PSECT CVTLIS_DATA_RW,NOEXE,WRT,LONG,NOSHR INREC_LEN = 1024 LIS_FAB: $FAB DNM=,- ; Default filename NAM=LIS_NAM,- ; NAM block FAC=,- ; Want to read it SHR= ; Let others read, too LIS_RAB: $RAB FAB=LIS_FAB,- ; FAB is LIS_FAB RAC=SEQ,- ; Sequential file UBF=INREC,- ; Input buffer USZ=INREC_LEN ; Input buffer length OUT_FAB: $FAB DNM=,- ; Default filename FAC=,- ; Want to write to it NAM=OUT_NAM,- ; NAM block FOP=MXV ; Maximize version # OUT_RAB: $RAB FAB=OUT_FAB,- ; FAB is OUT_FAB RAC=SEQ ; Sequential file LIS_NAM: $NAM RSA=LIS_FILENAME, - ; Buffer for resultant filename RSS=NAM$C_MAXRSS ; Resultant string area size OUT_NAM: $NAM RSA=OUT_FILENAME, - ; Buffer for resultant filename RSS=NAM$C_MAXRSS ; Resultant string area size LIS_FILENAME: .BLKB NAM$C_MAXRSS ; Buffer for resultant filename OUT_FILENAME: .BLKB NAM$C_MAXRSS ; Buffer for resultant filename LIS_FILENAME_D: .LONG 0 ; Descriptor for .LIS filename .ADDRESS LIS_FILENAME ; ... OUT_FILENAME_D: .LONG 0 ; Descriptor for output filename .ADDRESS OUT_FILENAME ; ... INREC: .BLKB INREC_LEN ; Input buffer FAO_ARGS: $FAO CTRSTR = CREATING,- ; $FAO arglst for info message OUTBUF = MESSAGE,- ; ... OUTLEN = MESSAGE,- ; ... P1 = 0,- ; No P1... P2 = 0 ; No P2 yet MESSAGE_LEN = 256 MESSAGE: .WORD MESSAGE_LEN ; Descriptor for output buffer .BYTE DSC$K_DTYPE_T ; ... to be used for messages .BYTE DSC$K_CLASS_S ; ... printed to the terminal .ADDRESS .+4 ; ... .BLKB MESSAGE_LEN ; Message output buffer GET_FILE: .LONG 3 ; LIB$GET_FOREIGN arglst .ADDRESS INPUT_BUFFER ; ... Buffer for input .ADDRESS 10$ ; ... The prompt .ADDRESS INPUT_BUFFER ; ... Write length read here 10$: .ASCID /_File: / ; ... The prompt INPUT_BUFFER: .WORD MESSAGE_LEN ; Descriptor for output buffer .BYTE DSC$K_DTYPE_T ; ... to be used for messages .BYTE DSC$K_CLASS_S ; ... printed to the terminal .ADDRESS .+4 ; ... .BLKB MESSAGE_LEN ; Input buffer FILENAME: .WORD 0 ; Descriptor for filename .BYTE DSC$K_DTYPE_T ; ... .BYTE DSC$K_CLASS_D ; ... Dynamic string .LONG 0 ; ... .PSECT CVTLIS_CODE,EXE,NOWRT,LONG,SHR .ENTRY CVTLIS,^M CALLG GET_FILE,G^LIB$GET_FOREIGN ; Ask user for file to convert BLBS R0,20$ ; Branch if successful CMPL #RMS$_EOF,R0 ; Did user enter ^Z? BNEQ 10$ MOVL #SS$_NORMAL,R0 ; Make it OK and return 10$: RET ; Return to caller 20$: TSTW INPUT_BUFFER ; Did user enter anything? BEQL 10$ ; Just exit if not given MOVAL OUT_RAB,R11 ; Get OUT RAB address MOVAL LIS_RAB,R10 ; Get LIS RAB address MOVAL INREC,R9 ; Get address of input buffer MOVAL OUT_FAB,R3 ; Get OUT FAB address MOVAL LIS_FAB,R2 ; Get LIS FAB address MOVB INPUT_BUFFER,FAB$B_FNS(R2) ; Set the .LIS filename MOVL INPUT_BUFFER+4,FAB$L_FNA(R2) ; ... $OPEN FAB=LIS_FAB ; Open the .LIS file ON_ERR 90$ ; Branch on error $CONNECT RAB=(R10) ; Connect the RAB ON_ERR 80$ ; Branch on error MOVZBW LIS_NAM+NAM$B_RSL,LIS_FILENAME_D ; Store length of result filnam MOVW FAB$W_MRS(R2),FAB$W_MRS(R3) ; Copy the file ORGanization MOVB FAB$B_ORG(R2),FAB$B_ORG(R3) ; Copy the file ORGanization MOVB FAB$B_RAT(R2),FAB$B_RAT(R3) ; Copy the Record ATtributes MOVB FAB$B_RFM(R2),FAB$B_RFM(R3) ; Copy the Record ForMat CALLG PARSE_FILENAME,FPARSE ; Parse out the file name ON_ERR 80$ ; Branch on error MOVB FILENAME,FAB$B_FNS(R3) ; Set the file name MOVL FILENAME+4,FAB$L_FNA(R3) ; ... in the FAB ; READ RABADDR=(R10),ERR=70$ ; Read a record ; ; Determine if the .LIS is from MACRO or BLISS. This is done by checking ; the first line in the file: if only one character, a , .LIS file was ; produced by BLISS; otherwise, .LIS file was produced by MACRO. ; ; Pretty simple, but it works for DEC's listings on CD. ; CLRL R0 ; Assume file is MACRO listing CMPW #1,RAB$W_RSZ(R10) ; Was there only one character? BGTR 60$ ; Branch if not even 1 character BNEQ 30$ ; Branch if not BLISS MOVL #1,R0 ; Make it BLISS 30$: CMPB #FF,INREC ; See if it's a BNEQ 60$ ; Unrecognized file, if not BLBS R0,40$ ; Branch if BLISS BSBW MACRO ; Go do a MACRO file BRB 50$ ; Branch around BLISS call 40$: READ RABADDR=(R10),ERR=70$ ; Read a record CMPL #^A/VAX /,INREC+88 ; See if we find "VAX C" BNEQ 45$ ; Branch if not VAX C CMPB #^A/C/,INREC+92 ; ... BNEQ 45$ ; ... BSBW VAX_C ; Go do a VAX C file BRB 70$ ; Branch to return 45$: BSBW BLISS ; Go do a BLISS file 50$: BRB 70$ ; Branch to return 60$: CLRL R0 70$: PUSHL R0 ; Save status $CLOSE FAB=OUT_FAB ; Close .MAR file POPL R0 ; Restore status 80$: PUSHL R0 ; Save status $CLOSE FAB=LIS_FAB ; Close .MAR file POPL R0 ; Restore status BLBC R0,90$ ; Branch on error MOVAL CONVERTED,FAO_ARGS+FAO$_CTRSTR ; Set control string address MOVAL LIS_FILENAME_D,FAO_ARGS+FAO$_P1 ; Set P1 MOVAL OUT_FILENAME_D,FAO_ARGS+FAO$_P2 ; Set P2 MOVW #MESSAGE_LEN,MESSAGE ; Reset length of output buffer $FAO_G FAO_ARGS ; Format the output string BLBC R0,90$ ; Branch on error PUSHAQ MESSAGE ; Write it to SYS$OUTPUT CALLS #1,G^LIB$PUT_OUTPUT ; ... 90$: RET ; Return to caller .PAGE .SBTTL BLISS ;+ ; ; Routine: BLISS ; ; Functional Description: ; ; ; ; Environment: ; ; ; ; Inputs: ; ; None. ; ; Implicit inputs: ; ; None. ; ; Outputs: ; ; None. ; ; Returns: ; ; R0 - Status ; ; Side effects: ; ; ;- BLISS: MOVAL BLISS_D,R1 ; R1 -> ASCII string "BLISS" MOVAL B32,R2 ; R2 -> .B32 default file spec BSBW CREATE_FILE ; Go create the file ON_ERR 90$ ; Branch on error MOVL #3,R7 ; Skip next four records, too 10$: READ RABADDR=(R10),ERR=90$ ; Read a record SOBGTR R7,10$ ; Loop if need to read more TSTW RAB$W_RSZ(R10) ; Was anything returned? BEQL 100$ ; Branch to write nothing out 20$: CMPB #FF,(R9) ; Is 1st char. a ? BNEQ 30$ ; Branch if not MOVL #4,R7 ; Skip next four records, too MOVL #1,R5 ; Indicate possible routine decl. BRB 10$ ; Loop to read next four 30$: CMPB #^A/;/,(R9) ; Is 1st char. a ";"? BNEQ 10$ ; Branch if not 40$: MOVL #1,R7 ; Not skipping any records MOVZWL RAB$W_RSZ(R10),R6 ; Copy the record size SUBL2 #12,R6 ; Subtract 16 from it BGEQ 60$ ; Branch if something to write 50$: CLRL R6 ; Make length 0 if it went negative 60$: BBCC #0,R5,70$ ; Branch unless possible routine BSBW 120$ ; Go check for routine declaration 70$: MOVW R6,RAB$W_RSZ(R11) ; Copy the record size MOVAL 12(R9),RAB$L_RBF(R11) ; And the buffer address $PUT RAB=(R11) ; Write the record out ; ; See if we've encounted end-of-module ("ELUDOM"). Another way is to ; read until we encounter ";PSECT SUMMARY". ; CMPL #ELUDOM_LEN,R6 ; Record big enough for it? BGTR 80$ ; Branch if not CMPC3 #ELUDOM_LEN,ELUDOM,12(R9) ; Is it "ELUDOM"? BNEQ 80$ ; Branch if not MOVL #SS$_NORMAL,R0 ; Set success status BRB 90$ ; Branch to return 80$: BRW 10$ ; Loop to read next record 90$: RSB ; Return to caller ; ; We've encounted the null lines that precede the MACRO instructions in ; the listing. Read and ignore all lines until we encounter a line that ; looks like the following line: ; ; "; Routine Size: 512 bytes, Routine Base: $CODE$ + 0000" ; ; At this point, there should be two null records and then a header ; record introducing the next routine. Read all records until the ; line and then rejoin the common processing code above. ; 100$: READ RABADDR=(R10),ERR=90$ ; Read a record CMPW #RTNSIZ_LEN,RAB$W_RSZ(R10) ; Big enough to be RTNSIZ? BGTR 100$ ; Just go on to next record CMPB #^A/;/,(R9) ; Is first char a ";"? BNEQ 100$ ; No - haven't found RTNSIZ ; CMPC3 #RTNSIZ_LEN,RTNSIZ,(R9) ; Make sure it is RTNSIZ ; BNEQ 100$ ; Loop until it is found 110$: READ RABADDR=(R10),ERR=90$ ; Read a record TSTW RAB$W_RSZ(R10) ; Is there a length? BEQL 110$ ; Yes - go process it normally BRW 20$ ; Rejoin common code ; ; R6 = length of record ; 120$: CMPW #ROUTINE_LEN,R6 ; Big enough for ROUTINE? BGTR 130$ ; Branch if not CMPC3 #ROUTINE_LEN,ROUTINE,12(R9) ; Is it "ROUTINE"? BEQL 160$ ; Branch if so 130$: CMPW #EXTERNAL_LEN,R6 ; Big enough for EXTERNAL? BGTR 140$ ; Branch if not CMPC3 #EXTERNAL_LEN,EXTERNAL,12(R9) ; Is it "EXTERNAL"? BEQL 160$ ; Branch if so 140$: CMPW #GLOBAL_LEN,R6 ; Big enough for GLOBAL? BGTR 150$ ; Branch if not CMPC3 #GLOBAL_LEN,GLOBAL,12(R9) ; Is it "GLOBAL"? BEQL 160$ ; Branch if so 150$: CMPW #FORWARD_LEN,R6 ; Big enough for FORWARD? BGTR 170$ ; Branch if not CMPC3 #FORWARD_LEN,FORWARD,12(R9) ; Is it "FORWARD"? BNEQ 170$ ; Branch if so ; ; Write out a record before new routine ; 160$: PUT_FF RABREG=R11 ; Write out a 170$: RSB ; Return to caller .PAGE .SBTTL MACRO ;+ ; ; Routine: MACRO ; ; Functional Description: ; ; This internal subroutine handles the parsing of a .LIS file created ; by MACRO. It skips the table of contents (labeled by "Table of ; contents" in the header record) and processes the file up to the ; symbol table listing (denoted by "Symbol table"). ; ; Form-feeds are inserted before all .SBTTL records (beginning with ; ".SBTTL"). ; ; Environment: ; ; User-mode. ; ; Inputs: ; ; R9 - Address of input buffer for records read ; R10 - Address of RAB for the .LIS file ; R11 - Address of RAB for the .MAR file ; ; Implicit inputs: ; ; None. ; ; Outputs: ; ; None. ; ; Returns: ; ; R0 - Status ; R10 - Preserved ; R11 - Preserved ; All other registers may be destroyed ; ; Side effects: ; ; ;- MACRO: MOVAL MACRO_D,R1 ; R1 -> ASCII string "MACRO" MOVAL MAR,R2 ; R2 -> .MAR default file spec BSBW CREATE_FILE ; Go create the file ON_ERR 80$ ; Branch on error CLRL R5 ; Clear multiple .SBTTL flag MOVL #3,R7 ; Skip next three records, too 10$: READ RABADDR=(R10),ERR=80$ ; Read a record CMPC3 #CONT_LEN,CONTENTS,(R9) ; Found table of contents? BNEQ 15$ ; Branch if not found BRW 90$ ; Branch out of line if found 15$: CMPC3 #SYMBOL_LEN,SYMBOLS,(R9) ; Found symbol table (EOF)? BNEQ 20$ ; Branch out of line if found MOVL #SS$_NORMAL,R0 ; Set success status BRB 80$ ; And return 20$: SOBGTR R7,10$ ; Loop if need to read more CMPB #FF,(R9) ; Is 1st char. a ? BNEQ 30$ ; Branch if not MOVL #3,R7 ; Skip next three records, too BRB 10$ ; Go skip header lines 30$: MOVL #1,R7 ; Read only one record MOVZWL RAB$W_RSZ(R10),R6 ; Copy the record size SUBL2 #48,R6 ; Subtract 48 from it BLSS 10$ ; Branch if negative - null rec ; ; Check to see if this is a .SBTTL record. If so, write out a unless ; this is the second or third in a multiple .SBTTL sequence. For example, ; DEC has started using the following sequence, which this code handles: ; ; .SBTTL + ; .SBTTL The pluses make the table of contents pretty ; .SBTTL + ; CMPL #SBTTL_LEN,R6 ; Is record even big enough? BGTR 40$ ; Branch if too small for SBTTL CMPC3 #SBTTL_LEN,SBTTL,48(R9) ; Is this a ".SBTTL" record? BNEQ 40$ ; Branch if not BBSS #0,R5,50$ ; Branch if multiple .SBTTL PUT_FF RABREG=R11 ; Write out a BRB 50$ ; Skip on to next 40$: CLRL R5 ; Clear multiple .SBTTL flag 50$: MOVW R6,RAB$W_RSZ(R11) ; Copy the record size to RAB ; ; Now handle macro expansions. These lines do not have line numbers, so ; we can check to see if there is a blank word at offset 46. If so, stick ; a comment character in position 47 and write from there. ; CMPW #^X2020,46(R9) ; Is there a line number? BEQL 70$ ; Branch out of line if not MOVAL 48(R9),RAB$L_RBF(R11) ; And the buffer address 60$: $PUT RAB=(R11) ; Write the record out BRW 10$ ; Loop to read next record 70$: MOVB #^A/;/,47(R9) ; Store a comment character MOVAL 47(R9),RAB$L_RBF(R11) ; ... and branch to write INCW RAB$W_RSZ(R11) ; Bump length to include it too BRB 60$ ; ... 80$: RSB ; Return to caller ; ; Read all table of contents records - just throw them away ; 90$: READ RABADDR=(R10),ERR=80$ ; Read a record TSTW RAB$W_RSZ(R10) ; Was anything returned? BEQL 90$ ; No - go read next CMPB #FF,(R9) ; Is it a new ? BNEQ 90$ ; Branch to start over if so BRW 10$ ; Branch back to common code .PAGE .SBTTL CREATE_FILE ;+ ; ; Routine: CREATE_FILE ; ; Functional Description: ; ; Create the appropriate output file in the default directory. ; ; Environment: ; ; Called via BSBW. ; ; Inputs: ; ; R1 -> MACRO or BLISS or CC ; R2 -> MAR or B32 or C ; R3 -> FAB ; R11 -> RAB ; ; Outputs: ; ; None. ; ; Returns: ; ; R0 - Status ; ; Side effects: ; ; ;- CREATE_FILE: MOVL R1,FAO_ARGS+FAO$_P1 ; Set type in $FAO arguments MOVL 4(R2),FAB$L_DNA(R3) ; Set default name extension MOVB (R2),FAB$B_DNS(R3) ; ... $CREATE FAB=(R3) ; Open the .MAR file BLBC R0,10$ ; Branch on error $CONNECT RAB=(R11) ; Connect the RAB BLBC R0,10$ ; Branch on error MOVZBW OUT_NAM+NAM$B_RSL,OUT_FILENAME_D ; Set length in descriptor MOVAL CREATING,FAO_ARGS+FAO$_CTRSTR ; Set control string MOVAL OUT_FILENAME_D,FAO_ARGS+FAO$_P2 ; Set second argument list MOVW #MESSAGE_LEN,MESSAGE ; Reset length of message buffer $FAO_G FAO_ARGS ; Format the output string BLBC R0,10$ ; Branch on error PUSHAQ MESSAGE ; Write it to SYS$OUTPUT CALLS #1,G^LIB$PUT_OUTPUT ; ... 10$: RSB ; Return to caller .PAGE .SBTTL VAX_C ;+ ; ; Routine: VAX_C ; ; Functional Description: ; ; ; ; Environment: ; ; ; ; Inputs: ; ; None. ; ; Implicit inputs: ; ; None. ; ; Outputs: ; ; None. ; ; Returns: ; ; R0 - Status ; ; Side effects: ; ; ;- VAX_C: MOVAL CC_D,R1 ; R1 -> ASCII string "VAX C" MOVAL C,R2 ; R2 -> .B32 default file spec BSBW CREATE_FILE ; Go create the file ON_ERR 50$ ; Branch on error MOVL #5,R7 ; Skip next three records, too 10$: READ RABADDR=(R10),ERR=50$ ; Read a record SOBGTR R7,10$ ; Loop if need to read more TSTW RAB$W_RSZ(R10) ; Was anything returned? BEQL 10$ ; Branch if nothing to write out CMPB #FF,(R9) ; Is 1st char. a ? BNEQ 20$ ; Branch if not MOVL #4,R7 ; Skip next three records, too BRB 10$ ; Loop to read next four 20$: MOVL #1,R7 ; Not skipping any records MOVZWL RAB$W_RSZ(R10),R6 ; Copy the record size SUBL2 #14,R6 ; Subtract 14 from it BLSS 10$ ; Branch if nothing to write MOVW R6,RAB$W_RSZ(R11) ; Copy the record size ; ; See if we've encounted end-of-file. If so, record will be "Command Line". ; CMPL #END_VAX_C_LEN,RAB$W_RSZ(R10) ; Record same size? BEQL 40$ ; Branch out of line if so 30$: MOVAL 14(R9),RAB$L_RBF(R11) ; And the buffer address $PUT RAB=(R11) ; Write the record out BRW 10$ ; Loop to read next record 40$: CMPC3 #END_VAX_C_LEN,END_VAX_C,(R9) ; Is it "Command Line"? BNEQ 30$ ; Branch if not MOVL #SS$_NORMAL,R0 ; Set success status 50$: RSB ; Return to caller .END CVTLIS