MODULE BINGEN ( MAIN = binary_gen ) = BEGIN LIBRARY 'SYS$LIBRARY:XPORT' ; OWN terminal : $XPO_IOB(), file : $XPO_IOB(); ROUTINE binary_gen : NOVALUE = BEGIN LOCAL file_size; $XPO_OPEN( IOB = terminal, FILE_SPEC = $XPO_INPUT ); $XPO_GET( IOB = terminal, PROMPT = 'Enter name of output file: ' ); $XPO_OPEN( IOB = file, FILE_SPEC = terminal[IOB$T_STRING], DEFAULT = 'BINARY.DAT', OPTIONS = (BINARY,OUTPUT) ); $XPO_GET( IOB = terminal, PROMPT = 'Enter file size in fullwords: ' ); $STR_BINARY( STRING = terminal[IOB$T_STRING], RESULT = file_size ); INCR index FROM 1 TO .file_size DO $XPO_PUT( IOB = file, BINARY_DATA = ( 1, index ) ); $XPO_PUT( IOB = terminal, STRING = $STR_CONCAT( $STR_ASCII(.file_size), ' fullwords generated in ', file[IOB$T_RESULTANT] ) ); $XPO_CLOSE( IOB = file ); $XPO_CLOSE( IOB = terminal ); RETURN END; END ELUDOM