	.TITLE RSX DEBUGGING ROUTINE

 

 

 

 

/

/ COPYRIGHT (C) 1976

/ DIGITAL EQUIPMENT CORPORATION, MAYNARD, MASS.

/

/ THIS SOFTWARE IS FURNISHED UNDER A LICENSE FOR USE ONLY

/ ON A SINGLE COMPUTER SYSTEM AND MAY BE COPIED ONLY WITH

/ THE INCLUSION OF THE ABOVE COPYRIGHT NOTICE.  THIS

/ SOFTWARE, OR ANY OTHER COPIES THEREOF, MAY NOT BE PRO-

/ VIDED OR OTHERWISE MADE AVAILABLE TO ANY OTHER PERSON

/ EXCEPT FOR USE ON SUCH SYSTEM AND TO ONE WHO AGREES TO

/ THESE LICENSE TERMS.  TITLE TO AND OWNERSHIP OF THE

/ SOFTWARE SHALL AT ALL TIMES REMAIN IN DEC.

/

/ THE INFORMATION IN THIS DOCUMENT IS SUBJECT TO CHANGE

/ WITHOUT NOTICE AND SHOULD NOT BE CONSTRUED AS A COM-

/ MITMENT BY DIGITIAL EQUIPMENT CORPORATION.

/

/ DEC ASSUMES NO RESPONSIBILITY FOR THE USE OR RELIABILITY

/ OF ITS SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPLIED BY DEC.

/

	.TITLE DESCRIPTION OF USE

 

 

 

 

/

/ THIS DEBUGGING ROUTINE IS INVOKED BY THE .DEBUG MACRO, WHOSE

/ DEFINITION IS GIVEN BELOW.  .DEBUG IS INVOKED IN THE

/ FOLLOWING FORM:

/

/	.DEBUG <"DEBUGING MESSAGE">,WORD,FORM

/

/ THIS CAUSES THE FOLLOWING MESSAGE TO BE PRINTED ON THE APPRO-

/ PRIATE LUN:

/

/	PC=NNNNNN AC=NNNNNN XR=NNNNNN DEBUGING MESSAGE <WORD>

/

/ ALL REGISTERS ARE SAVED ACROSS INVOKATIONS TO .DEBUG.

/ THE PC, AC, AND XR VALUES ARE PRINTED IN OCTAL.  THE

/ DEBUGGING MESSAGE IS PRINTED EXACTLY AS PRESENTED.  NOTE THAT

/ IT MUST NOT INCLUDE ANY LINE TERMINATORS OR NULLS.  THE VALUE

/ OF THE "WORD" OPERAND IS PRINTED IN THE "FORM" SPECIFIED.

/ THE "WORD" OPERAND MUST BE A STORAGE LOCATION ADDRESS, OR

/ ONE OF THE FOLLOWING SPECIAL VALUES WHICH REPRESENT

/ REGISTERS:

/

/	-1	AC

/	-2	XR

/	-3	LR

/	-4	MQ

/	-5	SC

/	-6	LINK

/

/ "FORM" IS A THREE DIGIT OCTAL NUMBER OF THE FORM "XXY".  "Y" IS

/ THE INDIRECTION COUNTER.  IF "Y" IS ZERO, "WORD" IS THE

/ ADDRESS OF THE VALUE TO BE PRINTED.  IF "Y" IS ONE, "WORD"

/ IS AN INDIRECT POINTER TO THE VALUE TO BE PRINTED.  UP TO

/ SEVEN LEVELS OF INDIRECTION MAY BE SPECIFIED.  "XX" SPECIFIES

/ THE MANNER IN WHICH THE FINAL VALUE IS TO BE PRINTED.

/ THE FOLLOWING CONVERSIONS ARE DEFINED:

/

/	(FORM)		(CONVERSION)

/	0		NONE -- DON'T PRINT A VALUE.

/	010		SIGNED OCTAL NUMBER.

/	020		UNSIGNED OCTAL NUMBER.

/	030		SIGNED DECIMAL NUMBER.

/	040		UNSIGNED DECIMAL NUMBER.

/	050		IOPS ASCII TEXT BUFFER.

/	060		5/7 ASCII STRING.

/	070		.SIXBT (TWO WORDS, SIX CHARACTERS).

/	100		DEVICE/UNIT/UFD

/	110		NODE NAME -- PRINTS THIRD AND FOURTH

/				WORDS OF VALUE IN .SIXBT.

/

/ THE MESSAGE IS PRINTED ON THE LUN DEFINED BY ASSEMBLY

/ PARAMETER "LUN", WHICH IS DEFAULTED TO 16 (DECIMAL).

/

 

	.IFUND LUN

LUN=20

	.ENDC

 

 

/ SAMPLE DEFINITION OF ".DEBUG" MACRO.  DEBUGGING IS

/ CONDITIONALLY INCLUDED IF PARAMETER "%DEBUG" IS DEFINED.

 

	.DEFIN .DEBUG MESSAG,WORD,FORM

	.ENDM

 

	.IFDEF %DEBUG

 

	.DEFIN .DEBUG MESSAG,WORD,FORM

	  .NOLST

	  .GLOBL .DBG

	  JMS* .DBG

	    .ASCII MESSAG@<0>

	    .DSA FORM

	    .DSA WORD

	  .LST

	.ENDM

 

	.ENDC

	.TITLE DEFINE CONSTANTS AND MNEMONICS

 

 

 

 

LACIX=LAC* X

 

R1=101

R2=102

R3=103

R4=104

R5=105

R6=106

 

X10=10

X11=11

X12=12

X13=13

X14=14

X15=15

X16=16

X17=17

	.TITLE .DBG ENTRY POINT & REGISTER SAVE

 

 

 

 

	.GLOBL .DBG

 

.DBG	0

	DAC SV.AC

	CLA!RAL

	DAC SV.LINK

	PXA

	DAC SV.XR

	PLA

	DAC SV.LR

	LACQ

	DAC SV.MQ

	LACS

	DAC SV.SC

/

	LAC* (R1)

	DAC SV.R1

	LAC* (R2)

	DAC SV.R2

	LAC* (R3)

	DAC SV.R3

	LAC* (R4)

	DAC SV.R4

	LAC* (R5)

	DAC SV.R5

	LAC* (R6)

	DAC SV.R6

/

	LAC* (X10)

	DAC SV.X10

	LAC* (X11)

	DAC SV.X11

	LAC* (X12)

	DAC SV.X12

	LAC* (X13)

	DAC SV.X13

	LAC* (X14)

	DAC SV.X14

	LAC* (X15)

	DAC SV.X15

	LAC* (X16)

	DAC SV.X16

	LAC* (X17)

	DAC SV.X17

	.TITLE FORMAT MESSAGE

 

 

 

 

	CLX

/ COPY "MESSAG" ARGUEMENT TO USRMSG BUFFER

DBG.A	LACIX .DBG

	DAC USRMSG,X

	AXR 1

	LACIX .DBG

	DAC USRMSG,X

	AXR 1

	AND (376)

	SZA

	JMP DBG.A

/ SET UP INDIRECTION COUNTER

	LACIX .DBG

	AND (7)

	CMA

	DAC DBG.0

/ SET UP INDIRECT JMS TO FORMAT ROUTINE

	LACIX .DBG

	AND (170)

	CLL!RAR

	RTR

	TAD (JMS+20000 DSPTBL)

	DAC DBG.1

/ BUMP RETURN ADDRESS AND FETCH VALUE POINTER

	PXA

	TAD .DBG

	IAC

	DAC .DBG

	LAC* .DBG

	ISZ .DBG

/ HANDLE REGISTER REFERENCES

	SMA

	JMP DBG.B

	CMA

	TAD (SV.AC)

/ INDIRECTION LOOP

DBG.B	DAC WRDPTR

	LAC* WRDPTR

	ISZ DBG.0

	JMP DBG.B

/ CALL FORMAT ROUTINE WITH WRDPTR POINTING TO VALUE AND

/ FIRST WORD OF VALUE IN AC.

	XCT DBG.1		/ (DBG.1 CONTAINS A JMS*)

/ TERMINATE MESSAGE

	PXA

	AAC 2+USRMSG-LINBFR

	CLL!RAR

	SWHA

	DAC LINBFR

/ FORMAT "PC=NNNNNN "

	LAC .DBG

	CLL

	LMQ!CLAC!LLS+3

	ALS+4

	LLS+3

	CLL!RAL

	TAD (75*200+60*200+60*2)

	DAC PCMSG+1

	CLAC!LLS+3

	ALS+4

	LLS+3

	ALS+4

	TAD (60*200+60*20+6)

	DAC PCMSG+2

	CLAC!LLS+3

	ALS+4

	LLS+3

	ALS+10

	TAD (60*200+60*200+40*2)

	DAC PCMSG+3

/ FORMAT "AC=NNNNNN "

	LAC SV.AC

	CLL

	LMQ!CLAC!LLS+3

	ALS+4

	LLS+3

	CLL!RAL

	TAD (75*200+60*200+60*2)

	DAC ACMSG+1

	CLAC!LLS+3

	ALS+4

	LLS+3

	ALS+4

	TAD (60*200+60*20+6)

	DAC ACMSG+2

	CLAC!LLS+3

	ALS+4

	LLS+3

	ALS+10

	TAD (60*200+60*200+40*2)

	DAC ACMSG+3

/ FORMAT "XR=NNNNNN "

	LAC SV.XR

	CLL

	LMQ!CLAC!LLS+3

	ALS+4

	LLS+3

	CLL!RAL

	TAD (75*200+60*200+60*2)

	DAC XRMSG+1

	CLAC!LLS+3

	ALS+4

	LLS+3

	ALS+4

	TAD (60*200+60*20+6)

	DAC XRMSG+2

	CLAC!LLS+3

	ALS+4

	LLS+3

	ALS+10

	TAD (60*200+60*200+40*2)

	DAC XRMSG+3

/ OPEN OUTPUT FILE (IF APPROPRIATE) AND PRINT THE MESSAGE.

	LAC EV			/ CHECK IF OUTPUT FILE OPEN

	SZA			/ SKIP IF IT ISN'T.

	JMP DBG.D		/ JMP IF IT IS OPEN.

	SKP			/ AVOID WAIT.

DBG.C	CAL WAIT		/ WAIT UNTIL A NODE IS FREE.

	CAL SEEK		/ OPEN OUTPUT FILE.

	CAL WAITFOR		/ WAITFOR COMPLETION.

	LAC EV			/ CHECK IF OUT OF NODES.

	SAD (-777)

	JMP DBG.C		/ OUT OF NODES -- LOOP.

DBG.D	SKP			/ AVOID WAIT.

DBG.E	CAL WAIT		/ WAIT UNTIL A NODE IS FREE.

	CAL WRITE		/ WRITE THE MESSAGE LINE.

	CAL WAITFOR		/ WAITFOR COMPLETION.

	LAC EV			/ CHECK IF OUT OF NODES.

	SAD (-777)

	JMP DBG.E		/ OUT OF NODES -- LOOP.

	.TITLE RESTORE REGISTERS & RETURN

 

 

 

 

	LAC SV.X10

	DAC* (X10)

	LAC SV.X11

	DAC* (X11)

	LAC SV.X12

	DAC* (X12)

	LAC SV.X13

	DAC* (X13)

	LAC SV.X14

	DAC* (X14)

	LAC SV.X15

	DAC* (X15)

	LAC SV.X16

	DAC* (X16)

	LAC SV.X17

	DAC* (X17)

/

	LAC SV.R1

	DAC* (R1)

	LAC SV.R2

	DAC* (R2)

	LAC SV.R3

	DAC* (R3)

	LAC SV.R4

	DAC* (R4)

	LAC SV.R5

	DAC* (R5)

	LAC SV.R6

	DAC* (R6)

/

	LAC SV.SC

	TCA

	AND (77)

	XOR (640400)

	DAC DBG.2

	LAC (400000)

	XCT DBG.2

	LAC SV.MQ

	LMQ

	LAC SV.LR

	PAL

	LAC SV.XR

	PAX

	LAC SV.LINK

	RAR

	LAC SV.AC

	JMP* .DBG

	.TITLE TEMPORARIES, CPB'S, MESSAGE BUFFER

 

 

 

 

WRDPTR	0			/ POINTER TO VALUE.

 

 

 

DBG.0	0			/ INDIRECTION COUNTER

 

DBG.1	0			/ JMS* TO VALUE FORMATTING

				/ ROUTINE.

 

DBG.2	0			/ NORM INSTRUCTION USED

				/ TO RESTORE SC.

 

 

WAIT	5			/ WAIT UNTIL SIGNIFICANT EVENT

 

 

SEEK	3200			/ OPEN OUTPUT FILE.

	EV

	LUN

	.SIXBT ".DEBUG"		/ FILE NAME = ".DEBUG LST"

	.SIXBT "LST"

 

 

WRITE	2700			/ WRITE THE DEBUGGING MESSAGE.

	EV

	LUN

	2

	LINBFR

 

 

WAITFOR	20			/ WAIT FOR WRITE TO FINISH

	EV

 

 

EV	0			/ EV FOR WRITE

 

 

PCMSG	.ASCII "PC=NNNNNN "

ACMSG	.ASCII "AC=NNNNNN "

XRMSG	.ASCII "XR=NNNNNN "

LINBFR	0			/ THE MESSAGE BUFFER.  NOTE

	0			/ PCMSG, ACMSG, AND XRMSG HAVE

				/ BEEN TEMPORARILY DELETED.

USRMSG	.BLOCK 100		/ USER DETERMINED MESSAGE

BFREND	.ASCII "****"<15>

	.TITLE REGISTER SAVE AREA

 

 

 

 

/ FOLLOWING ORDER MUST NOT BE CHANGED:

 

SV.AC	0

SV.XR	0

SV.LR	0

SV.MQ	0

SV.SC	0

SV.LINK	0

 

 

/ FOLLOWING DOESN'T MATTER:

 

SV.R1	0

SV.R2	0

SV.R3	0

SV.R4	0

SV.R5	0

SV.R6	0

 

SV.X10	0

SV.X11	0

SV.X12	0

SV.X13	0

SV.X14	0

SV.X15	0

SV.X16	0

SV.X17	0

	.TITLE FORMATTING DISPATCH TABLE & ROUTINES

 

 

 

 

/ ROUTINES ARE DISPATCH TO VIA JMS.  WRDPTR POINTS TO

/ VALUE TO BE PRINTED, AC CONTAINS FIRST WORD OF VALUE.

/ FORMATTED VALUES ARE STORED USING XR TO INDEX FROM

/ LOCATION USRMSG.  VALUES CAN USE THE LAST (FIFTH)

/ CHARACTER OF THE < USRMSG-2,X : USGMSG-1,X > WORD

/ PAIR.  WORD PAIRS BEGINNING AT USRMSG,X MAY BE USED.

/ A CARRAIGE RETURN MUST BE INCLUDED AS A LINE TERMINATOR.

/ THE XR SHOULD BE LEFT SO THAT, AT RETURN, < USRMSG,X :

/ USRMSG+1,X > WAS THE LAST WORD PAIR USED (THE WORD

/ WHICH CONTAINS THE CARRAIGE RETURN).

 

 

DSPTBL	NONE

	SGNOCT

	OCTAL

	SGNDEC

	DECIMAL

	BUFFER

	ASCII

	SIXBIT

	DEVICE

	NODNAME

	NONE

	NONE

	NONE

	NONE

	NONE

	NONE

 

 

 

NONE	0

	LAC USRMSG-1,X

	AAC 15*2

	DAC USRMSG-1,X

	AXR -2

	JMP* NONE

	.TITLE SGNOCT, OCTAL FORMATTING ROUTINES

 

 

 

 

SGNOCT	0

	SMA!CLA

	AAC 53-55*2

	AAC 55*2

	XOR USRMSG-1,X

	DAC USRMSG-1,X

	LAC* WRDPTR

	SPA

	TCA

	JMS OCTAL

	JMP* SGNOCT

 

 

 

OCTAL	0

	LMQ

	JMS PCKINI

	LAW -5

	DAC OCTL.0

	DZM OCTL.1

OCTL.A	CLL

	CLAC!LLS+3

	SAD OCTL.1

	JMP OCTL.B

	AAC 60

	DAC OCTL.1

	JMS PACK57

OCTL.B	ISZ OCTL.0

	JMP OCTL.A

	CLL

	CLAC!LLS+3

	AAC 60

	JMS PACK57

	LAC (405017)

	JMS PCKSXBT

	LAC (032401)

	JMS PCKSXBT

	LAC (145156)

	JMS PCKSXBT

	JMS PCKFIN

	JMP* OCTAL

 

 

OCTL.0	0

 

OCTL.1	0

	.TITLE SGNDEC, DECIMAL FORMATTING ROUTINES.

 

 

 

 

SGNDEC	0

	SMA!CLA

	AAC 53-55*2

	AAC 55*2

	XOR USRMSG-1,X

	DAC USRMSG-1,X

	LAC* WRDPTR

	SPA

	TCA

	JMS DECIMAL

	JMP* SGNDEC

 

 

 

DECIMAL	0

	LMQ

	JMS PCKINI

	LAW -5

	DAC DCML.0

	DZM DCML.1

	CLA!STL

	RTR

	MUL-13000

	  517427

	LRS+20

DCML.A	SAD DCML.1

	JMP DCML.B

	AAC 60

	DAC DCML.1

	JMS PACK57

DCML.B	MUL-13000!CLAC

	  12

	ISZ DCML.0

	JMP DCML.A

	AAC 60

	JMS PACK57

	LAC (405004)

	JMS PCKSXBT

	LAC (050311)

	JMS PCKSXBT

	LAC (150114)

	JMS PCKSXBT

	LAC (515640)

	JMS PCKSXBT

	JMS PCKFIN

	JMP* DECIMAL

 

 

DCML.0	0

 

DCML.1	0

	.TITLE BUFFER, ASCII FORMATTING ROUTINES

 

 

 

 

BUFFER	0

	LMQ

	LAC USRMSG-1,X

	AAC 114*2

	DAC USRMSG-1,X

	LAC (102*200+110*20+07)

	DAC USRMSG,X

	CLL

	CLAC!LLS+3

	ALS+4

	LLS+3

	CLL!RAL

	TAD (75*200+60*200+60*2)

	DAC USRMSG+1,X

	CLAC!LLS+3

	ALS+4

	LLS+3

	ALS+4

	TAD (60*200+60*20+6)

	DAC USRMSG+2,X

	CLAC!LLS+3

	ALS+4

	LLS+3

	ALS+10

	TAD (60*200+60*200+40*2)

	DAC USRMSG+3,X

	AXR 4

	LAC (15*200*20)		/ INSERT CR IN CASE OF

	DAC USRMSG,X		/ NULL BUFFER.

	LAC* WRDPTR		/ CHECK FOR NULL BUFFER --

	AND (377000)		/ AC WILL BE < 0 OR = 0

	TAD (-1000)		/ IF NULL BUFFER.

	ISZ WRDPTR

	ISZ WRDPTR

	SMA!SZA			/ SKIP IF NULL BUFFER.

	JMS ASCII

	JMP* BUFFER

 

 

 

ASCII	0

ASC.A	PXA

	SAD (BFREND-USRMSG)

	JMP* ASCII

	LAC* WRDPTR

	DAC USRMSG,X

	ISZ WRDPTR

	AND (177*200*20)

	SAD (15*200*20)

	JMP* ASCII

	SAD (175*200*20)

	JMP* ASCII

	LAC USRMSG,X

	AND (177*20)

	SAD (15*20)

	JMP* ASCII

	SAD (175*20)

	JMP* ASCII

	LAC* WRDPTR

	DAC USRMSG+1,X

	ISZ WRDPTR

	AND (177*200*2)

	SAD (15*200*2)

	JMP* ASCII

	SAD (175*200*2)

	JMP* ASCII

	LAC USRMSG+1,X

	AND (177*2)

	SAD (15*2)

	JMP* ASCII

	SAD (175*2)

	JMP* ASCII

	LAC USRMSG+1,X

	LMQ

	LAC USRMSG,X

	LLS+3

	AND (177)

	SAD (15)

	JMP* ASCII

	SAD (175)

	JMP* ASCII

	AXR 2

	JMP ASC.A

	.TITLE SIXBIT, NODNAME FORMATTING ROUTINES

 

 

 

 

SIXBIT	0

	JMS PCKINI

	LAC* WRDPTR

	JMS PCKSXBT

	ISZ WRDPTR

	LAC* WRDPTR

	JMS PCKSXBT

	JMS PCKFIN

	JMP* SIXBIT

 

 

 

NODNAME	0

	ISZ WRDPTR

	ISZ WRDPTR

	JMS SIXBIT

	JMP* NODNAME

	.TITLE DEVICE/UNIT/UFD FORMATTING ROUTINE

 

 

 

 

DEVICE	0

	CLL

	LMQ!CLAC!DIV

	  100

	MUL-13000

	  12*40

	DIV

	  12

	MUL-13000

	  200

	XOR (40)

	AAC 40

	CLL!RAL

	XOR USRMSG-1,X

	DAC USRMSG-1,X

	CLAC!LLS+6

	CLL!RTL

	LLS+11

	XOR (40*200*20)

	TAD (40*200+60*20+6)

	DAC USRMSG,X

	LACQ

	TAD (60*200+40*200+74*2)

	DAC USRMSG+1,X

	AXR 2

	JMS PCKINI

	ISZ WRDPTR

	LAC* WRDPTR

	JMS PCKSXBT

	LAC (76)

	JMS PACK57

	JMS PCKFIN

	JMP* DEVICE

	.TITLE PACK57 -- SUBR. TO PACK 5/7 ASCII CHARACTERS

 

 

 

 

/

/ THIS SUBROUTINE PACKS A CHARACTER INTO A 5/7 ASCII TEXT

/ BUFFER (I.E., AN IOPS ASCII LINE BUFFER).  SUBROUTINE

/ PCKINI MUST BE CALLED BEFORE THIS ROUTINE IS CALLED, TO

/ INITIALIZE VARIOUS POINTERS, AND SUBROUTINE PCKFIN MUST

/ BE CALLED AFTERWARDS, TO PACK A CARRAIGE RETURN.

/

/ THIS ROUTINE EXPECTS THE ASCII CHARACTER IN THE LOW 7 BITS

/ OF THE AC.  THE HIGH BITS OF THE AC ARE IGNORED.

/

/ CALLING SEQUENCE:

/	LAC (CHARACTER)

/	JMS PACK57

/

/ REGISTERS ALTERED:

/	XR, AC, LINK, SC (STEP-COUNTER)

/

/ VALUES RETURNED:

/	NONE

/

 

 

PACK57	0

	AND (177)		/ MASK OUT UNWANTED BITS.

	CLL			/ CLEAR LINK FOR ALS INSTR.

	XCT* PCK5.0		/ DO CHAR. ACTION.  EITHER ALS

				/ INSTR. OR JMP TO PCK5.E OR

				/ PCK5.F.  PCK5.0 POINTS TO

				/ TABLE PCK5.C.

	XOR USRMSG,X		/ MERGE CHAR. INTO WORD.

PCK5.A	ISZ PCK5.0		/ BUMP CHAR. ACTION POINTER.

PCK5.B	DAC USRMSG,X		/ STORE WORD CONTAINING CHAR.

	JMP* PACK57		/ RETURN!

 

 

/ CHARACTER ACTION TABLE.  THE XCT INSTRUCTION ABOVE PERFORMS

/ AN INSTRUCTION FROM THIS TABLE VIA A POINTER IN PCK5.0.

/ SIMPLE CASES SHIFT CHAR. INTO POSITION, OTHERS JMP TO

/ ACTION ROUTINES.

 

PCK5.C	ALS+10			/ ACTION FOR CHAR. 4

	CLL!RAL			/ ACTION FOR CHAR. 5

PCK5.D	JMP PCK5.E		/ ACTION FOR CHAR. 1

	ALS+4			/ ACTION FOR CHAR. 2

	JMP PCK5.F		/ ACTION FOR CHAR. 3

 

 

/ ACTION FOR CHARACTER 1

 

PCK5.E	AXR 1

	ALS+13			/ SHIFT CHAR. INTO POSITION.

	JMP PCK5.A		/ GO STORE CHAR.

 

 

/ ACTION FOR CHARACTER 3 (THE SPLIT CHARACTER)

 

PCK5.F	CLL!RAR			/ SHIFT FIRST PART OF CHAR.

	RTR			/ INTO POSITION.

	DAC PCK5.2		/ SAVE REST OF CHAR. FOR LATER.

	AND (17)		/ MASK OUT FIRST PART.

	XOR USRMSG,X		/ MERGE INTO WORD.

	DAC USRMSG,X

	LAC (PCK5.C)		/ RESET CHAR. ACTION POINTER.

	DAC PCK5.0

	AXR 1

	LAW 760000		/ MASK OUT REMAINDER OF CHAR.

	AND PCK5.2

	RAR			/ ROTATE INTO POSITION.

	JMP PCK5.B		/ AND GO STORE THE WORD.

 

 

 

PCK5.0	-1			/ CHARACTER ACTION POINTER.

				/ POINTS TO TABLE PCK5.C ABOVE.

 

PCK5.2	0			/ TEMPORARY

	.TITLE     PCKINI -- INITIALIZE 5/7 ASCII PACKING

 

 

 

 

/

/ SUBROUTINE TO INITIALIZE ROUTINE PACK57 FOR 5/7 ASCII

/ PACKING.

/

/ CALLING SEQUENCE:

/	JMS PCKINI

/

/ REGISTERS ALTERED:

/	AC, LINK

/

/ VALUES RETURNED:

/	NONE

/

 

 

PCKINI	0

	LAC (PCK5.D)

	DAC PCK5.0		/ SET UP CHARACTER ACTION PTR.

	AXR -1			/ AND FUDGE XR.

	JMP* PCKINI

	.TITLE     PCKFIN -- FINISH 5/7 ASCII PACKING

 

 

 

 

/

/ THIS SUBROUTINE IS CALLED WHEN 5/7 ASCII PACKING IS

/ FINISHED.  IT PACKS A CARRAIGE RETURN INTO THE TEXT BUFFER

/ FOR USE AS A LINE TERMINATOR.  IT ALSO ADJUST THE XR BACK

/ TO A WORD PAIR BOUNDARY.

/

/ CALLING SEQUENCE:

/	JMS PCKFIN

/

/ REGISTERS ALTERED:

/	XR, AC, LINK, SC (STEP-COUNTER)

/

/ VALUES RETURNED:

/	NONE (EXCEPT COMPLETED TEXT BUFFER)

/

 

 

PCKFIN	0

	LAC (15)		/ PACK CARRAIGE RETURN LINE

	JMS PACK57		/ TERMINATOR.

	PXA

	AND (777776)

	PAX

	JMP* PCKFIN

	.TITLE     PCKSXBT -- PACK .SIXBT CHARACTERS

 

 

 

 

/

/ THIS SUBROUTINE ACCEPTS A WORD IN THE AC CONTAINING

/ THREE .SIXBT CHARACTERS.  THE CHARACTERS ARE PACKED

/ USING SUBROUTINE PACK57.

/

/ NULL CHARACTERS (ZEROS) ARE PACKED AS "@".

/

/

/ CALLING SEQUENCE:

/	LAC (.SIXBT STRING)

/	JMS PCKSXBT

/

/ REGISTERS ALTERED:

/	XR, AC, LINK, MQ, SC

/

/ VALUES RETURNED:

/	NONE

/

 

 

PCKSXBT	0

	LMQ			/ .SIXBT STRING TO MQ

	LAW -3

	DAC PCKS.0		/ SAVE CHAR. COUNT IN TEMPORARY.

PCKS.A	CLA!CLL			/ SET UP FOR SHIFT.

	LLS+6			/ SHIFT IN NEXT .SIXBT CHAR.

	XOR (40)		/ ELSE CONVERT .SIXBT TO ASCII.

	AAC 40

	JMS PACK57		/ PACK THE CHARACTER.

	ISZ PCKS.0		/ CHECK CHARACTER COUNT.

	JMP PCKS.A		/ AND LOOP,

	JMP* PCKSXBT		/ OR RETURN.

 

 

PCKS.0	0			/ TEMPORARY TO HOLD

				/ CHARACTER COUNT.

 

 

 

	.END
