.TITLE DIRHLP - Directory Help File .IDENT /1.0/ .ENABL LC ;+ ; ; Free software BY ; Project Software & Development, Inc. ; ; This software is furnished for free and may be used and copied as ; desired. This software or any other copies thereof may be provided or ; otherwise made available to any other person. No title to and ; ownership of the software is hereby transferred or allowed. ; ; The information in this software is subject to change without notice ; and should not be construed as a commitment by PROJECT SOFTWARE ; AND DEVELOPMENT, INC. ; ; PROJECT SOFTWARE assumes no responsibility for the use or reliability ; of this software on any equipment whatsoever. ; ; Project Software & Development, Inc. ; 14 Story St. ; Cambridge, Ma. 02138 ; 617-661-1444 ; ; ; Title: DIRHLP.MAC ; Author: Robin Miller ; Date: February 19, 1985 ; ; Description: ; ; Help file for the DIRectory program. ; ; Modification History: ; ;- .ENABL AMA .NLIST BEX .MCALL DIR$, SPWN$S, STSE$S ; Local storage: MCRNAM: .RAD50 %MCR...% ; Spawn command to MCR... SPNEST::.BLKW 8. ; Spawn exit status block . SPNBUF: .ASCIZ %HELP DIRECTORY% ; MCR command to spawn. .EVEN .SBTTL HELP - Display Help from Help library. ;+ ; ; HELP - Display help from the system help library. ; ; This routine is called to set up the buffer to be sent to the SPAWN ; routine to spawn to MCR to get help. ; ; Inputs: ; None. ; ; Outputs: ; None ; ; All registers are preserved. ; ;- HELP:: JSR R2,$SAVVR ; Save R0 - R2. MOV #SPNBUF,R0 ; Address of string to spawn. CALL GETLEN ; Get the length into R1. BR SPAWN ; Spawn command and return. .SBTTL SPAWN - Spawn an MCR command line. ;+ ; ; SPAWN - Spawn a MCR command line and wait until it's done. ; ; This subroutine spawns a command to the MCR dispatcher. ; ; Inputs: ; R0 = Command line to spawn ( appended automatically). ; R1 = The command line byte count. ; ; Outputs: ; C bit clear/set = Success/failure. ; ; All registers are preserved. ; ;- SPAWN:: JSR R2,$SAVVR ; Save R0 - R2. DIR$ #DETACH ; Detach the terminal. MOV R0,R2 ; Copy the buffer address. ADD R1,R2 ; Point to the last byte. MOVB #ESC,(R2)+ ; Append an escape as terminator. ; to prevent an MCR prompt. INC R1 ; Adjust the byte count. SPWN$S #MCRNAM,,,,,#SPNEFN,,#SPNEST,R0,R1 ; Spawn command to MCR. CALL CHKDIR ; Check the directive status. BCS 10$ ; If CS, the directive failed. STSE$S #SPNEFN ; Stop for spawned command. 10$: DIR$ #ATTACH ; Reattach the terminal. RETURN .END