Google
 

Trailing-Edge - PDP-10 Archives - decuslib20-04 - decus/20-0125/gtload.lst
There is 1 other file named gtload.lst in the archive. Click here to see a list.
GTLOAD GT40 LOAD HANDLER	MACDLX 622(622)-1  1-FEB-81  11:36  PAGE 1
GTLOAD.P11

     1						.TITLE	GTLOAD GT40 LOAD HANDLER
     2		000000			CHAR=%0
     3		000001			CSUM=%1
     4		000002			BYTECT=%2
     5		000003			LOADDR=%3
     6		000006			SP=%6
     7		000007			PC=%7
     8						;
     9		175610			GTIS=175610	; GT40 INPUT STATUS
    10		175612			GTIB=175612	; GT40 INPUT BUFFER
    11		175614			GTOS=175614	; GT40 OUTPUT STATUS
    12		175616			GTOB=175616	; GT40 OUTPUT BUFFER
    13						;
    14						; THIS IS THE GT40 RESIDENT HANDLER DURING
    15						; A LOAD. THIS PROGRAM WOULD BE LOADED
    16						; BY THE GT40 BOOTSTRAP (A SIX BIT LOADER)
    17						; THIS IS AN EIGHT HANDLER SO TRANSFER
    18						; IS SPEEDED UP. THE SECOND ADVANTAGE OF
    19						; THIS HANDLER IS THAT IT RETURNS INFORMATION
    20						; ABOUT EACH BLOCK, ALLOWING THE HOST (I.E. PDP 10)
    21						; BETTER MONITORING OF BLOCK TRANSFERS
    22						;
    23		037534				.=37534			; FOR 8K GT40
    24						;
    25	037534	012706	037534		START:	MOV	#START,SP		; SET UP STACK
    26	037540	112700	000122		READY:	MOVB	#'R,CHAR		; 'R'
    27	037544	004767	000206			JSR	PC,SEND			; FOR READY
    28	037550	005001			GETBLK:	CLR	CSUM			; CLEAR THE CHECKSUM
    29	037552	004767	000156			JSR	PC,GET			; GET THE FIRST BYTE
    30	037556	005300				DEC	CHAR			; IF NOT A 1 THEN
    31	037560	001373				BNE	GETBLK			; LOOK FOR START
    32	037562	004767	000146			JSR	PC,GET			; GET THE SECOND BYTE
    33	037566	105700				TSTB	CHAR			; IF NOT A NULL THEN
    34	037570	001367				BNE	GETBLK			; LOOK FOR START
    35						;
    36						; START PROCESSING A VALID BLOCK
    37						;
    38	037572	004767	000136			JSR	PC,GET			; GET LOW ORDER BYTE COUNT
    39	037576	010002				MOV	CHAR,BYTECT		; AND SAVE
    40	037600	004767	000130			JSR	PC,GET			; GET HIGH ORDER BYTE COUNT
    41	037604	000300				SWAB	CHAR			; MAKE HIGH ORDER
    42	037606	050002				BIS	CHAR,BYTECT		; FORM COMPLETE BYTE COUNT
    43	037610	004767	000120			JSR	PC,GET			; GET LOW ORDER LOAD ADDRESS
    44	037614	010003				MOV	CHAR,LOADDR		; AND SAVE
    45	037616	004767	000112			JSR	PC,GET			; GET HIGH ORDER LOAD ADDRESS
    46	037622	000300				SWAB	CHAR			; MAKE HIGH ORDER
    47	037624	050003				BIS	CHAR,LOADDR		; FORM COMPLETE LOAD ADDRESS
    48						;
    49						; IF BYTECT > 6 THEN INTERMEDIATE BLOCK
    50						; IF BYTECT = 6 THEN LAST BLOCK
    51						; IF BYTECT < 6 THEN ERROR
    52						;
    53	037626	162702	000006			SUB	#6,BYTECT		; UPDATE BYTE COUNT
    54	037632	002412				BLT	ERROR			; BAD COUNT
GTLOAD GT40 LOAD HANDLER	MACDLX 622(622)-1  1-FEB-81  11:36  PAGE 1-1
GTLOAD.P11

    55	037634	001416				BEQ	LAST			; LAST BLOCK
    56						;
    57						; PROCESS INTERMEDIATE BLOCK
    58						;
    59	037636	004767	000072		NORMAL:	JSR	PC,GET			; GET THE NEXT BYTE
    60	037642	110023				MOVB	CHAR,(LOADDR)+		; SAVE THE BYTE, INCREMENT ADDRESS
    61	037644	005302				DEC	BYTECT			; DECREMENT THE BYTE COUNT
    62	037646	003373				BGT	NORMAL			; AND LOOP FOR ENTIRE BLOCK
    63	037650	004767	000060			JSR	PC,GET			; GET THE CHECKSUM
    64	037654	105701				TSTB	CSUM			; IS CHECKSUM ZERO
    65	037656	001730				BEQ	READY			; IF SO CONTINUE WITH NEXT BLOCK
    66						;
    67						; CHECKSUM ERROR OR BAD BYTE COUNT
    68						;
    69	037660	112700	000105		ERROR:	MOVB	#'E,CHAR		; 'E'
    70	037664	004767	000066			JSR	PC,SEND			; FOR ERROR
    71	037670	000727				BR	GETBLK			; TRY THE BLOCK AGAIN
    72						;
    73	037672	004767	000036		LAST:	JSR	PC,GET			; GET THE CHECKSUM
    74	037676	105701				TSTB	CSUM			; WAS IT GOOD ?
    75	037700	001367				BNE	ERROR			; CHECKSUM ERROR
    76						;
    77						; SELF START OR HALT
    78						;
    79	037702	032703	000001			BIT	#1,LOADDR		; EVEN ADDRESS ?
    80	037706	001405				BEQ	TRANSF			; YES
    81	037710	112700	000110			MOVB	#'H,CHAR		; IF ODD THEN 'H'
    82	037714	004767	000036			JSR	PC,SEND			; FOR HALT
    83	037720	000000				HALT
    84	037722	112700	000123		TRANSF:	MOVB	#'S,CHAR		; EVEN ADDRESS SO 'S'
    85	037726	004767	000024			JSR	PC,SEND			; FOR SELF-START
    86	037732	000113				JMP	@LOADDR			; START USERS PROGRAM
GTLOAD GT40 LOAD HANDLER	MACDLX 622(622)-1  1-FEB-81  11:36  PAGE 1-2
GTLOAD.P11

    88	037734	105737	175610		GET:	TSTB	@#GTIS			; TEST STATUS - READY ?
    89	037740	100375				BPL	GET			; WAIT UNTIL READY
    90	037742	113700	175612			MOVB	@#GTIB,CHAR		; GET THE CHARACTER
    91	037746	042700	177400			BIC	#177400,CHAR		; CLEAR THE TOP BYTE
    92	037752	060001				ADD	CHAR,CSUM		; AND ADD INTO CHECKSUM
    93	037754	000207				RTS	PC			; RETURN TO CALLER
    94						;
    95	037756	042700	177400		SEND:	BIC	#177400,CHAR		; CLEAR TOP BYTE OF CHARACTER
    96	037762	110037	175616			MOVB	CHAR,@#GTOB		; SEND THE CHARACTER
    97	037766	105737	175614		WAIT:	TSTB	@#GTOS			; WAIT UNTIL CHARACTER
    98	037772	100375				BPL	WAIT			; HAS BEEN SENT
    99	037774	000207				RTS	PC			; RETURN TO CALLER
   100						;
   101		037534				.END	START
GTLOAD GT40 LOAD HANDLER	MACDLX 622(622)-1  1-FEB-81  11:36  PAGE 1-3
GTLOAD.P11	SYMBOL TABLE

BYTECT =%000002  	CHAR   =%000000  	CSUM   =%000001  	ERROR    037660  
GET      037734  	GETBLK   037550  	GTIB   = 175612  	GTIS   = 175610  
GTOB   = 175616  	GTOS   = 175614  	LAST     037672  	LOADDR =%000003  
NORMAL   037636  	PC     =%000007  	READY    037540  	SEND     037756  
SP     =%000006  	START    037534  	TRANSF   037722  	WAIT     037766  
.      = 037776  



 ERRORS DETECTED:  0
GTLOAD GT40 LOAD HANDLER	MACDLX 622(622)-1  1-FEB-81  11:36  PAGE 1-4
GTLOAD.P11

 *,LPT:GTLOAD=GTLOAD.P11
 RUN-TIME: 0 0 0 SECONDS
 CORE USED:  3K