Google
 

Trailing-Edge - PDP-10 Archives - decuslib10-02 - 43,50240/terbin.mac
There are no other files named terbin.mac in the archive.
	TITLE TERBIN-SAVE&RESTORE TAPES OF BINARY FILES ON TTY TERMINAL
	SUBTTL BY STUART SKALKA, SYOSSET HS.  5/26/72.
	EXTERN .JBREN
TERBIN:	RESET
	MOVEI 1,START
	MOVEM 1,.JBREN
	MOVEI 14,3
	OUTSTR[ASCIZ/TYPE "H" FOR HELP/]
START:	RELEASE 2,
	SETZ 15,
	MOVEI 1,^D9
	SOJL 1,.+3
	SETZM DEV(1)
	JRST .-2
	SETZB 2,5
	SETLCH 2
	MOVE 4,['DSKSAV']
	HLLZM 4,DEV
	HRLZM 4,EXT
	OUTSTR[ASCIZ/
*/]
	INCHWL 1
	CAIN 1,15
	JRST START
	CAIN 1,"H"
	JRST HELP
	MOVE 11,1
TO:	MOVEI 3,7
	SETZ 2,
	SOJL 3,ERR
	MOVE 10,1
	INCHWL 1
	CAIN 1,":"
	JRST DEV1
	CAIN 1,"."
	JRST EXT1
	CAIN 1,15
	JRST FIN1
	CAIL 1,"A"
	CAILE 1,"Z"
	JRST .+2
	JRST OK
	CAIL 1,"0"
	CAILE 1,"9"
	JRST ERR
OK:	LSH 2,6
	SUBI 1,40
	ADD 2,1
	JRST TO+2
DEV1:	JUMPN 5,ERR
	IMULI 3,6
	LSH 2,(3)
	MOVEM 2,DEV
	TRO 5,1
	JRST TO
EXT1:	TRNE 5,2
	JRST ERR
	IMULI 3,6
	LSH 2,(3)
	MOVEM 2,FILNAM
	TRO 5,3
	JRST TO
FIN1:	CAIN 10,":"
	JRST ERR
	CAIN 10,"."
	JRST GET
	TRNE 5,2
	JRST EXT2
	IMULI 3,6
	LSH 2,(3)
	MOVEM 2,FILNAM
	JRST GET
EXT2:	CAIG 3,1
	JRST ERR
	IMULI 3,6
	LSH 2,(3)
	MOVEM 2,EXT
GET:	CLRBFI
	SETO 0,
	SETLCH 0
	CAIE 11,"<"
	JRST OUT1
	MOVEI 12,DBUF
	HRRZM 12,BUF
	OPEN 2,OTHER
	JRST DERR
	LOOKUP  2,FILNAM
	JRST LKFAIL
	SLEEP 14,
	MOVEI 3,^D70
	SOJL 3,.+3
	IONEOU [0]
	JRST .-2
	IONEOU [15]
MORE:	SOSG DBUF+2
	IN 2,
	JRST .+2
	JRST EOF
	ILDB 1,DBUF+1
	JUMPE 1,MORE
	MOVE 12,PT
	MOVEI 3,6
BRK:	SOJL 3,MORE
	ILDB 2,12
	ADDI 2,40
	IONEOU 2
	JRST BRK
EOF:	STATO 2,1B22
	JRST INERR
	IONEOU [12]
	MOVEI 3,^D40
	SOJL 3,START
	IONEOU [0]
	JRST .-2
OUT1:	CAIE 11,">"
	JRST ERR
	MOVEI 12,DBUF
	HRLZM 12,BUF
	OPEN 2,OTHER
	JRST DERR
	ENTER 2,FILNAM
	JRST ENER
	SLEEP 14,
	IONEOU [21]
	INCHRW 1
	CAIE 1,15
	JRST .-2
GOUT:	MOVEI 3,6
	MOVE 12,PT2
	SOJL 3,OUTR
	INCHRW 1
	CAIN 1,12
	JRST ENDD
	SUBI 1,40
	IDPB 1,12
	JRST GOUT+2
OUTR:	SOSG DBUF+2
	OUT 2,
	JRST .+2
	JRST OUTERR
CON:	IDPB 2,DBUF+1
	JRST GOUT
ENDD:	OUT 2,
	JRST .+2
	JRST OUTERR
	CLOSE 2,
	IONEOU [23]
	JRST START
ERR:	OUTSTR[ASCIZ/? COMMAND ERROR?/]
	CLRBFI
	JRST START
DERR:	OUTSTR[ASCIZ/? CAN'T OPEN SPECIFIED DEVICE?/]
	JRST START
LKFAIL:	OUTSTR[ASCIZ/? CAN'T LOOKUP SPECIFIED FILE?/]
	JRST START
PT:	POINT 6,1
PT2:	POINT 6,2
ENER:	OUTSTR[ASCIZ/? CAN'T ENTER SPECIFIED FILE?/]
	JRST START
OUTERR:	OUTSTR[ASCIZ/? ERROR IN OUTPUT TO SPECIFIED FILE?/]
	CLRBFI
	JRST START
INERR:	OUTSTR [ASCIZ/
? ERROR IN INPUT FROM SPECIFIED FILE?/]
	JRST START
HELP:	OUTSTR HLPMES
	CLRBFI
	JRST START
HLPMES:	ASCIZ ^TERBIN ENABLES YOU TO WRITE AND READ BINARY
[IE.,.SAV,.REL,.SHR, ETC.] FILES USING THE PAPER TAPE
PUNCH/READER ON THE TTY.  THIS ALLOWS YOU TO EFFICIENTLY
STORE OBJECT FILES WHEN IT IS DIFFICULT TO USE DECTAPE
OR THE HIGH-SPEED PTP OR PTR.
	<<<<<USAGE>>>>>
WHEN YOU SEE THE STAR, GIVE THIS COMMAND STRING TO WRITE A PAPER TAPE:

*<DEV:FILNAM.EXT

WHERE DEV IS OPTIONAL DEVICE AND IS ASSUMED TO BE DSK.
EXT IS ALSO OPTIONAL, AND IS ASSUMED TO BE .SAV.
TERBIN WILL WAIT 3 SECONDS BEFORE PUNCHING YOUR TAPE,
AND IT WILL BE THRU WHEN ANOTHER "*" APPEARS.

TO READ IN A TAPE, THE COMMAND STRING IS

*>DEV:FILNAM.EXT

WHERE THE ABOVE DISCRIPTION OF THE STRING IS THE SAME.
THE TAPE SHOULD BE MOUNTED IN THE READER WITH THE SWITCH
IN THE STOP POSITION.  TERBIN WILL START THE TAPE ITSELF.

TERBIN SHOULD NOT BE USED WITH ASCII FILES BECAUSE IT WILL
OUTPUT 6 CHAR PER WORD INSTEAD OF THE NORMAL 5 CHAR PER WORD.
^
OTHER:	14
DEV:	0
BUF:	0
DBUF:	BLOCK 3
FILNAM:	0
EXT:	0
	BLOCK 2
	END TERBIN
*U*-:.