RSXDIO	MACRO M1110  22-AUG-78 01:56

TABLE OF CONTENTS



     1-   32	GET A CHARACTER

     1-   57	SET UP FOR RSX INPUT

     1-   73	TERMINATE RSX INPUT MODE

     1-   90	CONNECT TERMINAL FOR NORMAL I/O

     1-  105	EXIT FROM EDITOR

RSXDIO	MACRO M1110  22-AUG-78 01:56  PAGE 1





      1						.TITLE	RSXDIO

      2						.IDENT	/000004/

      3

      4					; COPYRIGHT (C) 1977,

      5					; DIGITAL EQUIPMENT CORPORATION, MAYNARD, MASS.

      6					;

      7					; THIS SOFTWARE IS  FURNISHED  UNDER A LICENSE  FOR USE ONLY ON A

      8					; SINGLE  COMPUTER  SYSTEM  AND  MAY  BE  COPIED  ONLY  WITH  THE

      9					; INCLUSION OF THE ABOVE  COPYRIGHT NOTICE. THIS SOFTWARE, OR ANY

     10					; OTHER  COPIES  THEREOF,  MAY NOT BE PROVIDED  OR OTHERWISE MADE

     11					; AVAILABLE TO ANY OTHER PERSON EXCEPT FOR USE ON SUCH SYSTEM AND

     12					; TO  ONE  WHO  AGREES  TO  THESE  LICENSE  TERMS.  TITLE TO  AND

     13					; OWNERSHIP OF THE SOFTWARE SHALL AT ALL TIMES REMAIN IN DEC.

     14					;

     15					; THE INFORMATION IN  THIS SOFTWARE IS  SUBJECT TO CHANGE WITHOUT

     16					; NOTICE AND SHOULD NOT  BE CONSTRUED AS  A COMMITMENT BY DIGITAL

     17					; EQUIPMENT CORPORATION.

     18					;

     19					; DEC ASSUMES  NO  RESPONSIBILITY  FOR  THE  USE  OR  RELIABILITY

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

     21					;

     22					; WRITTEN BY

     23					;	D. KNIGHT

     24					;

     25					; MODULE FUNCTION

     26					;	COMMAND I/O MODULE RSX SUBSECTION

     27

     28	000000					.PSECT

     29

     30						.MCALL	EXIT$S,EXST$S

     31

     32						.SBTTL	GET A CHARACTER

     33					;

     34					; FUNCTION

     35					;	GET A SINGLE CHARACTER FROM THE TYPEIN BUFFER.  IF

     36					;	NO CHARACTER EXISTS, WAIT FOR ONE.

     37					;

     38					; INPUTS

     39					;	NONE.

     40					;

     41					; OUTPUTS

     42					;	VALUE - CHARACTER FOUND

     43					;

     44					; REGISTERS CHANGED

     45					;	R0.

     46					;

     47	000000				GRCHAR::

     48	000000	004167 	000000G			JSR	R1,$SAV5

     49	000004	012704 	000000G			MOV	#ICDPB,R4	; GET DPB

     50	000010	012705 	000000G			MOV	#ICBUF,R5	; BUFFER ADDRESS

     51	000014	012703 	000001 			MOV	#1,R3		; LENGTH IS ONE

     52	000020	004767 	000000G			CALL	TRMIO		; GET THE CHARACTER

     53	000024	116700 	000000G			MOVB	ICBUF,R0	; GET THE RETURN VALUE

     54	000030	042700 	177600 			BIC	#^C177,R0	; CLEAR UNNEEDED BITS

     55	000034	000207 				RETURN			; AND GO AWAY HAPPY

     56

     57						.SBTTL	SET UP FOR RSX INPUT

RSXDIO	MACRO M1110  22-AUG-78 01:56  PAGE 1-1

SET UP FOR RSX INPUT



     58					;

     59					; FUNCTION

     60					;

     61					; INPUTS

     62					;	NONE.

     63					;

     64					; OUTPUTS

     65					;	VALUE - NONE.

     66					;

     67					; REGISTERS CHANGED.

     68					;	R0.

     69					;

     70	000036				IOSTRT::

     71	000036	000207 				RETURN			; NOTHING TO DO HERE

     72

     73						.SBTTL	TERMINATE RSX INPUT MODE

     74					;

     75					; FUNCTION

     76					;	TERMINATE RSX INPUT FOR CHANGE COMMAND

     77					;

     78					; INPUTS

     79					;	NONE.

     80					;

     81					; OUTPUTS

     82					;	VALUE - NONE.

     83					;

     84					; REGISTERS CHANGED

     85					;	NONE.

     86					;

     87	000040				IOEND::

     88	000040	000207 				RETURN			; NOTHING HERE

     89

     90						.SBTTL	CONNECT TERMINAL FOR NORMAL I/O

     91					;

     92					; FUNCTION

     93					;	DO INITIAL SETUP FOR TERMINAL WHICH IS SYSTEM DEPENDENT

     94					;

     95					; INPUTS

     96					;	NONE.

     97					;

     98					; OUTPUTS

     99					;	VALUE - NONE.

    100					;

    101	000042				TSTART::

    102	000042	004767 	000000G			CALL	ATTACH		;ATTACH THE TERMINAL

    103	000046	000167 	000000G			JMP	ENDLIN		;PUT OUT AN EXPLICIT EOL

    104

    105						.SBTTL	EXIT FROM EDITOR

    106					;

    107					; FUNCTION

    108					;	EXIT FROM EDITOR

    109					;

    110					; INPUTS

    111					;	EXIT STATUS

    112					;

    113					; OUTPUTS

    114					;	VALUE - NONE.

RSXDIO	MACRO M1110  22-AUG-78 01:56  PAGE 1-2

EXIT FROM EDITOR



    115					;

    116					; REGISTERS CHANGED.

    117					;	NONE.

    118					;

    119	000052	004767 	000000G		FIN::	CALL	DETACH		;DETACH TERMINAL

    120	000056					EXST$S	EXITST		;EXIT WITH STATUS

    121	000070					EXIT$S			;IF IT FAILS, DO NORMAL EXIT

    122

    123		000001 				.END

RSXDIO	MACRO M1110  22-AUG-78 01:56  PAGE 1-3

SYMBOL TABLE



ATTACH= ****** GX	EX$ERR= 000002   	FIN     000052RG 	IOEND   000040RG 	TSTART  000042RG

DETACH= ****** GX	EX$SEV= 000004   	GRCHAR  000000RG 	IOSTRT  000036RG 	$SAV5 = ****** GX

ENDLIN= ****** GX	EX$SUC= 000001   	ICBUF = ****** GX	TRMIO = ****** GX	$$$OST= 000005

EXITST= ****** GX	EX$WAR= 000000   	ICDPB = ****** GX



. ABS.	000000	   000

      	000076	   001

ERRORS DETECTED:  0



VIRTUAL MEMORY USED:  606 WORDS  ( 3 PAGES)

DYNAMIC MEMORY:  2772 WORDS  ( 10 PAGES)

ELAPSED TIME:  00:00:04

OBJ$:RSXDIO,LIS$:RSXDIO/-SP=SRC$:RSXDIO

