Google
 

Trailing-Edge - PDP-10 Archives - decuslib10-01 - 43,50177/pcpy.mac
There are no other files named pcpy.mac in the archive.
TITLE PCPY		;PROGRAM TO COPY ONE RP02 DISK PACK TO ANOTHER
			;AUTHOR: MARIA PLAZA
			;YOU MUST ASSIGN THE INPUT PACK "IN" AND
			;THE OUTPUT PACK "OUT"
			;FOR EXAMPLE,     .AS DPA0 IN
			;                 .AS DPA3 OUT

START:	CALLI 0
	INIT 0,17	;DUMP MODE NEEDED FOR SUPER USETI/O
	SIXBIT/IN/	;ASSIGNED INPUT DISK PACK - IN
	Z
	JRST MESS1
	INIT 1,17
	SIXBIT/OUT/	;ASSIGNED OUTPUT PACK - OUT
	Z
	JRST MESS2
	MOVEI 2,1	;START COPY WITH BLOCK 1
	USETI 0,2	;CONTENTS OF EFFECTIVE ADDRESS HAS STARTING BLOCK
	USETO 1,2
	INPUT 0,IOL	;GET FIRST HALF CYLINDER LESS BLOCK 0
	STATZ 740000	;ERRORS?
	JRST IERR	;YES
	OUTPUT 1,IOL	;OUTPUT FIRST HALF CYLINDER LESS BLOCK 0
	STATZ 1,740000	;ERRORS?
	JRST OERR	;YES
	ADDI 2,^D99	;COUNT NUMBER OF BLOCKS COPIED
MORE:	INPUT 0,IO	;GET NEXT HALF CYLINDER(100 BLOCKS)
	STATZ 740000	;ERRORS?
	JRST IERR	;YES
	OUTPUT 1,IO	;OUTPUT HALF CYLINDER
	STATZ 1,740000	;ERRORS?
	JRST OERR	;YES
	ADDI 2,^D100	;INCREMENT NUMBER OF BLOCKS COPIED
	CAIGE 2,^D40000	;ALL BLOCKS COPIED?
	JRST MORE	;NO
	TTCALL 3,[ASCIZ/COPY COMPLETED
/]
	RELEAS 0,	;YES
	RELEAS 1,
	CALLI 12
IOL:	IOWD ^D12672,BLK
	Z
IO:	IOWD ^D12800,BLK
	Z
BLK:	BLOCK ^D12800
MESS1:	TTCALL 3,[ASCIZ/INIT ERROR ON INPUT DEVICE
/]
	CALLI 12
MESS2:	TTCALL 3,[ASCIZ/INIT ERROR ON OUTPUT DEVICE
/]
	CALLI 12
IERR:	TTCALL 3,[ASCIZ/INPUT ERROR DURING DUMP
/]
CHK1:	GETSTS 10
	CALLI 12
OERR:	TTCALL 3,[ASCIZ/OUTPUT ERROR DURING DUMP
/]
CHK2:	GETSTS 1,11
	CALLI 12
	END START