CONIO           - CONSOLE INPUT OUTPUT ROUTINES                  21-AUG-1978 22:27:03   VAX-11 MACRO X0.3-11               Page   0

TABLE OF CONTENTS   



   (1)    5500  BOO$READPROMPT - Prompt and read input string

CONIO           - CONSOLE INPUT OUTPUT ROUTINES                  21-AUG-1978 22:27:03   VAX-11 MACRO X0.3-11               Page   1

01                                                                                                                               (1)



                                     0000   100 	.TITLE	CONIO - CONSOLE INPUT OUTPUT ROUTINES

                                     0000   200 	.IDENT	/01/

                                     0000   300 ;

                                     0000   400 ; COPYRIGHT (C) 1978

                                     0000   500 ; DIGITAL EQUIPMENT CORPORATION, MAYNARD, MASSACHUSETTS 01754

                                     0000   600 ;

                                     0000   700 ; THIS SOFTWARE IS FURNISHED  UNDER A LICENSE FOR USE ONLY ON A SINGLE

                                     0000   800 ; COMPUTER  SYSTEM AND  MAY BE  COPIED ONLY WITH  THE INCLUSION OF THE

                                     0000   900 ; ABOVE COPYRIGHT NOTICE.  THIS SOFTWARE, OR ANY OTHER COPIES THEREOF,

                                     0000  1000 ; MAY NOT BE PROVIDED OR  OTHERWISE MADE AVAILABLE TO ANY OTHER PERSON

                                     0000  1100 ; EXCEPT FOR USE ON SUCH SYSTEM AND TO ONE WHO AGREES TO THESE LICENSE

                                     0000  1200 ; TERMS.  TITLE TO AND  OWNERSHIP OF THE  SOFTWARE  SHALL AT ALL TIMES

                                     0000  1300 ; REMAIN IN DEC.

                                     0000  1400 ;

                                     0000  1500 ; THE INFORMATION IN THIS SOFTWARE IS SUBJECT TO CHANGE WITHOUT NOTICE

                                     0000  1600 ; AND SHOULD  NOT BE CONSTRUED  AS A COMMITMENT  BY DIGITAL  EQUIPMENT

                                     0000  1700 ; CORPORATION.

                                     0000  1800 ;

                                     0000  1900 ; DEC ASSUMES  NO  RESPONSIBILITY  FOR  THE USE OR  RELIABILITY OF ITS

                                     0000  2000 ; SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPLIED BY DEC.

                                     0000  2100 

                                     0000  2200 ;++

                                     0000  2300 ;

                                     0000  2400 ; Facility:  System Bootstrapping

                                     0000  2500 ;

                                     0000  2600 ; Abstract: CONIO provides basic console read,readprompt and write facilities.

                                     0000  2700 ;

                                     0000  2800 ; Environment: Mode=Kernel

                                     0000  2900 ;

                                     0000  3000 ; Author:  RICHARD I. HUSTVEDT, Creation date:  27-APR-1978

                                     0000  3100 ;

                                     0000  3200 ; Modified by:

                                     0000  3300 ;

                                     0000  3400 ;  , Version  ,

                                     0000  3500 ; 01	- 

                                     0000  3600 ;--

                                     0000  3700 

                                     0000  3800 ;

                                     0000  3900 ; Include files:

                                     0000  4000 ;

                                     0000  4005 	$PRDEF				; Define processor registers

                                     0000  4010 	$SSDEF				; Define status code values

                                     0000  4100 

                                     0000  4200 ;

                                     0000  4300 ; MACROS:

                                     0000  4400 ;

                                     0000  4500 

                                     0000  4600 ;

                                     0000  4700 ; Equated Symbols:

                                     0000  4800 ;

                                     0000  4900 ;

                           0000000D  0000  4905 	CR     = 13			; Character code for carriage return

                           0000000A  0000  4910 	LF     = 10			; Character code for line feed

                           00000015  0000  4915 	CONTROL_U = 21			; Character code for control-U

                           0000007F  0000  4920 	RUBOUT = 127			; Character code for rubout

                           00000000  0000  4925 	V_RUB  = 0			; Rubout sequence in progress

                                     0000  5000  

CONIO           - CONSOLE INPUT OUTPUT ROUTINES                  21-AUG-1978 22:27:03   VAX-11 MACRO X0.3-11               Page   2

01                                                                                                                               (1)



                                     0000  5100 ;

                                     0000  5200 ; Own Storage:

                                     0000  5300 ;

                                 00000000  5305 	.PSECT	CONIO,BYTE		;

CONIO           - CONSOLE INPUT OUTPUT ROUTINES                  21-AUG-1978 22:27:03   VAX-11 MACRO X0.3-11               Page   3

01              BOO$READPROMPT - Prompt and read input string                                                                    (1)



                                     0000  5500 	.SBTTL	BOO$READPROMPT - Prompt and read input string

                                     0000  5600 ;++

                                     0000  5700 ; Functional Description:

                                     0000  5800 ;	BOO$READPROMPT outputs the specified ASCIZ prompt string on the

                                     0000  5805 ;	console terminal then checks the count of characters to be read.

                                     0000  5810 ;	If zero it exits, otherwise it reads the console terminal until

                                     0000  5815 ;	either a carriage return is encountered or the character count

                                     0000  5820 ;	is satisfied.  The specified buffer is filled with an ASCIC

                                     0000  5825 ;	string containing the characters read but not including the

                                     0000  5830 ;	terminating carriage return.

                                     0000  5900 ;

                                     0000  6000 ; Calling Sequence:

                                     0000  6100 ;	CALLG	ARGLIST,BOO$READPROMPT

                                     0000  6200 ;

                                     0000  6300 ; Input Parameters:

                                     0000  6400 ;	PROMPT(AP)  -  Address of ASCIZ prompt string

                           00000004  0000  6500 	PROMPT	=  4

                                     0000  6600 ;

                                     0000  6700 ;	SIZE(AP)    -  Maximum length of input string

                           00000008  0000  6800 	SIZE	=  8

                                     0000  6850 ;			Note: if size is zero, then nothing is read

                                     0000  6875 ;			      and only the prompt string is written.

                                     0000  6900 ;

                                     0000  7000 ;	BUF(AP)     -  Address of input buffer

                           0000000C  0000  7100 	BUF	=  12

                                     0000  7200 ;

                                     0000  7600 ; Output Parameters:

                                     0000  7700 ;	R0 - Completion status code (always SS$_NORMAL)

                                     0000  7702 ;

                                     0000  7705 ;	Buffer located by BUF(AP) will be filled with the string

                                     0000  7710 ;	read as an ASCIC string.

                                     0000  7800 ;

                                     0000  8500 ;--

                                     0000  8600 	.LIST	MEB			; Show macro expansions

                                     0000  8605 BOO$READPROMPT::			;

                               0394  0000  8610 	.WORD	^M<R2,R4,R7,R8,R9>	;

            58         04 AC     D0  0002  8700 5$:	MOVL	PROMPT(AP),R8		; Point to prompt string

                          0089   30  0006  8800 	BSBW	OUTZSTR			; And send it to the console

            52         08 AC     D0  0009  8850 	MOVL	SIZE(AP),R2		; Maximum number of characters to read

                          6B     13  000D  8875 	BEQL	70$			; Done if nothing to read

                          54     D4  000F  8900 	CLRL	R4			; Clear flags

            59         0C AC     D0  0011  9000 	MOVL	BUF(AP),R9		; Set address of input buffer

                          89     94  0015  9050 	CLRB	(R9)+			; Initialize string count

            57            69     9E  0017  9100 	MOVAB	(R9),R7			; Remember start of buffer

            07            52     F5  001A  9150 	SOBGTR	R2,10$			; Decrement and test character count

            50            0D     9A  001D  9162 	MOVZBL	#CR,R0			; Set to send CR/LF

                          65     10  0020  9174 	BSBB	OUTCHAR			; Send CR

                          49     11  0022  9175 	BRB	60$			; End of read

            50            20     DB  0024  9200 10$:	MFPR	#PR$_RXCS,R0		; Get console status

            50            07     E1  0027  9300 	BBC	#7,R0,10$		; Wait for ready

                          F9         002A       

            58            21     DB  002B  9400 	MFPR	#PR$_RXDB,R8		; Get console character

            58         80 8F     8A  002E  9500 	BICB	#^X80,R8		; Strip parity

         7F 8F            58     91  0032  9600 	CMPB	R8,#RUBOUT		; Check for rubout

                          1F     12  0036  9700 	BNEQ	40$			; No

            54            00     E2  0038  9800 	BBSS	#V_RUB,R4,20$		; Set start of rubout sequence

                          02         003B       

CONIO           - CONSOLE INPUT OUTPUT ROUTINES                  21-AUG-1978 22:27:03   VAX-11 MACRO X0.3-11               Page   4

01              BOO$READPROMPT - Prompt and read input string                                                                    (1)



                          40     10  003C  9900 	BSBB	OUTBSLSH		; Output back slash

            58            79     9A  003E 10000 20$:	MOVZBL	-(R9),R8		; Get rubbed out character

                          08     12  0041 10100 	BNEQ	30$			; Skip increment

                          59     D6  0043 10200 	INCL	R9			; Point at start of buffer

            52         08 AC     D0  0045 10205 	MOVL	SIZE(AP),R2		; Restore size limit

                          D9     11  0049 10300 	BRB	10$			; And get another character

                          37     10  004B 10400 30$:	BSBB	OUTR8			; Output rubbed out character

                          52     D7  004D 10405 	DECL	R2			; One less character

                          D3     11  004F 10500 	BRB	10$			; And get another

            54            00     E5  0051 10600 	BBCC	#V_RUB,R4,40$		; Terminate rubout sequence

                          02         0054       

                          27     10  0055 10700 	BSBB	OUTBSLSH		; Output backslash

            58            15     91  0057 10800 40$:	CMPB	#CONTROL_U,R8		; Check for line cancel (control-U)

                          A6     13  005A 10900 	BEQL	5$			; Branch if so

            58            06     E1  005C 11000 	BBC	#6,R8,50$		; Branch if not alpha

                          03         005F       

            58            20     8A  0060 11100 	BICB	#32,R8			; Set to upper case

                                     0063 11200 50$:					;

                          1F     10  0063 11300 	BSBB	OUTR8			; Echo character

            89            58     90  0065 11400 	MOVB	R8,(R9)+		; Buffer new character

            58            0D     91  0068 11500 	CMPB	#CR,R8			; Is character a carriage return?

                          B7     12  006B 11600 	BNEQ	10$			; No,

            50            0A     9A  006D 11700 60$:	MOVZBL	#LF,R0			; Yes send line feed also

                          15     10  0070 11800 	BSBB	OUTCHAR			; Output character in R0

            59            57     C2  0072 11900 	SUBL	R7,R9			; Compute character count

                          59     D7  0075 12000 	DECL	R9			; Remove carriage return

            77            59     90  0077 12100 	MOVB	R9,-(R7)		; and form counted string

            50            01     3C  007A 12200 70$:	MOVZWL	#SS$_NORMAL,R0		; Return normal completion status

                                 04  007D 12205 	RET				;

                                     007E 12300 OUTBSLSH:				; Output back slash

            50         5C 8F     9A  007E 12400 	MOVZBL	#^A%\%,R0		; Set character code

                          03     11  0082 12500 	BRB	OUTCHAR			; And output it

            50            58     9A  0084 12600 OUTR8:	MOVZBL	R8,R0			; Get character to output

                                     0087 12700 OUTCHAR:				; Output character in R0

            51            22     DB  0087 12800 	MFPR	#PR$_TXCS,R1		; Get console transmitter status

            51            07     E1  008A 12900 	BBC	#7,R1,OUTCHAR		; Wait for ready

                          F9         008D       

            23            50     DA  008E 13000 	MTPR	R0,#PR$_TXDB		; Send character to console

                                 05  0091 13100 OUTEX:	RSB				; Return

                                     0092 13200 OUTZSTR:				; Output ASCIZ string

            50            88     9A  0092 13300 	MOVZBL	(R8)+,R0		; Get next character to output

                          FA     13  0095 13400 	BEQL	OUTEX			; Branch if at end of string

                          EE     10  0097 13500 	BSBB	OUTCHAR			; Send character

                          F7     11  0099 13600 	BRB	OUTZSTR			; Continue for all characters

                                     009B 13700 

                                     009B 13800 	.END				;

CONIO           - CONSOLE INPUT OUTPUT ROUTINES                  21-AUG-1978 22:27:03   VAX-11 MACRO X0.3-11               Page   5

SYMBOL TABLE                                                                                                                     (1)



BIT...         = 00000000            SS$_ACCONFLICT = 00000800            SS$_FCPREADERR = 00000888            

BOO$READPROMPT   00000000 RG    03   SS$_ACCVIO     = 0000000C            SS$_FCPREPSTN  = 00000988            

BUF            = 0000000C            SS$_ACPVAFUL   = 000002FC            SS$_FCPREWNDERR= 00000890            

CONTROL_U      = 00000015            SS$_ARTRES     = 00000474            SS$_FCPSPACERR = 00000898            

CR             = 0000000D            SS$_ASTFLT     = 0000040C            SS$_FCPWRITERR = 000008A0            

GBL...         = 00000000            SS$_BADATTRIB  = 00000034            SS$_FILACCERR  = 0000009C            

LF             = 0000000A            SS$_BADCHKSUM  = 00000808            SS$_FILALRACC  = 000000A4            

OUTBSLSH         0000007E R     03   SS$_BADESCAPE  = 0000003C            SS$_FILELOCKED = 000008A8            

OUTCHAR          00000087 R     03   SS$_BADFILEHDR = 00000810            SS$_FILENUMCHK = 000008B0            

OUTEX            00000091 R     03   SS$_BADFILENAME= 00000818            SS$_FILESEQCHK = 000008B8            

OUTR8            00000084 R     03   SS$_BADFILEVER = 00000820            SS$_FILESTRUCT = 000008C0            

OUTZSTR          00000092 R     03   SS$_BADIMGHDR  = 00000044            SS$_FILNOTACC  = 000000AC            

PR$_ACCR       = 00000029            SS$_BADIRECTORY= 00000828            SS$_FILNOTCNTG = 000002AC            

PR$_ACCS       = 00000028            SS$_BADPARAM   = 00000014            SS$_FILNOTEXP  = 000000B4            

PR$_ASTLVL     = 00000013            SS$_BADSTACK   = 000002B4            SS$_FLTDIV     = 00000494            

PR$_ESP        = 00000001            SS$_BEGOFFILE  = 00000938            SS$_FLTOVF     = 0000048C            

PR$_ICCS       = 00000018            SS$_BLOCKCNTERR= 00000940            SS$_FLTUND     = 0000049C            

PR$_ICR        = 0000001A            SS$_BREAK      = 00000414            SS$_FORMAT     = 000000BC            

PR$_IPL        = 00000012            SS$_BUFBYTALI  = 0000030C            SS$_GPTFULL    = 000000C4            

PR$_ISP        = 00000004            SS$_BUFFEROVF  = 00000601            SS$_GSDFULL    = 000000CC            

PR$_KSP        = 00000000            SS$_BUGCHECK   = 000002A4            SS$_HANGUP     = 000002CC            

PR$_MAPEN      = 00000038            SS$_CANCEL     = 00000830            SS$_HEADERFULL = 000008C8            

PR$_NICR       = 00000019            SS$_CHANINTLK  = 0000004C            SS$_IDXFILEFULL= 000008D0            

PR$_P0BR       = 00000008            SS$_CLIFRCEXT  = 00000980            SS$_ILLBLKNUM  = 000000DC            

PR$_P0LR       = 00000009            SS$_CMODSUPR   = 0000041C            SS$_ILLCNTRFUNC= 000000E4            

PR$_P1BR       = 0000000A            SS$_CMODUSER   = 00000424            SS$_ILLEFC     = 000000EC            

PR$_P1LR       = 0000000B            SS$_COMPAT     = 0000042C            SS$_ILLIOFUNC  = 000000F4            

PR$_PCBB       = 00000010            SS$_CONTINUE   = 00000001            SS$_ILLLBLAST  = 00000968            

PR$_PME        = 0000003D            SS$_CONTROLC   = 00000651            SS$_ILLPAGCNT  = 000000FC            

PR$_RXCS       = 00000020            SS$_CONTROLO   = 00000609            SS$_ILLSEQOP   = 000002DC            

PR$_RXDB       = 00000021            SS$_CONTROLY   = 00000611            SS$_ILLSER     = 00000104            

PR$_SBIER      = 00000034            SS$_CREATED    = 00000619            SS$_ILLUSRLBLRD= 00000958            

PR$_SBIFS      = 00000030            SS$_CTRLERR    = 00000054            SS$_ILLUSRLBLWT= 00000960            

PR$_SBIMT      = 00000033            SS$_DATACHECK  = 0000005C            SS$_INCVOLLABEL= 0000010C            

PR$_SBIQC      = 00000036            SS$_DATAOVERUN = 00000838            SS$_INSFARG    = 00000114            

PR$_SBIS       = 00000031            SS$_DEBUG      = 0000046C            SS$_INSFMEM    = 00000124            

PR$_SBISC      = 00000032            SS$_DECOVF     = 000004A4            SS$_INSFRAME   = 0000012C            

PR$_SBITA      = 00000035            SS$_DEVACTIVE  = 000002C4            SS$_INSFWSL    = 0000011C            

PR$_SBR        = 0000000C            SS$_DEVALLOC   = 00000840            SS$_INTDIV     = 00000484            

PR$_SCBB       = 00000011            SS$_DEVALRALLOC= 00000641            SS$_INTOVF     = 0000047C            

PR$_SID        = 0000003E            SS$_DEVASSIGN  = 00000848            SS$_IVADDR     = 00000134            

PR$_SIRR       = 00000014            SS$_DEVFOREIGN = 00000064            SS$_IVCHAN     = 0000013C            

PR$_SISR       = 00000015            SS$_DEVICEFULL = 00000850            SS$_IVCHNLSEC  = 0000026C            

PR$_SLR        = 0000000D            SS$_DEVMOUNT   = 0000006C            SS$_IVDEVNAM   = 00000144            

PR$_SSP        = 00000002            SS$_DEVNOTALLOC= 00000858            SS$_IVGSDNAM   = 0000014C            

PR$_TBIA       = 00000039            SS$_DEVNOTMBX  = 00000074            SS$_IVLOGNAM   = 00000154            

PR$_TBIS       = 0000003A            SS$_DEVNOTMOUNT= 0000007C            SS$_IVLOGTAB   = 0000015C            

PR$_TODR       = 0000001B            SS$_DEVOFFLINE = 00000084            SS$_IVPROTECT  = 000002F4            

PR$_TXCS       = 00000022            SS$_DIRFULL    = 00000860            SS$_IVQUOTAL   = 00000164            

PR$_TXDB       = 00000023            SS$_DRVERR     = 0000008C            SS$_IVSECFLG   = 0000016C            

PR$_USP        = 00000003            SS$_DUPFILENAME= 00000868            SS$_IVSECIDCTL = 000002E4            

PR$_WCSA       = 0000002C            SS$_DUPLNAM    = 00000094            SS$_IVSSRQ     = 00000174            

PR$_WCSD       = 0000002D            SS$_ENDOFFILE  = 00000870            SS$_IVSTSFLG   = 0000017C            

PROMPT         = 00000004            SS$_ENDOFTAPE  = 00000878            SS$_IVTIME     = 00000184            

RUBOUT         = 0000007F            SS$_ENDOFUSRLBL= 00000970            SS$_LCKPAGFUL  = 000000D4            

SIZE           = 00000008            SS$_EXQUOTA    = 0000001C            SS$_LENVIO     = 0000018C            

SS$_ABORT      = 0000002C            SS$_EXTIDXFILE = 00000880            SS$_LKWSETFUL  = 00000194            

CONIO           - CONSOLE INPUT OUTPUT ROUTINES                  21-AUG-1978 22:27:03   VAX-11 MACRO X0.3-11               Page   6

SYMBOL TABLE                                                                                                                     (1)



SS$_MBFULL     = 000008D8            SS$_TIMEOUT    = 0000022C            

SS$_MBTOOSML   = 0000019C            SS$_TOOMANYVER = 00000990            

SS$_MCHECK     = 000002BC            SS$_TOOMUCHDATA= 0000029C            

SS$_MEDOFL     = 000001A4            SS$_UNASEFC    = 00000234            

SS$_MSGNOTFND  = 00000621            SS$_UNSAFE     = 0000023C            

SS$_MTLBLLONG  = 00000304            SS$_UNWIND     = 00000920            

SS$_MUSTCLOSEFL= 00000948            SS$_UNWINDING  = 00000928            

SS$_NOAQB      = 00000314            SS$_VASFULL    = 00000244            

SS$_NODATA     = 000001AC            SS$_VECINUSE   = 0000024C            

SS$_NOHANDLER  = 000008F8            SS$_VOLINV     = 00000254            

SS$_NOHOMEBLK  = 000008E0            SS$_WAITUSRLBL = 00000950            

SS$_NOIOCHAN   = 000001B4            SS$_WASCLR     = 00000001            

SS$_NOLINKS    = 0000027C            SS$_WASECC     = 00000639            

SS$_NOLOGNAM   = 000001BC            SS$_WASSET     = 00000009            

SS$_NOMBX      = 00000274            SS$_WRITLCK    = 0000025C            

SS$_NOMOREFILES= 00000930            SS$_WRONGACP   = 0000031C            

SS$_NONEXDRV   = 000001C4            V_RUB          = 00000000            

SS$_NONEXPR    = 000008E8            

SS$_NONLOCAL   = 000008F0            

SS$_NOPRIV     = 00000024            

SS$_NORMAL     = 00000001            

SS$_NOSIGNAL   = 00000900            

SS$_NOSOLICIT  = 00000284            

SS$_NOSUCHDEV  = 00000908            

SS$_NOSUCHFILE = 00000910            

SS$_NOSUCHNODE = 0000028C            

SS$_NOSUCHSEC  = 00000978            

SS$_NOTAPEOP   = 00000264            

SS$_NOTFILEDEV = 000001CC            

SS$_NOTINTBLSZ = 000001D4            

SS$_NOTLABELMT = 000001DC            

SS$_NOTMODIFIED= 00000659            

SS$_NOTNETDEV  = 000002EC            

SS$_NOTRAN     = 00000629            

SS$_NOTSQDEV   = 000001E4            

SS$_OPCCUS     = 00000434            

SS$_OPCDEC     = 0000043C            

SS$_OPINCOMPL  = 000002D4            

SS$_PAGOWNVIO  = 000001EC            

SS$_PAGRDERR   = 00000444            

SS$_PARITY     = 000001F4            

SS$_PARTESCAPE = 000001FC            

SS$_PFMBSY     = 00000204            

SS$_PLHLDR     = 00000404            

SS$_PSTFULL    = 0000020C            

SS$_RADRMOD    = 0000044C            

SS$_REJECT     = 00000294            

SS$_REMOTE     = 00000649            

SS$_RESIGNAL   = 00000918            

SS$_RESULTOVF  = 00000214            

SS$_ROPRAND    = 00000454            

SS$_SECTBLFUL  = 0000021C            

SS$_SSFAIL     = 0000045C            

SS$_SUBRNG     = 000004AC            

SS$_SUPERSEDE  = 00000631            

SS$_TAPEPOSLOST= 00000224            

SS$_TBIT       = 00000464            

CONIO           - CONSOLE INPUT OUTPUT ROUTINES                  21-AUG-1978 22:27:03   VAX-11 MACRO X0.3-11               Page   7

PROGRAM SECTION SYNOPSIS                                                                                                         (1)







PROGRAM SECTION SYNOPSIS



.  ABS  .        00000000      00     NOPIC   USR   CON   ABS   LCL NOSHR NOEXE NORD  NOWRT BYTE  

. BLANK .        00000000      01     NOPIC   USR   CON   REL   LCL NOSHR   EXE   RD    WRT BYTE  

$ABS$            00000000      02     NOPIC   USR   CON   ABS   LCL NOSHR   EXE   RD    WRT BYTE  

CONIO            0000009B      03     NOPIC   USR   CON   REL   LCL NOSHR   EXE   RD    WRT BYTE  





THERE WERE NO ERRORS OR WARNINGS.

18648. BYTES LEFT IN FREE MEMORY POOL.

3562. BYTES OF RECLAIMED MEMORY.

OBJ$:CONIO,LIS$:CONIO/-SP=EXECML$/ML,SRC$:CONIO

2 MLB DIR RDS - 342 GETS TO DEFINE 8 MACROS. 28 INTER. FILE WRITES. 

