; ; Copyright (C) 1989 TGV, Incorporated ; ; This is an adjunct program to MultiNet which can be used to ; 'fix' a random file so the contents can be FTP'd without having ; RMS interpret them. The file is converted to a FIXed length 2048 byte ; record file with no record attributes. ; ; The contents of the blocks of the file are not modified, but it ; is recommended that you keep a copy of the original file as this ; transformation is *NOT* reversable. ; ; After running this program, FTP the file TYPE IMAGE. ; .title set2048 set mrs=2048 $atrdef $fabdef $iodef .library /SYS$LIBRARY:LIB/ $fatdef .default displacement,long .psect set2048,nowrt,exe,shr,pic,long .entry set2048,^m<> pushab buf pushl #buflen clrl -(sp) pushaw (sp) pushaq prompt pushaq 12(sp) calls #3,g^lib$get_foreign blbs r0,1$ cmpl r0,#rms$_eof bneq 2$ movl s^#ss$_normal,r0 2$: ret 1$: movl (sp)+,r1 movb r1,fab+fab$b_fns movab buf,fab+fab$l_fna $open fab=fab blbs r0,9$ ret 9$: clrl -(sp) pushaw attr clrq -(sp) clrq -(sp) clrq -(sp) pushaq iosb pushl #io$_access movzwl fab+fab$l_stv,-(sp) clrl -(sp) calls #12,@#sys$qiow blbc r0,10$ movzwl iosb,r0 blbc r0,10$ movw #2048,fat+fat$w_rsize movw #2048,fat+fat$w_maxrec movb #fat$c_fixed,fat+fat$b_rtype clrb fat+fat$b_rattrib clrl -(sp) pushaw attr clrq -(sp) clrq -(sp) clrq -(sp) pushaq iosb pushl #io$_deaccess movzwl fab+fab$l_stv,-(sp) clrl -(sp) calls #12,@#sys$qiow blbc r0,10$ movzwl iosb,r0 10$: ret .psect variables,wrt,noexe,noshr,long iosb:: .blkl 2 fab:: $fab fac=,- fop=,- rtv=1 attr:: .word fat$w_maxrec+2 .word atr$c_recattr .address fat .long 0 fat:: .blkb fat$w_maxrec+2 buf:: .blkb 2048 buflen = .-buf .psect data,nowrt,noexe,shr,long prompt:: .ascid /Filename: / .end set2048