	.TITLE     ***  BDMSSG -- FORMAT LOGIN/LOGOFF MESSAGES

 

 

 

 

/

/ 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 AND EDIT HISTORY

 

 

 

 

/

/ BDMSSG

/

/ THIS OVERLAY COMPLETES THE INITIALIZATION FOR A JOB'S

/ EXECUTION.  BDMSSG FORMATS MOST OF THE MESSAGES WHICH

/ ARE USED AS PART OF THE LOGIN AND LOGOFF SEQUENCES.

/

/ THIS OVERLAY IS ENTERED, FROM BDOPEN, WITH THE NAME OF

/ THE LISTING DEVICE (EITHER "TT" OR "LP") RIGHT-JUSTIFIED

/ IN THE AC IN .SIXBT.  THE HIGH SIX BITS OF THE AC ARE ZERO.

/

 

 

 

 

/

/ 100	20-AUG-76 (EAG)		INITIAL VERSION FOR MULTIACCESS

/				BATCH.

/

	.TITLE MISCELLANEOUS ASSEMBLY CONSTANTS & MACROS

 

 

 

 

/

/ NOTE:  THIS PROGRAM USES NO ASSEMBLY PARAMETERS.  ALL

/	 PARAMETERIZED VALUES ARE OBTAINED FROM THE

/	 RESIDENT SECTION VIA INITIALIZATION CODE.

/

 

 

 

ASS=012323			/ .SIXBT "ASS".  USED AS NAME

				/ OF TDV ASSIGN COMMAND.

 

 

 

/

/ INDIRECT-INDEXED INSTRUCTION MNEMONICS:

/

 

LACIX=LAC* X

 

 

 

/

/ DEFINE DEBUGGING AID MACRO:

/

 

	.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 REFERENCES TO EXECUTIVE'S SCOM AREA

 

 

 

 

 

 

/

/ POINTERS TO I/O TABLES INDEXED BY LUN NUMBER:

/

 

LUTP1=142			/ POINTER TO LUT (LOGICAL

				/ UNIT TABLE).

 

 

 

/

/ TIME VALUES:

/

 

SSM=160				/ SECONDS SINCE MIDNIGHT.

 

MO=166				/ CURRENT MONTH (1 = JANUARY)



DA=167				/ CURRENT DAY (WITHIN MONTH)



YR=170				/ CURRENT YEAR (0 = 1900)

	.TITLE NODE FORMAT DEFINITIONS

 

 

 

 

/

/ REFERENCES TO PDVL NODES:

/

 

D.N1=2				/ DEVICE NAME.

D.UN=5				/ DEVICE UNIT NUMBER.

	.TITLE REFERENCES TO BDRES AND OTHER BATCH OVERLAYS

 

 

 

 

/

/ DEFINE ENTRY POINT TO THIS OVERLAY:

/

 

	.GLOBL BDMSSG

 

 

 

/

/ DEFINE ENTRY POINT TO BATCH OVERLAY WHICH

/ THIS OVERLAY EXITS TO.

/

 

	.GLOBL BDSTRT

 

 

 

/

/ DEFINE ENTRY POINT TO BATCH SYSTEM ERROR PROCESSOR:

/

 

	.GLOBL BDABRT

 

 

 

/

/ DEFINE REFERENCES TO CURRENT JOB NODE IMAGE (PRIMARY NODE):

/

 

	.GLOBL JBNAM1		/ FIRST WORD OF JOB NAME.

 

	.GLOBL JBNAM2		/ SECOND WORD OF JOB NAME.

 

	.GLOBL JBID		/ JOB ID OR SEQUENCE NUMBER.

 

	.GLOBL JBFLGS		/ JOB FLAGS WORD. (SEE BELOW)

 

	.GLOBL JBPARM		/ JOB PARAMETERS.  (SEE BELOW)

 

	.GLOBL JBDATE		/ DATE OF JOB SUBMITTAL.

 

	.GLOBL JBSSM		/ TIME (SSM) OF JOB SUBMITTAL.

 

 

 

/

/ DEFINE REFERENCES TO CURRENT JOB NODE IMAGE (SECONDARY NODE):

/

 

	.GLOBL INDVU		/ INPUT DEVICE AND UNIT.

 

	.GLOBL INUFD		/ INPUT UFD.

 

	.GLOBL LSTDVU		/ LISTING DEVICE AND UNIT.

 

	.GLOBL LSTUFD		/ LISTING UFD.

 

	.GLOBL LGNDVU		/ LOGIN DEVICE AND UNIT.

 

	.GLOBL LGNUFD		/ LOGIN UFD.

 

 

 

/

/ DEFINE BIT MASKS WITHIN JOB FLAGS WORD (JBFLGS):

/

 

UFDFLG=002000			/ EXPLICIT LOGIN DEVICE/UFD

				/ SPECIFIED.

 

TIMMSK=001777			/ TIME ESTIMATE.

 

 

 

/

/ DEFINE BIT MASKS WITHIN JOB PARAMETERS WORD (JBPARM):

/

 

CLSMSK=700000			/ JOB CLASS.

 

MEMMSK=000177			/ MEMORY REQUIREMENT.

 

 

 

/

/ DEFINE BIT MASKS WITHIN DATE OF JOB SUBMITTAL (JBDATE):

/

 

YRMSK=777000			/ YEAR (ZERO=1900)

 

MOMSK=000740			/ MONTH

 

DAMSK=000037			/ DAY

 

 

 

/

/ DEFINE REFERENCES TO ASSIGN COMMAND LINES IN RESIDENT:

/

 

	.GLOBL ASS4OPR		/ LUN 4 TO OPERATOR TTY.

 

	.GLOBL ASS13ACCT	/ LUN 13 TO ACCOUNTING FILE.

 

	.GLOBL ASSLP		/ LUNS 4, 13, AND 16 TO

				/ LISTING DEVICE.

 

 

 

/

/ DEFINE REFERENCES TO OTHER TEXT BUFFERS IN RESIDENT:

/

 

	.GLOBL LGNMSG		/ LOGIN MESSAGE, SPECIFYING

				/ LOGIN DEVICE, UNIT, & UFD.

 

	.GLOBL QJBINF		/ TEXT BUFFER CONTAINING INFO.

				/ FROM JOB QUEUE NODE.

 

 

 

/

/ REFERENCES TO WORDS CONTAINING LUN NUMBERS:

/

 

	.GLOBL TT.LUN		/ OPERATOR TTY LUN.

 

 

 

/

/ REFERENCES TO OTHER WORDS IN RESIDENT:

/

 

	.GLOBL ACTDEV		/ WORD CONTAINING DEVICE

				/ NAME AND UNIT NUMBER OF

				/ DEVICE CONTAINING ACCOUNT-

				/ ING FILE.  DEVICE NAME IS

				/ IN HIGH 12 BITS IN .SIXBT,

				/ UNIT NUMBER IS IN BINARY

				/ IN LOW 6 BITS.

 

	.GLOBL ACTUFD		/ WORD CONTAINING THREE CHAR-

				/ ACTER UFD NAME OF UFD CON-

				/ TAINING ACCOUNTING FILE.

				/ NAME IS IN .SIXBT.

	.TITLE BDMSSG MAIN ENTRY POINT

 

 

 

 

/

/ COME HERE WITH LISTING DEVICE NAME IN .SIXBT IN LOW

/ 12 BITS OF AC; THE HIGH SIX BITS ARE ZERO.  WHEN WE GET

/ HERE, THE JOB QUEUE NODE IMAGE IN THE RESIDENT SECTION

/ CONTAINS THE JOB TO BE RUN, AND LISTING AND INPUT DEVICES

/ HAVE BEEN ASSIGNED AND THEIR FILES OPENED.

/

 

 

BDMSSG	0

	.DEBUG <"BDMSSG ENTERED.  LISTING DEVICE = ">,-1,70

	JMP ASSMSG		/ GO FORMAT ASSIGN MESSAGES.

	.TITLE ASSMSG -- FORMAT ASSIGN MESSAGES

 

 

 

 

/

/ THIS ROUTINE FORMATS THE MESSAGES WHICH ARE SENT TO TDV

/ TO ASSIGN DEVICES TO VARIOUS LUNS.  THE MESSAGES ARE:

/

/	ASSLP		ASSIGN LISTING DEVICE TO LUNS 4,

/			13, AND 16.

/

/	ASS4OPR		ASSIGN OPERATOR'S TTY TO LUN 4.

/

/	ASS13ACCT	ASSIGN ACCOUNTING FILE DEVICE/UFD

/			TO LUN 13.

/

/ ALL MESSAGES RESIDE WITHIN THE RESIDENT SECTION AND ARE

/ REFERRED TO BY GLOBAL SYMBOLS WITH THE ABOVE NAMES.

/

/ THE MESSAGE WHICH ASSIGNS THE LISTING DEVICE ASSIGNS

/ EITHER "TT" OR "LP" AS THE DEVICE.  "LP" IS USED AS

/ THE DEFAULT WHEN NO LISTING DEVICE IS SPECIFIED.  "TT" IS

/ USED WHENEVER A LISTING DEVICE IS SPECIFIED.  THIS CAUSES

/ LISTING OUTPUT TO BE SENT TO THE BATCH HANDLER (BDMAIN),

/ WHICH PASSES IT ON TO THE LISTING DEVICE.

/

/ THIS ROUTINE IS ENTERED WITH THE NAME OF THE LISTING

/ DEVICE (EITHER "TT" OR "LP") RIGHT-JUSTIFIED IN THE AC

/ IN .SIXBT.  THE HIGH SIX BITS OF THE AC ARE ZERO.

/

 

 

ASSMSG	DAC ASSM.0		/ SAVE LISTING DEVICE NAME.

/

	LAC ASSLP		/ FORMAT ASSLP MESSAGE AS:

	JMS PCKINI		/

	LAC (ASS)		/	"ASS 4,13,16 LP"

	JMS PCKSXBT		/

	  -4			/ OR AS:

	LAC (645461)		/

	JMS PCKSXBT		/	"ASS 4,13,16 TT"

	  -3

	LAC (635461)

	JMS PCKSXBT

	  -3

	LAC (66)

	JMS PACK57

	LAC ASSM.0

	JMS PCKSXBT

	  -3

	JMS PCKFIN

	.DEBUG <"BDMSSG:ASSMSG -- ASSLP:"<11>>,ASSLP,51

/

	LAW -1			/ POINT XR TO PDVL NODE FOR

	TAD* TT.LUN		/ OPERATOR TTY.

	TAD* (LUTP1)

	PAX

	LACIX (0)

	SNA!CLL

	JMP ASSM.A		/ JMP IF NONE -- SYSTEM ERROR.

	PAX

/

	LAC ASS4OPR		/ FORMAT ASS4OPR MESSAGE AS:

	JMS PCKINI		/

	LAC (ASS)		/	"ASS 4 TTNN"

	JMS PCKSXBT		/

	  -4			/ WHERE TT IS THE DEVICE NAME

	LAC (4)			/ (ALMOST ALWAYS "TT") AND NN

	JMS PCKZSP		/ IS THE UNIT NUMBER.

	LAC (40)

	JMS PACK57

	LACIX (D.N1)		/ EXTRACT NAME FROM PDVL NODE.

	JMS PCKSXBT

	  -2

	LACIX (D.UN)		/ EXTRACT UNIT FROM PDVL NODE.

	JMS PCKZSP

	JMS PCKFIN

	.DEBUG <<11><11>"ASS4OPR:"<11>>,ASS4OPR,51

/

	LAC ASS13ACCT		/ FORMAT ASS13ACCT MESSAGE AS:

	JMS PCKINI		/

	LAC (ASS)		/	"ASS 13 DDUU <UFD>"

	JMS PCKSXBT		/

	  -4			/ WHERE DDUU IS THE DEVICE

	LAC (15)		/ NAME AND UNIT (TAKEN FROM

	JMS PCKZSP		/ LOCATION ACTDEV) AND UFD IS

	LAC (40)		/ THE UFD NAME (TAKEN FROM

	JMS PACK57		/ LOCATION ACTUFD).

	LAC* ACTDEV

	JMS PCKSXBT

	  -2

	LAC* ACTDEV

	AND (77)

	JMS PCKZSP

	LAC (007400)

	JMS PCKSXBT

	  -2

	LAC* ACTUFD

	JMS PCKSXBT

	  -3

	LAC (76)

	JMS PACK57

	JMS PCKFIN

	.DEBUG <<11><11>"ASS13ACCT:"<11>>,ASS13ACCT,51

/

	JMP QJBMSG		/ GO FORMAT OTHER MESSAGES.

 

 

/ COME HERE IF LUN FOR OPERATOR'S TTY (TT.LUN) IS ASSIGNED

/ TO NONE.

 

ASSM.A	LAW -401			/ FATAL SYSTEM ERROR.

	JMS* BDABRT

 

 

 

ASSM.0	0			/ TEMPORARY TO SAVE LISTING

				/ DEVICE NAME.

	.TITLE QJBMSG -- FORMAT QJBINF MESSAGE

 

 

 

 

/

/ COME HERE TO FORMAT QJBINF MESSAGE FROM JOB QUEUE NODE

/ IMAGE IN RESIDENT SECTION.

/

 

 

QJBMSG	LAC QJBINF		/ INITIALIZE 5/7 PACKER.

	JMS PCKINI

/

	LAC* (DA)		/ SAVE CURRENT DATE.

	DAC QJBM.0

/

	LAC* (YR)		/ PACK CURRENT DATE -- YEAR,

	JMS PCKNUM

	  -3

/

	LAC* (MO)		/ MONTH,

	JMS PCKNUM

	  -2

/

	LAC* (DA)		/ AND DAY.

	JMS PCKNUM

	  -2

/

	LAC* (SSM)		/ PACK CURRENT TIME (SSM).

	JMS PCKNUM

	  -5

/

	LAC* (DA)		/ HAS DATE CHANGED?

	SAD QJBM.0

	SKP			/ SKIP IF IT HASN'T.

	JMP QJBMSG		/ JMP IF DATE HAS CHANGED WHILE

				/ WE WERE PACKING DATE/TIME --

				/ MUST TRY AGAIN TO ENSURE

				/ CONSISTENT TIME AND DATE.

/

	LAC* JBNAM1		/ PACK NAME OF JOB FILE.

	JMS PCKSXBT

	  -3

	LAC* JBNAM2

	JMS PCKSXBT

	  -3

/

	LAC* JBID		/ PACK JOB ID.

	JMS PCKNUM

	  -6

/

	LAW -10			/ SET UP COUNT TO PACK JOB

	DAC QJBM.0		/ FLAGS.

	LAC* JBFLGS		/ GET JOB FLAGS WORD TO MQ.

	LMQ

/

QJBM.B	CLAC!LLS+1		/ PACK NEXT JOB FLAG.

	SNA!CLA

	AAC 106-124		/ FLAG CLEAR ==> PACK "F"

	AAC 124			/ FLAG SET ==> PACK "T"

	JMS PACK57

	ISZ QJBM.0		/ DONE WITH ALL FLAGS?

	JMP QJBM.B		/ NO -- LOOP FOR MORE.

/

	LAC* JBFLGS		/ PACK JOB TIME ESTIMATE.

	AND (TIMMSK)

	JMS PCKNUM

	  -4

/

	LAC* JBPARM		/ PACK JOB CLASS

	AND (CLSMSK)

	CLL!RTL

	RTL

	JMS PCKNUM

	  -1

/

	LAC* JBPARM		/ PACK MEMORY SIZE

	AND (MEMMSK)

	JMS PCKNUM

	  -3

/

	LAC* JBDATE		/ PACK DATE OF JOB SUBMITTAL

	AND (YRMSK)		/ YEAR,

	SWHA

	JMS PCKNUM

	  -3

/

	LAC* JBDATE		/ MONTH,

	AND (MOMSK)

	LRSS+5

	JMS PCKNUM

	  -2

/

	LAC* JBDATE		/ AND DAY.

	AND (DAMSK)

	JMS PCKNUM

	  -2

/

	LAC* JBSSM		/ PACK TIME OF JOB SUBMITTAL.

	JMS PCKNUM

	  -5

/

	LAC* INDVU		/ PACK JOB FILE INPUT DEVICE,

	JMS PCKSXBT

	  -2

/

	LAC* INDVU		/ UNIT,

	AND (77)

	JMS PCKNUM

	  -2

/

	LAC* INUFD		/ AND UFD.

	JMS PCKSXBT

	  -3

/

	LAC* LSTDVU		/ PACK LISTING OUTPUT DEVICE,

	JMS PCKSXBT

	  -2

/

	LAC* LSTDVU		/ UNIT,

	AND (77)

	JMS PCKNUM

	  -2

/

	LAC* LSTUFD		/ AND UFD.

	JMS PCKSXBT

	  -3

/

	LAC* LGNDVU		/ PACK LOGIN DEVICE,

	JMS PCKSXBT

	  -2

/

	LAC* LGNDVU		/ UNIT,

	AND (77)

	JMS PCKNUM

	  -2

/

	LAC* LGNUFD		/ AND UFD.

	JMS PCKSXBT

	  -3

/

	JMS PCKFIN		/ FINISH UP IOPS ASCII TEXT

				/ BUFFER.

/

	.DEBUG <"BDMSSG:QJBMSG -- QJBINF:"<11>>,QJBINF,51

/

	JMP LGNLIN		/ GO FORMAT LOGIN LINE.

 

 

 

QJBM.0	0			/ TEMPORARY

	.TITLE LGNLIN -- FORMAT LOGIN MESSAGE

 

 

 

 

/

/ COME HERE TO FORMAT THE ONE LINE LOGIN MESSAGE, USED

/ TO SPECIFY THE LOGIN DISK AND UFD.  IF BIT UFDFLG IS

/ SET IN JBFLGS, THE LOGIN DISK, UNIT, AND UFD ARE TAKEN

/ FROM LGNDVU AND LGNUFD.  IF THE BIT IS CLEAR, INDVU

/ AND INUFD ARE USED.

/

 

 

LGNLIN	LAC LGNMSG		/ INITIALIZE 5/7 PACKER

	JMS PCKINI		/ TO PACK LOGIN MESSAGE.

	LAC* JBFLGS		/ CHECK WHICH DEVICE SPEC.

	AND (UFDFLG)		/ TO USE.

	SNA			/ SKIP IF LGNDVU & LGNUFD.

	JMP LGNL.A		/ JMP IF INDVU & INUFD.

	LAC* LGNUFD		/ USE LGNDVU & LGNUFD.

	DAC LGNL.0		/ SAVE UFD, GET DEVICE

	LAC* LGNDVU		/ AND UNIT IN AC.

	JMP LGNL.B

 

 

/ COME HERE IF INDVU & INUFD ARE TO BE USED.

 

LGNL.A	LAC* INUFD		/ SAVE UFD, THEN

	DAC LGNL.0		/ GET DEVICE AND

	LAC* INDVU		/ UNIT IN AC.

/ COME HERE WITH UFD IN LGNL.0 AND DEVICE/UNIT IN AC.

LGNL.B	SNA			/ USE DEFAULT DEVICE/UNIT?

	JMP LGNL.C		/ JMP IF YES.

	DAC LGNL.1		/ NO -- SAVE DEVICE/UNIT.

	JMS PCKSXBT		/ PACK TWO LETTER DEVICE NAME.

	  -2

	LAC LGNL.1		/ PACK DEVICE UNIT NUMBER.

	AND (77)

	JMS PCKZSP

/ COME HERE TO PACK UFD NAME AFTER DEVICE NAME & UNIT ARE DONE.

LGNL.C	LAC LGNL.0		/ CHECK FOR NULL UFD NAME.

	SNA!CLA			/ SKIP IF NOT NULL.

	JMP LGNL.D		/ JMP IF NULL -- USE DEFAULT.

	AAC 74			/ PACK "<"

	JMS PACK57

	LAC LGNL.0		/ PACK UFD NAME.

	JMS PCKSXBT

	  -3

	LAC (76)		/ PACK ">"

	JMS PACK57

LGNL.D	JMS PCKFIN		/ TERMINATE MESSAGE.

	.DEBUG <"BDMSSG:LGNLIN -- LGNMSG:"<11>>,LGNMSG,51

/ DONE WITH THIS OVERLAY -- GO TO BDSTRT!

	JMS* BDSTRT

 

 

LGNL.0	0			/ PLACE TO SAVE UFD NAME.

 

LGNL.1	0			/ PLACE TO SAVE DEVICE/UNIT.

	.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 AND SET UP

/ THE WORD PAIR COUNT.

/

/ 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:

/	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* PCK5.1		/ MERGE CHAR. INTO WORD.

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

PCK5.B	DAC* PCK5.1		/ 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	ISZ PCK5.1		/ BUMP WORD POINTER

	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* PCK5.1		/ MERGE INTO WORD.

	DAC* PCK5.1

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

	DAC PCK5.0

	ISZ PCK5.1		/ BUMP WORD POINTER.

	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.1	-1			/ WORD POINTER.  POINTS TO WORD

				/ CONTAINING THE LAST (LOW-

				/ ORDER) BIT OF LAST CHARACTER

				/ INSERTED.

 

PCK5.2	0			/ TEMPORARY

 

PCK5.3	-1			/ BUFFER POINTER.  POINTS TO

				/ LINE BUFFER HEADER WORD.

				/ USED BY PCKFIN.

	.TITLE     PCKINI -- INITIALIZE 5/7 ASCII PACKING

 

 

 

 

/

/ SUBROUTINE TO INITIALIZE ROUTINE PACK57 FOR 5/7 ASCII

/ PACKING.  CALL WITH ADDRESS OF LINE BUFFER HEADER IN

/ AC.  NOTE THAT A TWO WORD LINE BUFFER HEADER (AS IN

/ I/O BUFFERS) IS ASSUMED.

/

/ CALLING SEQUENCE:

/	LAC (LINE BUFFER HEADER ADDRESS)

/	JMS PCKINI

/

/ REGISTERS ALTERED:

/	AC, LINK

/

/ VALUES RETURNED:

/	NONE

/

 

 

PCKINI	0

	DAC PCK5.3		/ STORE BUFFER POINTER.

	IAC

	DAC PCK5.1		/ AND WORD POINTER.

	LAC (PCK5.D)

	DAC PCK5.0		/ SET UP CHARACTER ACTION PTR.

	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.  THEN IT CALCULATES THE WORD

/ PAIR COUNT AND SETS THE LINE BUFFER HEADER WORD APPRO-

/ PRIATELY.  THE DATA MODE (IN THE LINE BUFFER HEADER WORD)

/ IS SET TO IOPS ASCII.

/

/ CALLING SEQUENCE:

/	JMS PCKFIN

/

/ REGISTERS ALTERED:

/	AC, LINK, SC (STEP-COUNTER)

/

/ VALUES RETURNED:

/	NONE (EXCEPT COMPLETED TEXT BUFFER)

/

 

 

PCKFIN	0

	LAC (15)		/ PACK CARRAIGE RETURN LINE

	JMS PACK57		/ TERMINATOR.

	LAC PCK5.3		/ PICK UP BUFFER ADDRESS.

	TCA

	TAD PCK5.1		/ CALCULATE WORD PAIR COUNT,

	CLL!RAR			/ POSITION IN HIGH HALF OF

	SWHA			/ WORD, THEN SET IOPS ASCII

	TAD (1002)		/ DATA MODE AND ALLOW FOR

	DAC* PCK5.3		/ HEADER WORD PAIR.

	JMP* PCKFIN

	.TITLE     PCKSXBT -- PACK .SIXBT CHARACTERS

 

 

 

 

/

/ THIS SUBROUTINE ACCEPTS A WORD IN THE AC CONTAINING ONE

/ TO THREE .SIXBT CHARACTERS (LEFT-JUSTIFIED).  THE NUMBER

/ OF CHARACTERS TO PACK IS ALSO SPECIFIED.  THE SPECIFIED

/ NUMBER OF CHARACTERS ARE PACKED USING SUBROUTINE PACK57.

/

/ NULL CHARACTERS (ZEROS) ARE PACKED AS SPACES, AS ARE ALL

/ CHARACTERS BEYOND THE FIRST THREE.  I.E., IF 5 CHAR-

/ ACTERS ARE TO BE PACKED, THE FIRST THREE WILL BE THE

/ .SIXBT CHARACTER STRING AND THE LAST TWO WILL BE SPACES.

/

/ THE CHARACTER COUNT IS SPECIFIED BY AN INSTRUCTION WHICH

/ IMMEDIATELY FOLLOWS THE JMS.  THIS INSTRUCTION SHOULD

/ LOAD THE AC WITH THE TWOS COMPLEMENT OF THE NUMBER OF

/ CHARACTERS TO PACK.  THIS WILL NORMALLY BE A LAW INSTRUC-

/ TION.

/

/ CALLING SEQUENCE:

/	LAC (.SIXBT STRING)

/	JMS PCKSXBT

/	  LAW -CHARACTER COUNT

/

/ REGISTERS ALTERED:

/	AC, LINK, MQ, SC

/

/ VALUES RETURNED:

/	NONE

/

 

 

PCKSXBT	0

	LMQ			/ .SIXBT STRING TO MQ

	XCT* PCKSXBT		/ PICK UP CHAR. COUNT.

	DAC PCKS.0		/ SAVE IN TEMPORARY.

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

	LLS+6			/ SHIFT IN NEXT .SIXBT CHAR.

	SZA			/ IF ZERO, CONVERT TO SPACE.

	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.

	.TITLE     PCKNUM -- PACK A DECIMAL NUMBER

 

 

 

 

/

/ THIS ROUTINE ACCEPTS A BINARY NUMBER AND A CHARACTER OR

/ DIGIT COUNT.  THE NUMBER IS CONVERTED TO A DECIMAL ASCII

/ STRING WITH THE APPROPRIATE NUMBER OF DIGITS, AND THE

/ DIGITS PACKED USING SUBROUTINE PACK57.  IF THE NUMBER

/ IS LARGER THAN THE SPECIFIED NUMBER OF DECIMAL DIGITS,

/ THE HIGH ORDER DIGITS ARE LOST.  LEADING ZEROS ARE PACKED

/ WITHOUT MODIFICATION.

/

/ THE BINARY NUMBER IS PASSED IN THE AC.  THE CHARACTER OR

/ DIGIT COUNT IS SPECIFIED BY AN INSTRUCTION WHICH IMMED-

/ IATELY FOLLOWS THE JMS.  THIS INSTRUCTION SHOULD LOAD THE

/ AC WITH THE TWOS COMPLEMENT OF THE DIGIT COUNT.  IT WILL

/ USUALLY BE A LAW INSTRUCTION.

/

/ CALLING SEQUENCE:

/	LAC (NUMBER)

/	JMS PCKNUM

/	  LAW -DIGIT COUNT

/

/ REGISTERS ALTERED:

/	AC, LINK, MQ, SC

/

/ VALUES RETURNED:

/	NONE

/

 

 

PCKNUM	0

	DAC PCKN.0		/ SAVE NUMBER TO BE PACKED.

	XCT* PCKNUM		/ FETCH DIGIT COUNT.

	DAC PCKN.1		/ SET UP DIGIT COUNTER.

PCKN.A	LAC PCKN.1		/ COPY DIGIT COUNTER TO

	DAC PCKN.2		/ DIVISION COUNTER.

	LAC PCKN.0		/ SET UP FOR DIVISION LOOP.

	LMQ!CLAC

PCKN.B	SLK!CLAC!DIV		/ DIVIDE NUMBER BY 10. THE

	  12			/ APPROPRIATE NUMBER OF TIMES,

	ISZ PCKN.2		/ LEAVING FINAL REMAINDER (THE

	JMP PCKN.B		/ DIGIT) IN THE AC.

	AAC 60			/ CONVERT DIGIT TO ASCII.

	JMS PACK57		/ PACK IT AWAY.

	ISZ PCKN.1		/ PACKED ALL DIGITS?

	JMP PCKN.A		/ JMP IF NOT -- LOOP FOR NEXT.

	JMP* PCKNUM		/ DONE -- RETURN.

 

 

 

PCKN.0	0			/ TEMPORARY TO SAVE NUMBER TO

				/ BE PACKED.

 

PCKN.1	0			/ DIGIT COUNTER.

 

PCKN.2	0			/ DIVISION COUNTER.

	.TITLE     PCKZSP -- PACK A ZERO SUPPRESSED NUMBER

 

 

 

 

/

/ THIS ROUTINE ACCEPTS A BINARY NUMBER AND CONVERTS IT TO

/ A DECIMAL ASCII DIGIT STRING WITH LEADING ZEROS SUPPRESSED.

/ THE DIGITS ARE PACKED USING ROUTINE PACK57.  THE BINARY

/ NUMBER IS PASSED IN THE AC.  IT IS AN UNSIGNED NUMBER

/ BETWEEN 0 AND 2**18-1, INCLUSIVE.

/

/ CALLING SEQUENCE:

/	LAC (NUMBER)

/	JMS PCKZSP

/

/ REGISTERS ALTERED:

/	AC, LINK, MQ, SC

/

/ VALUES RETURNED:

/	NONE

/

 

 

PCKZSP	0

	LMQ			/ SAVE # IN MQ FOR LATER MUL

/	SMA!TCA			/ IS NUMBER < 0 ?

/	JMP PCKZ.A		/ JMP IF NOT -- DON'T PACK "-"

/	LMQ			/ SAVE ABS. VALUE IN MQ.

/	LAW 55			/ AND PACK MINUS SIGN.

/	JMS PACK57

PCKZ.A	LAW -5			/ SET UP DIGITS-1 COUNTER.

	DAC PCKZ.0

	DZM PCKZ.1		/ AND INIT. ZERO SUPPRESSION.

	CLA!STL			/ CLEAR LINK FOR MUL AND SET

	RTR			/ AC TO "200000" (MAGIC

				/ CONSTANT).

	MUL-13000		/ AC,MQ <-- MQ * Y + AC

	  517427		/ MAGIC CONSTANT -- APPROX.

				/ 10**(-5) * 2**34

	LRS+20			/ ALIGN BINARY POINT BETWEEN

				/ AC AND MQ.

PCKZ.B	SAD PCKZ.1		/ SKIP IF NOT LEADING ZERO.

	JMP PCKZ.C		/ JMP IF LEADING ZERO -- DON'T

				/ PACK THIS DIGIT.

	AAC 60			/ CONVERT DIGIT TO ASCII.

	DAC PCKZ.1		/ CLOBBER LEADING ZERO SWITCH

	JMS PACK57		/ PACK THE DIGIT.

PCKZ.C	MUL-13000!CLAC		/ MUL TO GET NEXT DIGIT.

	  12

	ISZ PCKZ.0		/ SKIP IF LAST DIGIT.

	JMP PCKZ.B		/ JMP IF NOT LAST DIGIT --

				/ CHECK FOR LEADING ZEROS.

	AAC 60			/ LAST DIGIT -- ALWAYS PACK

	JMS PACK57		/ IT, REGARDLESS IF ZERO.

	JMP* PCKZSP		/ DONE -- RETURN.

 

 

PCKZ.0	0			/ DIGIT COUNTER.

 

PCKZ.1	1			/ LEADING ZERO SWITCH.

 

 

 

	.END
