        .TITLE BOXW
/ THIS SUBROUTINE, CREATED ON SEPTEMBER 5, 1972,
/ BY GORD SAVAGE, IS WATRAN CALLABLE.  CALLED ONLY
/ ONCE AT THE BEGINNING OF A WATRAN PROGRAM, THE
/ INTEGER VALUE OF THE BUTTON PRESSED ON THE FUNCTION 
/ BOX, IS RETURNED TO THE AND/OR THE INTERRUPT BUTTON,
/ PROGRAM BY THE TWO ARGUEMENTS.
/
/ CALLING SEQUENCE:
/
/	-----
/	CALL BOX(NUM,INT)
/	-----
/	-----
/	INT=+1
/	NUM=-1
/	-----
/	-----
/ C IN THE NEXT LINE, THE PROGRAM WILL WAIT UNTIL
/ C A BUTTON WAS PRESSED, WHICH WILL CHANGE THE 
/ C NUM=-1 TO NUM EQUAL TO SOME INTEGER NUMBER BETWEEN
/ C 1 AND 0, AND / OR THE INTERRUPT BUTTON WILL
/ C CHANGE FROM +1 TO -1 IF PRESSED.
/	-----
/  10	IF(NUM.EQ.-1.AND.INT.EQ.+1)GOTO 10
/	-----
/ C AT THIS POINT A NEW VALUE FOR NUM AND/OR INT EXISTS
/ 
/ THE LOOPING CAN BE REPEATED AS MANY TIMES AS DESIRED WITHOUT
/ RECALLING BOX.
/
/			DOCUMENTED AND PLACED ON LIBRARY
/			DUMP TAPE ON APRIL 14,1974 BY
/			PETER R. ZACHARKIW
/
/             CHANGED FOR USE WITH WATRAN
/             AND PLACED ON LIBRARY DUMP
/             TAPE ON APRIL 19,1975 BY
/
/             STEPHEN "THE MINK"  JOHNS
/             FOR A GOOD TIME CALL 886-2657
/
/
        .GLOBL BOXW,.ARG
BOXW    XX
        JMS*    .ARG
        JMP     .+3
NUM     0
INT     0
/
/ SET UP INTERRUPT HANDLING
/
TOP     CAL
        16
        701401
        NUMBER
/
        CAL
        16
        701601
        BINT
/
        DBK
EXIT    XCT     (JMP* BOXW
/
NUMBER  DAC     ACSAVE  /SAVE PC, ETC
        LAC*    (0
        DAC     OUTAD
        701412
        DAC*    NUM
        SAD     (12
        DZM*    NUM
        701404
        JMP     END
/
BINT    DAC     ACSAVE
        LAC*    (0
        DAC     OUTAD
        LAW     -1
        DAC*    INT
        701602       /CLEAR FLAG
/
END     LAC     ACSAVE
        ION
        DBR
        JMP*    OUTAD
ACSAVE  0
OUTAD   0
        .END
