Trailing-Edge
-
PDP-10 Archives
-
decuslib10-01
-
43,50212/idelet.mac
There are no other files named idelet.mac in the archive.
TITLE IDELET
ENTRY IDELET
;CALL IS IDELET('NAME','EXT') WITH NAME A MAX OF 5
;CHARACTERS
;RETURNS 1 IF FILE NOT FOUND, 3 IF NOT DELETED, 2 IF DELETED
A=1
S=2
X1=3
X2=4
C=5
D=6
CHN=12 ;I/O CHANNEL
IDELET: 0
MOVEI 0,1 ;ASSUME NOT FOUND
MOVEI D,5 ;PICK UP 5 CHARACTERS OF NAME
MOVE A,@(16) ;GET THE NAME
JSR SIXBIT ;CONVERT TO SIXBIT
MOVEM S,FILDIR ;PUT NAME IN PLACE
MOVE A,@1(16) ;GET EXTENSION
MOVEI D,3 ;PREPARE TO CONVERT 3 CHARS.
JSR SIXBIT ;CONVERT
HLLZM S,FILDIR+1 ;PUT IN PLACE
SETZM FILDIR+2
SETZM FILDIR+3
INIT CHN,17
SIXBIT /DSK/
XWD 0,0
TTCALL 3,[ASCIZ/DSK NOT AVAILABLE/]
LOOKUP CHN,FILDIR ;IS IT THERE?
JRA 16,(16)
CLOSE CHN,
CALLI D,24 ;GET PROJ,,PROG #
MOVEM D,FILDIR+3 ;SO WE CAN DELETE LONG FILES
SETZM FILDIR
RENAME CHN,FILDIR
AOJ 0,
AOJ 0,
JRA 16,(16)
SIXBIT: 0
SETZ S,
MOVE X1,[POINT 6,S]
MOVE X2,[POINT 7,A]
SIX1: ILDB C,X2
SUBI C,40 ;CONVERT TO SIXBIT
IDPB C,X1
SOJG D,SIX1
JRST @SIXBIT
FILDIR: BLOCK 4
END