Google
 

Trailing-Edge - PDP-10 Archives - cust_sup_cusp_bb-x130c-sb - 10,7/unscsp/bootdx/a8ddt.tec
There are 6 other files named a8ddt.tec in the archive. Click here to see a list.
!     ** A8DDT  DDT FOR ASCIIZED PDP-8 FILES - VERSION 1(2) **     !

!START THE PROGRAM USING THE FOLLOWING SEQUENCE:    !
!.R TECO                                              !
!*ERA8DDT.TEC$YAHXAMA$$                                !



!	* * * * INITIALIZATION CODE * * * *	!

!PULL IN THE SUBROUTINES AND LOAD INTO Q-REGISTERS!

OSUBSET!SUBDUN!

!ASK USER FOR FILE TO UPDATE AND OPEN IT!

!START!HKIEB^A
FILE:
!GETFILE!^TIR!			PUT USER SUPPLIED CHARACTER IN THE BUFFER!
1A-21"EOSTART'!			IF ^U THEN TRY AGAIN!
1A-127"EDRTDOGETFILE'!		IF RO THEN DELETE LAST CHAR AND ECHO IT!
1A-18"ED
2,ZTOGETFILE'!		IF ^R THEN ECHO ENTIRE TYPED LINE!
1A-27"E	?OSTART'!	DON'T ALLOW ALTMODE!
1A-10"NCOGETFILE'!		IF NOT CR THEN GET NEXT CHAR!
R2D27IHXBMB!			ON CR FINISH EB COMMAND IN Q-REG B!
Y1000<A>J!			BRING EVERYTHING IN CORE AND WE'RE READY!
A8DDT


!	* * * * COMMAND PARSER AND COMMAND HANDLERS * * * *	!

!PARSE!^TU7!			STORE NEXT CHARACTER TYPED IN Q-REG 7!
Q7-13"E^TOCRLF'!		CRLF TYPED, CLOSE LOCATION!
Q7-10"EOLF'!			LF TYPED, OPEN NEXT LOCATION!
Q7-127"EORUBOUT'!		RUBOUT TYPED, DELETE LAST ENTRY!
Q7-63"E?OPARSE'!		QUESTION MARK, ENTER/EXIT DEBUG MODE!
Q7-46"EODOT'!			DOT TYPED, ARGUMENT IS CURRENT LOCATION!
Q7-47"EOEXAMINE'!		SLASH TYPED, EXAMINE SPECIFIED LOCATION!
Q7-56"LQ7-47"GONUMERIC''!	NUMERIC TYPED, ASSEMBLE NUMERIC ARGUMENT!
Q7-26"EEX!			CONTROL-Z, EXIT THE PROGRAM!
!ERROR!?	0UG0U1OPARSE! IF NONE OF THE ABOVE THEN ERROR!


!NUMERIC!Q1*8+(Q7-48)U1!	UPDATE OCTAL NUMERIC IN Q-REG 1!
Q1-^O7777"GOERROR'-1UGOPARSE!	IF >4 DIGITS THEN ERROR!


!EXAMINE!QG"FOERROR'Q1UT!	IF NO LOC TYPED THEN ERROR ELSE STORE ADDR TO EXAMINE!
!EXAMINE-T!	1UF-1L!LOOK!<S
8 ;!				INITIALIZE AND LOOK FOR BEGINNING OF A8 DATA LINES!
MIQ1UXCMIQ1UYC!			STORE START LOC AND LENGTH OF DATA BLOCK SPECIFIED!
QT-QY+1"GQT-(QX+QY)"L!		IF LOCATION DESIRED IS IN THIS BLOCK!
QT-QY<S,>-1UF!			THEN POSITION TO DATA DEFINING THE LOC!
MI0;''>!			AND GET CONTENTS, ELSE TRY NEXT LINE IN A8 FILE!
QF-1"E!				IF DIDN'T FIND THE LOC ON FIRST TRY THROUGH!
0UFJOLOOK'!			THEN TRY AGAIN FROM BEGINNING OF FILE!
QF"F-1UZ0U1-1UF'!		IF FAILED ON THAT TRY AS WELL THEN FAKE A 0'D LOC!
ME^A		!		IF LOC FOUND THEN TYPE OUT CONTENTS!
0UGQ1UC0U1OPARSE


!CRLF!QF"TQG"T!			INSURE LOCATION IS OPEN AND NEW CONTENTS SPECIFIED!
QZ"TS
8 ,0L!				IF FAKED 0 LOC OPEN THEN GO TO EOF,!
I8 A,,,
!				CREATE BLANK ENTRY,!
4RQTUCMDS,'!			AND STORE ADDRESS OF LOCATION!
Q1UC!				PLACE LAST TYPED NUMERIC IN Q-REG C!
!DEPOSIT NUMERIC IN Q-REGISTER C INTO CURRENTLY OPEN LOCATION!
!NOTE THAT TEXT POINTER IS STILL SET TO STRING SPECIFYING THIS LOCATION!
!DELOLD!R1A-44"NDODELOLD'C!	BEGIN BY BACKING UP TO LAST COMMA!
!				DELETING AS YOU GO!
MD!				CALL THE MACRO TO DO ACTUAL STORE!
!COMPLETE THE PROCESS BY UPDATING THE CHECKSUM FOR THIS LINE!
0U20L2C!			INIT THE CHECKSUM AND START AT 1ST DATA FIELD!
<MI1A-13"E0;'(Q1+Q2)U2C>!	IF NEXT FIELD IS DATA THEN USE IT TO!
!				UPDATE THE RUNNING CHECKSUM IN Q-REG 2!
!DEL!R1A-44"NDODEL'C!		DELETE THE PREVIOUS CHECKSUM FIELD!
(-Q2)&^O7777UCMD''!		STORE THE NEW CHECKSUM!
0UG0UF0U10UZQL"FOPARSE'!	CLEAR FLAGS AND IF CRLF LOOK FOR NEXT COMMAND!
0UL%T!				IF LF INCREMENT LOCATION COUNTER!
QTU1ME/!			TYPE CURRENT LOCATION ADDRESS!
OEXAMINE-T!			AND EXAMINE ITS CONTENTS!


!LF!-1UL!			INDICATE LF BEING PROCESSED!

OCRLF!				ECHO CR AND JOIN CRLF CODE!


!DOT!QTU1-1UGOPARSE


!RUBOUT!0UG0U1!			CLEAR ANY NUMERIC TYPED!
XXX		OPARSE!		INDICATE RUBOUT DONE AND GET NEXT COMMAND!



!	* * * * Q-REGISTER SUBROUTINES * * * *	!

!&QD&!
!CONVERT NUMERIC IN Q-REG C TO A8 FORMAT AND STORE!
<-QC;QC&63-^O74"GQC&63IONEXTSAV'QC&63+^O100I!NEXTSAV!QC/64UCR>
!&&QD&&!

!&QE&!
!MACRO TO TYPE OUT CONTENTS OF Q-REGISTER 1!
0U2!				INITIALIZE THE DIGIT COUNTER!
<Q1-(Q1/8*8)+^O60IR%2!		STRIP OFF OCTAL DIGIT, CONVERT TO ASCII, AND STORE!
Q1/8U1-Q1;>!			SHIFT OVER TO NEXT DIGIT UNTIL DONE!
.,.+Q2TQ2D!			TYPE OUT RESULT AND REMOVE FROM BUFFER!
!&&QE&&!

!&QI&!
!MACRO TO CONVERT A8 TO 12-BIT BINARY!
0U1!ILOOP!1A-125"L1A-60"G!	IF NEXT CHAR IS IN VALID DATA RANGE!
Q1*64+(1A&63)U1COILOOP''!	THEN CONVERT TO BINARY EQUIVALENT!
!&&QI&&!

!THE CODE TO PULL IN SUBROUTINES MUST BE AFTER THE SUBROUTINES THEMSELVES!
!SUBSET!
HKGAJS!&QD&!LB,.KS!&&QD&&!0L.,ZKHXD
HKGAJS!&QE&!LB,.KS!&&QE&&!0L.,ZKHXE
HKGAJS!&QI&!LB,.KS!&&QI&&!0L.,ZKHXI
OSUBDUN

!THE END!