Google
 

Trailing-Edge - PDP-10 Archives - BB-F493Z-DD_1986 - 10,7/cldr.pal
There are 5 other files named cldr.pal in the archive. Click here to see a list.
/ CARD LOADER FOR PDP-8, -8/E - SRR 11 AUG 71

/ CARD FORMAT :
/	COL 1	-(WORDS TO LOAD)
/		0 MEANS START AT ADDRESS

/	COL 2	ADDRESS OF DATA OR START

/	COL 3	CDF TO PROPER FIELD IF DATA,
/		CDF CIF TO PROPER FIELD IF START

/	COL 4	2'S COMPLIMENT OF 1'S COMPLIMENT CHECKSUM

/	COL 5 - 4 + WDS	DATA IF DATA CARD

/	COL 5 + WDS	CHECKSUM AFTER WORDS

/	COL 73 - 80 ARE ID AND SEQ NO.

/ CHECKSUMS ARE 1'S COMPLIMENT SUMMATION, CUMULATIVE SINCE BEGINNING
/ OF DECK, BUT ARE 2'S COMPLIMENTED SO TAD WILL GIVE 0 RESULT

NL7775=CLA CLL CMA RTL	/ -3 TO AC

/ CR08 & CR8-E


RCSF=6631	/ SKIP ON DATA READY
RCRB=6634	/ READ BINARY
RCSD=6671	/ SKIP ON CARD DONE FLAG
RCSE=6672	/ SELECT CARD READER AND SKIP IF READY


LBEG=7465		/ BEGINNING OF LOADER

NOPUNC			/ SURPRESS PUNCHING OF BOOTSTRAP

*LBEG+103

/ BOOTSTRAP IS:

BOOT,	RCSE		/ PICK A CARD
	JMP .-1
BOOT1,	RCSF
	JMP .-1
	RCRB
BOOT2,	DCA CHKSUM		/ EVENTUALLY WRITTEN OVER WITH JMP ST
	ISZ .-1
END,	JMP BOOT1


*LBEG

NW,
	*.+1
ADDR,
	*.+1
FLD,

ENPUNC		/ TURN ON PUNCHING TO GET REAL LOADER 

	*.+1


CHKSUM,	0		/ CUMULATIVE CHECKSUM FOR CARD DECK (1'S COMPLIMENT)

L,	CHKSUM		/ INITIAL VALUES FOR LOADER AND
N,	CHKSUM-END+1	/ BOOTSTRAP CHECKSUM

ST,	CLA
	TAD RD		/ PUT BOOTSTRAP BACK
	DCA BOOT2
CLP,	TAD I L		/ CHECKSUM LOADER ITSELF
	ISZ L
	ISZ N
	JMP CLP
	SZA
	HLT		/ LOADER CHECKSUM FAILURE
CD,	JMS RWD		/ FLUSH OUT REST OF CARD
	JMP .-1
	RCSE		/ READ A CARD
	JMP .-1
	NL7775		/ -3
	DCA N
	TAD C3
	JMS RD		/ GET CONTROL INFO
	TAD FLD
	DCA .+1
	HLT		/ CDF IF DATA, CDF CIF IF START
	TAD NW
	SNA
	JMP I ADDR	/ ZERO IS START
	DCA N
	TAD ADDR
	JMS RD		/ GET THE DATA LOADED
	JMP CD		/ END OF CARD RETURN


/ SUBROUTINE TO READ A BLOCK AND CHECK ITS 1'S COMP CHECKSUM

RD,	DCA CHKSUM	/ CONSTANT USED TO RESET BOOTSTRAP
	DCA L
RDL1,	JMS RWD
	DCA I L
	CLL
	TAD I L
	TAD CHKSUM
	SZL
	IAC
	DCA CHKSUM
	ISZ L
	NOP
	ISZ N
	JMP RDL1
	TAD C1		/ CDF
	RIF		/ SET DATA FIELD BACK TO
	DCA .+1		/ INSTRUCTION FIELD
	HLT
	JMS RWD		/ GET CHECKSUM
	TAD CHKSUM
	SZA		/ IS SAME ?
	HLT		/ NO DATA WAS IN ERROR
	JMP I RD

/ SUBROUTINE TO READ 1 WORD

RWD,	0422		/ WORD USED TO MAKE LOADER CHECKSUM COME OUT ZERO
RWD1,	RCSD		/ END OF CARD YET ?
	JMP RWD2	/ NO, CHECK DATA
	ISZ RWD		/ YES, SKIP RETURN
	JMP I RWD

RWD2,	RCSF
	JMP RWD1
	RCRB
	JMP I RWD

C1,	CDF
C3,	NW

/ CODE THAT OVERLAYS THE BOOTSTRAP TO GET CONTROL TO THE LOADER

BOOT,	RCSE
	JMP .-1
BOOT1,	RCSF
	JMP .-1
	RCRB
BOOT2,	JMP ST

CWDS=.-CHKSUM		/ WORDS ON CARD
CWL=110-CWDS		/ WORDS LEFT ON CARD

$