Trailing-Edge
-
PDP-10 Archives
-
decuslib20-06
-
decus/20-153/gtprms.mac
There is 1 other file named gtprms.mac in the archive. Click here to see a list.
TITLE GTPRMS
ENTRY GTPRMS
;
P==17 ;PUSH DOWN LIST
AC1==1 ;TEMP AC
AC2==2 ;TEMP AC
AC3==3 ;TEMP AC
;
XWD 1,TMPBLK ;CONTROL WORD FOR TMPCOR
TMPBLK: SIXBIT /NXT/ ;FILE NAME NXT
0 ;RESV FOR IOWD
0 ;ZERO FOR COMMAND LIST
;
GTPRMS: PUSH P,AC1 ;SAVE AC1
PUSH P,AC2 ;SAVE AC2
PUSH P,AC3 ;SAVE AC3
MOVE AC1,TMPBLK-1;GET TMPCOR CONTROL WORD
TMPCOR AC1, ;READ FILE TO SEE IF THERE
SKIPA ;FAIL. TRY DSK
JRST DOIT ;OK GO DOIT
OPEN SPC ;OPEN DSK IN DUMP MODE
JRST NOFILE ;NO DISK
PJOB AC1, ;GET JOB #
SETZ AC3, ;CLEAR AC
IDIVI AC1,12 ;DIVIDE BY 10
ORI AC2,20 ;CONVERT TO 6BIT
LSHC AC2,-6 ;SHIFT TO NEXT AC
TLNN AC3,77 ;3 CHARS?
JRST .-4 ;NO, LOOP
HLLM AC3,NAME ;JOB # IN L.H.
MOVEI AC1,'NXT' ;TMP NAME
HRRM AC1,NAME ;IN RH.
MOVSI AC1,'TMP' ;TEMP EXT.
MOVEM AC1,NAME+1 ;INTO NXT LOC
SETZ AC2, ;CLEAR COMMAND LIST END
LOOKUP NAME ;LOOK ON DSK
JRST NOFILE ;NO FILE ANYWHERE
DOIT: HRRZ AC1,(16) ;SET UP TO READ TMPCOR FOR USER
HRRZ AC2,1(AC1) ;GET SIZE
MOVE AC1,(AC1) ;GET POINTER
TLNE AC1,100 ;SIX OR SEVEN BIT?
SKIPA AC3,[5] ;SEVEN
MOVEI AC3,6 ;SIX
IDIVI AC2,(AC3) ;DIV SIZE IN CHAR BY CHAR/WORD
MOVNI AC2,1(AC2) ;INCREASE BY ONE
HRLI AC2,-1(AC1) ;GEN ADDRESS POINTER
MOVSM AC2,TMPBLK+1 ;PUT IN TMPCOR BLOCK
HLLZ AC2,-1(16) ;GET -ARGS,,0
AOBJN AC2,. ;GET 0,,ARGS
HRLI AC1,1 ;TMPCOR READ WITH NO DELETE
CAIE AC2,1 ;IS THAT TRUE?
HRLI AC1,2 ;NO. READ & DELETE
HRRI AC1,TMPBLK ;WITH ADDRESS
SKIPN NAME ;SKIP IF LOOKED ON DISK
JRST TMPIT ;GO TO TMPCOR
INPUT TMPBLK+1 ;DUMP INTO USER CORE
CAIE AC2,1 ;JUST 1 ARG?
RENAME SPC+2 ;NO. 2 ARGS - DELETE FILE
CLOSE ; CLOSE
RELEAS ;& RELEASE
JRST NOFILE ;FINISH
TMPIT: TMPCOR AC1, ;READ FILE TO USER
HALT . ;HALT IF ERROR
NOFILE:
POP P,AC3 ;RESTORE AC3
POP P,AC2 ;AC2
POP P,AC1 ;AC1
POPJ P, ;RETURN TO CALLER
SPC: 17 ;DUMP MODE
SIXBIT /DSK/ ;DEVICE DSK
0 ;NO BUFFERS
NAME: 0 ;AREA FOR DSK PARAMETERS
0
0
0
END