.TITLE SORTIT .IDENT "V1.0" .ENABL LC .NLIST ME,BEX,CND .sbttl Author's credits ; Author: Henry R. Tumblin ; Date: 07-Feb-79 ; Version: 1.0 ; For: Research and training office ; Module Name: SORTIT ; Residence: DB1:[107,6]SORTIT.MAC ; Machine/System: PDP-11/70 IAS V2.0 ; Type/Language; Subroutine/Assembler ; Abstract: This subroutine will subtask to SORT-11 ; with the following command line. ; ; DB1:[107,6]MAIL.TMP=DB1:[107,6]MAIL.TMP/FO:VAR:20/KE:CN1.5 ; Edits: ; Date By Reason ; --------- ----- -------------------------------------------------- ; 11-Feb-79 HRT Fixed bug in output file protection. ; 11-Feb-79 HRT Enabled the use of the ESB. .sbttl Mcalls and TDB's .MCALL TCSMC$,PUSH,POP TCSMC$ ; Mcall all TCS macros SORTDB: TDBDF$ ; Allocate a timesharing desc. block TDCM$A SRT,SRTSZ,TS.DOT ; TCS Command description ... ; ... Command buffer is SRT ; ... Command buffer length is SRTSZ ; ... Type of command is ...SRT TDTA$A ,,<107,6> ; TCS task attributes ... ; ... Task is to run at level 1 ; ... Task is to be suspended when ; CTRL-C occurs. ; ... Task UIC is [107,6] ESB: ESBDF$ ; Reserve space for an ESB .SBTTL Command line SRT: .ASCII "SRT " ; Command name .ASCII "DB1:[107,6]MAIL.TMP" ; output filespecs .ASCII "=" ; .ASCII "DB1:[107,6]MAIL.TMP" ; Input file specs .ASCII "/FO:VAR:20" ; Switches .ASCII "/KE:CN1.5" ; ... SRTSZ=.-SRT ; Sort command line size .IF EQ SRTSZ-79. .ERROR ; Command line too long ; .ENDC .IF GT SRTSZ-79. .ERROR ; Command line too long ; .ENDC .EVEN .sbttl Mainline code ; This subroutine destroys no registers. ; ; The FORTRAN call is : ; CALL SORTIT SORTIT:: CALL $SAVAL ; Save our registers TINIT$ ; Initialize TCS TDBD$T #SORTDB,#ESB ; Declare the TDB RUN$T #SORTDB,,,,,WAIT ; Subtask to SORT-11 TDBR$T #SORTDB ; Release the TDB RETURN ; Return to the calling proc. .END