SOME PDP-11 BASIC-11 EXTENSION ROUTINES N. A. Bourgeois, Jr. Advanced Systems Development Division 1736 Sandia Laboratories P. O. Box 5800 Albuquerque, NM 87185 505-264-8088 FTS 475-8088 ABSTRACT Some extension routines to Digital Equipment Corporation's BASIC-11 V2 interpreter running under RT-11 V03 are described. They provide the means for reading (GET, GETB, TBIT) and writing (PUT, PUTB, SBIT) words, bytes and bits at any implemented UNIBUS address, identifying (IDEN) the extended BASIC-11 interpreter and zeroing (NULL) arrays. 79A27A This document is issued by Sandia Laboratories, operated for the United States Department of Energy by Sandia Corporation. NOTICE This document was sponsored by the United States government. Neither the United States government nor the United States Department of Energy, nor any of their employees, nor any of their contractors, subcontractors, or their employees makes any warranty, express or implied, or assumes any legal liability or responsibility for the accuracy, completeness or usefulness of any information, apparatus, product or process disclosed, or represents that its use would not infringe privately owned rights. This work was sponsored and funded by: Base and Installation Security Systems Program Office Electronic Systems Division Air Force Systems Command Hanscom Air Force Base, MA 01731 **************** * * * UNCLASSIFIED * * * **************** BASIC-11 EXTENSIONS Page 2 ACKNOWLEDGEMENT 27 Mar 79 ACKNOWLEDGEMENT The author wishes to express his appreciation to Mr. W. A. Wood of Scientific Systems Services, Incorporated, for his assistance in updating, to run under RT-11 V03, the BASIC-11 V2 extension routines described in this paper. The author's original software was written to be compatible with BASIC/RT11 V1B running under RT-11 V02 [1]. BASIC-11 EXTENSIONS Page 3 TABLE OF CONTENTS 27 Mar 79 TABLE OF CONTENTS I. Introduction 6 II. The Extension Routines 8 III. Installation 11 IV. Testing the Routines 14 A. Appendix: Miscellaneous Comments 22 B. Appendix: Flow Charts 36 References 65 Index 66 FIGURES. A-1. Pointer Map: Null Arguments 23 A-2. Pointer Map: Constants 24 A-3. Pointer Map: Undefined Variables 25 A-4. Pointer Map: Defined Variables 26 A-5. Pointer Map: One Dimension 27-28 Arrays, Undefined Elements A-6. Pointer Map: One Dimension 28-29 Arrays, Defined Elements A-7. Pointer Map: One Dimension 30-31 Arrays, Specific Elements A-8. Pointer Map: Two Dimension 31-33 Arrays, Defined Elements A-9. Pointer Map: Two Dimension 33-34 Arrays, Specific Elements BASIC-11 EXTENSIONS Page 4 TABLE OF CONTENTS 27 Mar 79 B-1. Flow Chart: GET 36-37 B-2. Flow Chart: GETB 38 B-3. Flow Chart: IDEN 39 B-4. Flow Chart: NULL 39-40 B-5. Flow Chart: PUT 40-41 B-6. Flow Chart: PUTB 42-43 B-7. Flow Chart: SBIT 44 B-8. Flow Chart: TBIT 45 B-9. Flow Chart: AG1AG2 46-47 B-10. Flow Chart: BITMSK 48 B-11. Flow Chart: DELARG 49-50 B-12. Flow Chart: DELINT 50 B-13. Flow Chart: DELOCT 51-52 B-14. Flow Chart: DELREL 53 B-15. Flow Chart: GETARG 54-55 B-16. Flow Chart: GETDSC 56 B-17. Flow Chart: GETOCT 57 B-18. Flow Chart: GETREL 58 B-19. Flow Chart: NULARY 59 B-20. Flow Chart: NULNUM 60 B-21. Flow Chart: NULOCT 61 B-22. Flow Chart: POPRGS 62 B-23. Flow Chart: PSHRGS 62 B-24. Flow Chart: TSTADR 63 B-25. Flow Chart: PSHVAL 64 BASIC-11 EXTENSIONS Page 5 TABLE OF CONTENTS 27 Mar 79 TABLES I-1. The Extension Routines 7 III-1. The DATBAS Files 11 A-1. Descriptor Words 23 BASIC-11 EXTENSIONS Page 6 INTRODUCTION 27 Mar 79 I. INTRODUCTION BASIC-11 allows the addition of assembly language routines to expand BASIC-11's capabilities. Once added to BASIC-11, such routines can be executed in immediate mode or in programs, by means of the CALL statement. The routines described in this paper permit access to any address on DEC's PDP-11 UNIBUS.* This is useful for exercising any peripheral connected to the UNIBUS especially if a handler is not present in the operating system. In fact, it is even possible to write entire handlers for non-standard peripherals such as digital voltmeters and point plotters using BASIC-11 and the CALL statement with the routines described in this paper. These routines are designed for use on any of the PDP-11 family of computers running the RT-11 V03 operating system. [2,3,4,5,6] The extension routines incorporated within the file DATBAS.MAC provide the means for reading and writing words, bytes and bits at any implemented UNIBUS address, identifying the extended BASIC-11 interpreter, and zeroing or nulling arrays. The values of the arguments may be expressed in either decimal or octal. The routines included are listed in Table I-1. * DEC, PDP and UNIBUS are registered trademarks of Digital Equipment Corporation, Maynard, MA. BASIC-11 EXTENSIONS Page 7 INTRODUCTION 27 Mar 79 GET(ARG1,ARG2) Input a word from a UNIBUS address ARG1 UNIBUS word address ARG2 Word value returned GETB(ARG1,ARG2) Input a byte from a UNIBUS address ARG1 UNIBUS byte address ARG2 Byte value returned IDEN Output identification message NULL(ARG1(),ARG2(),...) Zero array(s) ARG()'s Name(s) of array(s) PUT(ARG1,ARG2) Output a word to a UNIBUS address ARG1 Word value delivered ARG2 UNIBUS word address PUTB(ARG1,ARG2) Output a byte to a UNIBUS address ARG1 Byte value delivered ARG2 UNIBUS byte address SBIT(ARG1,ARG2,ARG3) Set or clear a bit at a UNIBUS address ARG1 Bit number ARG2 UNIBUS word address ARG3 Bit value set TBIT(ARG1,ARG2,ARG3) Test a bit at a UNIBUS address ARG1 Bit number ARG2 UNIBUS word address ARG3 Bit value returned TABLE I-1. THE EXTENSION ROUTINES BASIC-11 EXTENSIONS Page 8 THE EXTENSION ROUTINES 27 Mar 79 II. THE EXTENSION ROUTINES The "BASIC-11 Language Reference Manual" [2] and the "BASIC-11/RT-11 User's Guide" [3] describe the general use of BASIC-11 and the CALL statement. This section describes the use of the extensions of DATBAS.MAC and their associated error messages. The arguments for GET, GETB, PUT, PUTB, SBIT and TBIT may be constants, expressions, variables and/or array elements. These arguments may also be either decimal or octal. A decimal argument may be either numeric (real) or integer. An octal argument must be a string. A numeric is one or more decimal digits, either positive or negative, in which the decimal point is optional. An integer is one or more decimal digits, either positive or negative, with no decimal point. An octal string is one or more of the numeric characters excluding the "8" and "9". [2] No arguments are required with the IDEN routine. The NULL routine requires only the name(s) of the argument(s). The argument(s) may be the name(s) of numeric array(s), integer array(s) and/or string array(s). Null arguments are not allowed. Descriptions of the routines follow. The descriptions include the calling sequences, and where applicable the ranges of the arguments. Examples of the use of these routines may be seen in the section on the testing of the routines. GET Deliver the contents of the UNIBUS word address of argument one into the BASIC-11 variable named in argument two. Calling sequence: CALL GET(ARG1,ARG2) Octal Decimal ARG1 Range: 0 to 77776 0 to 32766 100000 to 177776 -32768 to -2 ARG2 Range: 100000 to 177777 -32768 to -1 0 to 77777 0 to 32767 BASIC-11 EXTENSIONS Page 9 THE EXTENSION ROUTINES 27 Mar 79 GETB Deliver the contents of the UNIBUS byte address of argument one into the BASIC-11 variable named in argument two. Calling sequence: CALL GETB(ARG1,ARG2) Octal Decimal ARG1 Range: 0 to 77777 0 to 32767 100000 t0 177777 -32768 to -1 ARG2 Range: 200 to 377 -128 to -1 0 to 177 0 to 127 IDEN Output a message identifying the extended BASIC-11 interpreter. No arguments are required. Calling sequence: CALL IDEN NULL Null or zero the array(s) named in the argument(s). The argument(s) must be the name(s) of either numeric array(s), integer array(s) and/or string array(s). Any number of arguments may be given, subject only to normal line length limitations. Calling sequence: CALL NULL(ARG1(),ARG2(),...) PUT Deposit the value of argument one at the UNIBUS word address of argument two. Calling sequence: CALL PUT(ARG1,ARG2) Octal Decimal ARG1 Range: 100000 to 177777 -32768 to -1 0 to 77777 0 to 32767 ARG2 Range: 0 to 77776 0 to 32766 100000 to 177776 -32768 to -2 PUTB Deposit the value of argument one at the UNIBUS byte address of argument two. Calling sequence: CALL PUTB(ARG1,ARG2) Octal Decimal ARG1 Range: 200 to 377 -128 to -1 0 to 177 0 to 127 ARG2 Range: 0 to 77777 0 to 32767 100000 to 177777 -32768 to -1 BASIC-11 EXTENSIONS Page 10 THE EXTENSION ROUTINES 27 Mar 79 SBIT Set the bit named in argument one at the UNIBUS word address of argument two to the value given in argument three. Calling sequence: CALL SBIT(ARG1,ARG2,ARG3) Octal Decimal ARG1 Range: 0 to 17 0 to 15 ARG2 Range: 0 to 77776 0 to 32766 100000 to 177776 -32768 to -2 ARG3 Range: 0 or 1 0 or 1 TBIT Test the bit named in argument one at the UNIBUS word address of argument two. The result is returned in the variable named in argument three. If the bit tested is clear then ARG3=0, and if set ARG3=1. Calling sequence: CALL TBIT(ARG1,ARG2,ARG3) Octal Decimal ARG1 Range: 0 to 17 0 to 15 ARG2 Range: 0 to 77776 0 to 32766 100000 to 177776 -32768 to -2 ARG3 Range: 0 or 1 0 or 1 When BASIC-11 finds an error in a program line or immediate mode statement it prints an error message. After BASIC-11 prints the error message it interrupts execution of the program line or immediate mode statement and then prints the READY message. These routines return three fatal error messages, one on an argument error, one for lack of adequate string storage space and the other on an attempt to access an unimplimented UNIBUS address. Descriptions of these error messages follow along with some suggested corrective actions. ?ARGUMENT ERROR [AT LINE xxxxx] Arguments in a CALL do not match in number, range or type, the arguments defined for the CALL. Ensure that there are the correct number of arguments, that their values are in the correct range, and that they are of the correct type. [2] ?NO STRING SPACE [AT LINE xxxxx] BASIC-11 was unable to allocate space for the output string. Reduce the size of the program or the amount of string utilization. ?UNIMPLEMENTED BUS ADDRESS [AT LINE xxxxx] An attempt in a CALL was made to input from or to output to an unimplemented UNIBUS address. Ensure that the value of the UNIBUS address to be accessed is valid. BASIC-11 EXTENSIONS Page 11 INSTALLATION 27 Mar 79 III. INSTALLATION The "BASIC-11/RT-11 Installation Guide" [4] describes the general technique used to install assembly language routines into the BASIC-11 interpreter. Table III-1 lists the set of files which make up the DATBAS package. The files DATBAS.TEC and DATBAS.MAC are needed along with DEC's BASIC-11/RT-11 binary distribution package to build an extended BASIC-11 interpreter. Installation of these routines requires five steps. They are modification of BSCLI.MAC, assembly of the DATCLI.MAC and the DATBAS.MAC extension files, generation of a command file to build the interpreter, editing the command file to provide more stack space and finally executing the command file to build the extended BASIC-11 interpreter. FILE NAME DESCRIPTION DATBAS.BAS BASIC-11 program to test the extension routines of DATBAS.MAC. DATBAS.DAT Resulting output from execution of DATBAS.BAS. DATBAS.DIR This directory of the DATBAS package. DATBAS.DOC Full description of the DATBAS package (this document). DATBAS.HLP Brief description of the use of the DATBAS.MAC extension routines. DATBAS.MAC MACRO-11 source of the extension routines. DATBAS.RNO Source file for DATBAS.DOC. DATBAS.TEC TECO macro to make DATCLI.MAC. TABLE III-1. THE DATBAS FILES BASIC-11 EXTENSIONS Page 12 INSTALLATION 27 Mar 79 DATCLI.MAC is constructed from BSCLI.MAC by executing the TECO [7] macro file DATBAS.TEC. It adds the globals and the FTBL entries required to access the DATBAS.MAC routines. The following commands accomplish this. .SET EDIT TECO .EDIT/EXEC DATBAS The following commands will assemble DATCLI.MAC and DATBAS.MAC to produce OBJ files which will be used later by the command file to build the interpreter. .RUN MACRO *DATCLI,LP:' 123' THEN PRINT #1,' ERROR: Z$<>123' 420 GOSUB 3040 \ REM INTEGER CONSTANTS BASIC-11 EXTENSIONS Page 15 TESTING THE ROUTINES 27 Mar 79 430 CALL PUT(83%,254%) 440 CALL GET(254%,Z%) 450 IF Z%<>83% THEN PRINT #1,' ERROR: Z%<>83' 460 GOSUB 3080 \ REM NUMERIC CONSTANTS 470 CALL PUT(83,254) 480 CALL GET(254,Z) 490 IF Z<>83 THEN PRINT #1,' ERROR: Z<>83' 500 GOSUB 3120 \ REM STRING EXPRESSIONS 510 CALL PUT(V$&'23',A$&'76') 520 CALL GET(A$&'76',Z$) 530 IF Z$<>' '&V$&'23' THEN PRINT #1,' ERROR: Z$<>'V$&'23' 540 GOSUB 3190 \ REM INTEGER EXPRESSIONS 550 CALL PUT(V%+100%,A%+200%) 560 CALL GET(A%+200%,Z%) 570 IF Z%<>V%+100% THEN PRINT #1,' ERROR: Z%<>'V%+100% 580 GOSUB 3260 \ REM NUMERIC EXPRESSIONS 590 CALL PUT(V/2,2*A) 600 CALL GET(2*A,Z) 610 IF Z<>V/2 THEN PRINT #1,' ERROR: Z<>'V/2 620 GOSUB 3330 \ REM STRING VARIABLES 630 CALL PUT(V$,A$) 640 CALL GET(A$,Z$) 650 IF Z$<>' '&V$ THEN PRINT #1,' Z$<>'V$ 660 GOSUB 3400 \ REM INTEGER VARIABLES 670 CALL PUT(V%,A%) 680 CALL GET(A%,Z%) 690 IF Z%<>V% THEN PRINT #1,' ERROR: Z%<>'V% 700 GOSUB 3470 \ REM NUMERIC VARIABLES 710 CALL PUT(V,A) 720 CALL GET(A,Z) 730 IF Z<>V THEN PRINT #1,' ERROR: Z<>'V 740 GOSUB 3540 \ REM STRING ARRAY ELEMENTS 750 CALL PUT(V$(0),A$(0)) 760 CALL GET(A$(0),Z$(0)) 770 IF Z$(0)<>' '&V$(0) THEN PRINT #1,' ERROR: Z$(0)<>'V$(0) 780 GOSUB 3610 \ REM INTEGER ARRAY ELEMENTS 790 CALL PUT(V%(1),A%(1)) 800 CALL GET(A%(1),Z%(1)) 810 IF Z%(1)<>V%(1) THEN PRINT #1,' ERROR: Z%(1)<>'V%(1) 820 GOSUB 3680 \ REM NUMERIC ARRAY ELEMENTS 830 CALL PUT(V(0),A(0)) 840 CALL GET(A(0),Z(0)) 850 IF Z(0)<>V(0) THEN PRINT #1,' ERROR: Z(0)<>'V(0) 860 RETURN 870 PRINT #1 880 PRINT #1 890 PRINT #1,'TEST PUTB & GETB' 900 GOSUB 3000 \ REM STRING CONSTANTS 910 CALL PUTB('123','376') 920 CALL GETB('376',Z$) 930 IF Z$<>' '&'123' THEN PRINT #1,' ERROR: Z$<>123' 940 GOSUB 3040 \ REM INTEGER CONSTANTS 950 CALL PUTB(83%,255%) BASIC-11 EXTENSIONS Page 16 TESTING THE ROUTINES 27 Mar 79 960 CALL GETB(255%,Z%) 970 IF Z%<>83% THEN PRINT #1,' ERROR: Z%<>83' 980 GOSUB 3080 \ REM NUMERIC CONSTANTS 990 CALL PUTB(83,254) 1000 CALL GETB(254,Z) 1010 IF Z<>83 THEN PRINT #1,' ERROR: Z<>83' 1020 GOSUB 3120 \ REM STRING EXPRESSIONS 1030 CALL PUTB(V$&'23',A$&'77') 1040 CALL GETB(A$&'77',Z$) 1050 IF Z$<>' '&V$&'23' THEN PRINT #1,' ERROR: Z$<>'V$&'23' 1060 GOSUB 3190 \ REM INTEGER EXPRESSIONS 1070 CALL PUTB(V%+100%,A%+200%) 1080 CALL GETB(A%+200%,Z%) 1090 IF Z%<>V%+100% THEN PRINT #1,' ERROR: Z%<>'V%+100% 1100 GOSUB 3260 \ REM NUMERIC EXPRESSIONS 1110 CALL PUTB(V/2,2*A) 1120 CALL GETB(2*A,Z) 1130 IF Z<>V/2 THEN PRINT #1,' ERROR: Z<>'V/2 1140 GOSUB 3330 \ REM STRING VARIABLES 1150 CALL PUTB(V$,A$) 1160 CALL GETB(A$,Z$) 1170 IF Z$<>' '&V$ THEN PRINT #1,' ERROR: Z$<>'V$ 1180 GOSUB 3400 \ REM INTEGER VARIABLES 1190 CALL PUTB(V%,A%) 1200 CALL GETB(A%,Z%) 1210 IF Z$(0)<>' '&V$(0) THEN PRINT #1,' ERROR: Z$(0)<>'V$(0) 1220 IF Z%<>V% THEN PRINT #1,' ERROR: Z%<>'V% 1230 GOSUB 3470 \ REM NUMERIC VARIABLES 1240 CALL PUTB(V,A) 1250 CALL GETB(A,Z) 1260 IF Z<>V THEN PRINT #1,' ERROR: Z<>'V 1270 GOSUB 3540 \ REM STRING ARRAY ELEMENTS 1280 CALL PUTB(V$(0),A$(0)) 1290 CALL GETB(A$(0),Z$(0)) 1300 GOSUB 3610 \ REM INTEGER ARRAY ELEMENTS 1310 CALL PUTB(V%(1),A%(1)) 1320 CALL GETB(A%(1),Z%(1)) 1330 IF Z%(1)<>V%(1) THEN PRINT #1,' ERROR: Z%(1)<>'V%(1) 1340 GOSUB 3680 \ REM NUMERIC ARRAY ELEMTNTS 1350 CALL PUTB(V(0),A(0)) 1360 CALL GETB(A(0),Z(0)) 1370 IF Z(0)<>V(0) THEN PRINT #1,' ERROR: Z(0)<>'V(0) 1380 RETURN 1390 PRINT #1 1400 PRINT #1 1410 PRINT #1,'TEST NULL' 1420 PRINT #1 1430 PRINT #1,' ONE DIMENSION ARRAYS' 1440 FOR I=0 TO 100 1450 D(I)=I 1460 D%(I)=I 1470 D$(I)=STR$(I) 1480 NEXT I BASIC-11 EXTENSIONS Page 17 TESTING THE ROUTINES 27 Mar 79 1490 CALL NULL(D(),D%(),D$()) 1500 FOR I=0 TO 100 1510 IF D(I)<>0 THEN PRINT #1,' ERROR: D('I')<>0' 1520 IF D%(I)<>0% THEN PRINT #1,' ERROR: D%('I')<>0' 1530 IF D$(I)<>'' THEN PRINT #1,' ERROR: D$('I') NOT NUL' 1540 NEXT I 1550 PRINT #1 1560 PRINT #1,' TWO DIMENSION ARRAYS' 1570 FOR I=0 TO 10 1580 FOR J=0 TO 10 1590 E(I,J)=10*I+J 1600 E%(I,J)=I+J 1610 E$(I,J)=STR$(E(I,J)) 1620 NEXT J 1630 NEXT I 1640 CALL NULL(E(),E%(),E$()) 1650 FOR I=0 TO 10 1660 FOR J=0 TO 10 1670 IF E(I,J)<>0 THEN PRINT #1,' ERROR: E('I','J')<>0' 1680 IF E%(I,J)<>0% THEN PRINT #1,' ERROR: E%('I','J')<>0' 1690 IF E$(I,J)<>'' THEN PRINT #1,' ERROR: E$('I','J') NOT NUL' 1700 NEXT J 1710 NEXT I 1720 RETURN 1730 PRINT #1 1740 PRINT #1 1750 PRINT #1,'TEST SBIT & TBIT' 1760 CALL PUT(0,254) 1770 GOSUB 3080 \ REM NUMERIC CONSTANTS 1780 CALL SBIT(5,254,1) 1790 CALL TBIT(5,254,Z) 1800 IF Z<>1 THEN PRINT #1,' ERROR: Z<>'1 1810 GOSUB 3750 \ REM TIME DELAY 1820 CALL SBIT(5,254,0) 1830 CALL TBIT(5,254,Z) 1840 IF Z<>0 THEN PRINT #1,' ERROR: Z<>'0 1850 GOSUB 3040 \ REM INTEGER CONSTANTS 1860 CALL SBIT(10%,254%,1%) 1870 CALL TBIT(10%,254%,Z%) 1880 IF Z%<>1% THEN PRINT #1,' ERROR: Z%<>'1% 1890 GOSUB 3750 \ REM TIME DELAY 1900 CALL SBIT(10%,254%,0%) 1910 CALL TBIT(10%,254%,Z%) 1920 IF Z%<>0% THEN PRINT #1,' ERROR: Z%<>'0% 1930 GOSUB 3000 \ REM STRING CONSTANTS 1940 CALL SBIT('15','376','1') 1950 CALL TBIT('15','376',Z$) 1960 IF Z$<>' 1' THEN PRINT #1,' ERROR: Z$<>1' 1970 GOSUB 3750 \ REM TIME DELAY 1980 CALL SBIT('15','376','0') 1990 CALL TBIT('15','376',Z$) 2000 IF Z$<>' 0' THEN PRINT #1,' ERROR: Z$<>0' 2010 GOSUB 3260 \ REM NUMERIC EXPRESSIONS BASIC-11 EXTENSIONS Page 18 TESTING THE ROUTINES 27 Mar 79 2020 CALL SBIT(14/2,2*A,2-1) 2030 CALL TBIT(3+4,2*A,Z) 2040 IF Z<>1 THEN PRINT #1,' ERROR: Z<>'1 2050 GOSUB 3750 \ REM TIME DELAY 2060 CALL SBIT(2*3.5,2*A,3-3) 2070 CALL TBIT(14-7,2*A,Z) 2080 IF Z<>0 THEN PRINT #1,' ERROR: X<>'0 2090 GOSUB 3190 \ REM INTEGER EXPRESSIONS 2100 CALL SBIT(18%/2%,200%+A%,4%/4%) 2110 CALL TBIT(5%+4%,A%+200%,Z%) 2120 IF Z%<>1% THEN PRINT #1,' ERROR: Z%<>'1% 2130 GOSUB 3750 \ REM TIME DELAY 2140 CALL SBIT(4%+5%,A%+200%,4%-4%) 2150 CALL TBIT(18%-9%,200%+A%,Z%) 2160 IF Z%<>0% THEN PRINT #1,' ERROR: Z%<>'0% 2170 GOSUB 3120 \ REM STRING EXPRESSIONS 2180 CALL SBIT('1'&'3',A$&'76','1') 2190 CALL TBIT('1'&'3',A$&'76',Z$) 2200 IF Z$<>' 1' THEN PRINT #1,' ERROR: Z$<>1' 2210 GOSUB 3750 \ REM TIME DELAY 2220 CALL SBIT('1'&'3',A$&'76','0') 2230 CALL TBIT('1'&'3',A$&'76',Z$) 2240 IF Z$<>' 0' THEN PRINT #1,' ERROR: Z$<>0' 2250 GOSUB 3470 \ REM NUMERIC VARIABLES 2260 V0=0 2270 V1=1 2280 FOR I=0 TO 15 2290 CALL SBIT(I,A,V1) 2300 CALL TBIT(I,A,Z) 2310 IF Z<>V1 THEN PRINT #1,' ERROR: Z<>'V1 2320 GOSUB 3750 \ REM TIME DELAY 2330 CALL SBIT(I,A,V0) 2340 CALL TBIT(I,A,Z) 2350 IF Z<>V0 THEN PRINT #1,' ERROR: Z<>'V0 2360 GOSUB 3750 \ REM TIME DELAY 2370 NEXT I 2380 GOSUB 3400 \ REM INTEGER VARIABLES 2390 V0%=0% 2400 V1%=1% 2410 FOR I%=0% TO 15% 2420 CALL SBIT(I%,A%,V1%) 2430 CALL TBIT(I%,A%,Z%) 2440 IF Z%<>V1% THEN PRINT #1,' ERROR: Z%<>'V1% 2450 GOSUB 3750 \ REM TIME DELAY 2460 CALL SBIT(I%,A%,V0%) 2470 CALL TBIT(I%,A%,Z%) 2480 IF Z%<>V0% THEN PRINT #1,' ERROR: Z%<>'V0% 2490 GOSUB 3750 \ REM TIME DELAY 2500 NEXT I% 2510 GOSUB 3330 \ REM STRING VARIABLES 2520 V0$='0' 2530 V1$='1' 2540 FOR I=0 TO 7 2550 I$=STR$(I) BASIC-11 EXTENSIONS Page 19 TESTING THE ROUTINES 27 Mar 79 2560 CALL SBIT(I$,A$,V1$) 2570 CALL TBIT(I$,A$,Z$) 2580 IF Z$<>' '&V1$ THEN PRINT #1,' ERROR: Z$<>'V1$ 2590 GOSUB 3750 \ REM TIME DELAY 2600 CALL SBIT(I$,A$,V0$) 2610 CALL TBIT(I$,A$,Z$) 2620 IF Z$<>' '&V0$ THEN PRINT #1,' ERROR: Z$<>'V0$ 2630 GOSUB 3750 \ REM TIME DELAY 2640 NEXT I 2650 GOSUB 3680 \ REM NUMERIC ARRAY ELEMTNTS 2660 FOR I=0 TO 15 2670 CALL SBIT(I,A(0),V1) 2680 CALL TBIT(I,A(0),Z(0)) 2690 IF Z(0)<>V1 THEN PRINT #1,' ERROR: Z(0)<>'V1 2700 GOSUB 3750 \ REM TIME DELAY 2710 CALL SBIT(I,A(0),V0) 2720 CALL TBIT(I,A(0),Z(0)) 2730 IF Z(0)<>V0 THEN PRINT #1,' ERROR: Z(0)<>'V0 2740 GOSUB 3750 \ REM TIME DELAY 2750 NEXT I 2760 GOSUB 3610 \ REM INTEGER ARRAY ELEMENTS 2770 FOR I%=0% TO 15% 2780 CALL SBIT(I%,A%(1),V1%) 2790 CALL TBIT(I%,A%(1),Z%(1)) 2800 IF Z%(1)<>V1% THEN PRINT #1,' ERROR: Z%(1)<>'V1% 2810 GOSUB 3750 \ REM TIME DELAY 2820 CALL SBIT(I%,A%(1),V0%) 2830 CALL TBIT(I%,A%(1),Z%(1)) 2840 IF Z%(1)<>V0% THEN PRINT #1,' ERROR: Z%(1)<>'V0% 2850 GOSUB 3750 \ REM TIME DELAY 2860 NEXT I% 2870 GOSUB 3540 \ REM STRING ARRAY ELEMTNTS 2880 FOR I=0 TO 7 2890 I$=STR$(I) 2900 CALL SBIT(I$,A$(0),V1$) 2910 CALL TBIT(I$,A$(0),Z$(0)) 2920 IF Z$(0)<>' '&V1$ THEN PRINT #1,' ERROR: Z$(0)<>'V1$ 2930 GOSUB 3750 \ REM TIME DELAY 2940 CALL SBIT(I$,A$(0),V0$) 2950 CALL TBIT(I$,A$(0),Z$(0)) 2960 IF Z$(0)<>' '&V0$ THEN PRINT #1,' ERROR: Z$(0)<>'V0$ 2970 GOSUB 3750 \ REM TIME DELAY 2980 NEXT I 2990 RETURN 3000 PRINT #1 3010 PRINT #1,' STRING CONSTANTS' 3020 GOSUB 3750 \ REM TIME DELAY 3030 RETURN 3040 PRINT #1 3050 PRINT #1,' INTEGER CONSTANTS' 3060 GOSUB 3750 \ REM TIME DELAY BASIC-11 EXTENSIONS Page 20 TESTING THE ROUTINES 27 Mar 79 3070 RETURN 3080 PRINT #1 3090 PRINT #1,' NUMERIC CONSTANTS' 3100 GOSUB 3750 \ REM TIME DELAY 3110 RETURN 3120 PRINT #1 3130 PRINT #1,' STRING EXPRESSIONS' 3140 A$='3' 3150 V$='1' 3160 Z$='' 3170 GOSUB 3750 \ REM TIME DELAY 3180 RETURN 3190 PRINT #1 3200 PRINT #1,' INTEGER EXPRESSIONS' 3210 A%=54% 3220 V%=23% 3230 Z%=0% 3240 GOSUB 3750 \ REM TIME DELAY 3250 RETURN 3260 PRINT #1 3270 PRINT #1,' NUMERIC EXPRESSIONS' 3280 A=127 3290 V=246 3300 Z=0 3310 GOSUB 3750 \ REM TIME DELAY 3320 RETURN 3330 PRINT #1 3340 PRINT #1,' STRING VARIABLES' 3350 A$='376' 3360 V$='123' 3370 Z$='' 3380 GOSUB 3750 \ REM TIME DELAY 3390 RETURN 3400 PRINT #1 3410 PRINT #1,' INTEGER VARIABLES' 3420 V%=123% 3430 A%=254% 3440 Z%=0% 3450 GOSUB 3750 \ REM TIME DELAY 3460 RETURN 3470 PRINT #1 3480 PRINT #1,' NUMERIC VARIABLES' 3490 A=254 3500 V=123 3510 Z=0 3520 GOSUB 3750 \ REM TIME DELAY 3530 RETURN BASIC-11 EXTENSIONS Page 21 TESTING THE ROUTINES 27 Mar 79 3540 PRINT #1 3550 PRINT #1,' STRING ARRAY ELEMENTS' 3560 A$(0)='376' 3570 V$(0)='123' 3580 Z$(0)='' 3590 GOSUB 3750 \ REM TIME DELAY 3600 RETURN 3610 PRINT #1 3620 PRINT #1,' INTEGER ARRAY ELEMENTS' 3630 A%(1)=254% 3640 V%(1)=123% 3650 Z%(1)=0% 3660 GOSUB 3750 \ REM TIME DELAY 3670 RETURN 3680 PRINT #1 3690 PRINT #1,' NUMERIC ARRAY ELEMENTS' 3700 A(0)=254 3710 V(0)=123 3720 Z(0)=0 3730 GOSUB 3750 \ REM TIME DELAY 3740 RETURN 3750 FOR K%=0% TO 1% \ REM MAKE 1000% FOR ODT 3760 NEXT K% 3770 RETURN 3780 END BASIC-11 EXTENSIONS Page 22 MISCELLANEOUS COMMENTS 27 Mar 79 A. APPENDIX: MISCELLANEOUS COMMENTS The "BASIC-11/RT-11 User's Guide" [3] describes how to add assembly language routines to BASIC-11. This includes the general format of the routine, the procedures to access arguments and the use of some routines provided by BASIC-11. The procedure for incorporating the additional routines into the BASIC-11 interpreter is described in the "BASIC-11/RT-11 Installation Guide" [4]. This appendix will add to the information contained in these two references. It is convenient to use the Online Debugging Technique (ODT) [6] facility provided by DEC to debug assembly language extensions to BASIC-11. When this is done it is necessary to request a load map during execution of the SUCNFG program. It is also necessary to include ODT as the first module name during the CALL statement dialogue. BASIC-11's start address is then found at the global symbol, STARTI, which is contained in the root PSECT, BASSCD. BASIC-11'S I/O is interrupt driven and may cause some confusion unless a time delay subroutine is entered following any PRINT statement which in turn is followed by the CALL statement being debugged. The time delay subroutine of lines 3750-3770 of the test program, DATBAS.BAS, is just for this purpose. Some selected descriptor words are given in Table A-1. During debugging it is helpful to set a breakpoint at the entry to the assembly language routine being debugged. When this breakpoint is reached a pointer map may then be obtained. Figures A-1 through A-9 are typical of such pointer maps. They were obtained using a dummy routine, DUMY, which contained only a few NOP instructions plus the required RTS instruction. Figure 4-4 of the "BASIC-11 User's Guide" [3] illustrates an array descriptor. It identifies the third word as "Array Size (bytes)", the sixth word as "High limit of 1st subscript" and the eighth word as "High limit of 2nd subscript". This is true only if the argument itself points to either the array in general (as in Figures A-5, A-6, and A-8) or to the zeroth element of the array (as in Figure A-9 C(0,0)). At other times when the argument points to some element beyond the BASIC-11 EXTENSIONS Page 23 MISCELLANEOUS COMMENTS 27 Mar 79 zeroth element of the array the value of the third word when added to the value of the corresponding argument list entry equals the address of the first memory location past the upper end of the array. The value of the sixth word when added to the value of the subscript in the argument equals the upper limit of the subscript. An identical relation prevails for the eighth word. 377 Null argument 1023 Integer variable 1100 String variable or array element 1223 Integer constant 2041 Numeric variable 2241 Numeric constant 21022 Integer array 21100 String array 22040 Numeric array TABLE A-1. DESCRIPTOR WORDS CALL DUMY(,,) DSC LST ARG LST ---------- ---------- | 377 |<---| 137634 | R5 ---------- ---------- ---------- | 377 | | 10103 |<---| 137624 | ---------- ---------- ---------- | 377 | | 177777 | ---------- ---------- | 177777 | ---------- | 177777 | ---------- FIGURE A-1. POINTER MAP: NULL ARGUMENTS. BASIC-11 EXTENSIONS Page 24 MISCELLANEOUS COMMENTS 27 Mar 79 CALL DUMY(1%,2,'3') DSC LST ARG LST ---------- ---------- | 1223 |<--------| 137634 | R5 ---------- ---------- ---------- | 2241 | | 10103 |<---| 137624 | ---------- ---------- ---------- ---| 137604 | -------| 137620 | | ---------- | ---------- | | -----| 137612 | | | | ---------- | | | ---| 55251 | | | | | ---------- | | | | | '3' DSC | | | '3' | ---------- | | | ------- -->| 1300 | | | --->| 63 | ---------- | | ------- | 137610 | | | ---------- | | 2 | | ---------- | ---->| 40400 | | ---------- | | 0 | | ---------- | | 1% | ---------- ------>| 1 | ---------- FIGURE A-2. POINTER MAP: CONSTANTS. BASIC-11 EXTENSIONS Page 25 MISCELLANEOUS COMMENTS 27 Mar 79 CALL DUMY(A,A%,A$) DSC LST ARG LST ---------- ---------- | 2041 |<--------| 137634 | R5 ---------- ---------- ---------- | 1023 | | 10103 |<---| 137624 | ---------- ---------- ---------- ---| 137616 | -------| 55130 | | ---------- | ---------- | | -----| 55140 | | A$ DSC | | ---------- | ---------- | | | 52262 | -->| 1100 | | | ---------- ---------- | | ---| 55146 | | | A% | ---------- | | ---------- | | ---->| 0 | | A$ | ---------- | ---------- | -->| 177777 | | A ---------- | ---------- ------>| 0 | ---------- | 0 | ---------- FIGURE A-3. POINTER MAP: UNDEFINED VARIABLES. BASIC-11 EXTENSIONS Page 26 MISCELLANEOUS COMMENTS 27 Mar 79 A=.5 \ A%=5% \ A$='DUMY' CALL DUMY(A,A%,A$,) DSC LST ARG LST ---------- ---------- | 2041 |<--------| 137632 | R5 ---------- ---------- ---------- | 1023 | | 10104 |<---| 137620 | ---------- ---------- ---------- ---| 137612 | -------| 55130 | | ---------- | ---------- | | 377 | | -----| 55140 | | ---------- | | ---------- | | | ---| 55331 | | | | | ---------- | | | | | 177777 | | | | | ---------- | | | | | A$ DSC | | | A$ | ---------- | | | ------- -->| 1100 | | | --->| 104 |D ---------- | | ------- | 55146 | | | | 125 |U ---------- | | ------- | | | 115 |M | | ------- | | | 131 |Y | | ------- | | | | A% | | ---------- | ---->| 5 | | ---------- | | A | ---------- ------>| 40000 | ---------- | 0 | ---------- FIGURE A-4. POINTER MAP: DEFINED VARIABLES. BASIC-11 EXTENSIONS Page 27 MISCELLANEOUS COMMENTS 27 Mar 79 DIM A(10),A%(10),A$(10) CALL DUMY(A(),A%(),A$()) DSC LST ARG LST ---------- ---------- -------| 137546 |<--------| 137574 | R5 | ---------- ---------- ---------- | -----| 137532 | | 10103 |<---| 137564 | | | ---------- ---------- ---------- | | ---| 137516 | -------| 137656 | | | | ---------- | ---------- | | | | -----| 137630 | | | | | | ---------- | | | | | ---| 137602 | | | | | | | ---------- | | | | | | | | | A$() DSC | | | A$() | | | ---------- | | | ---------- | | -->| 21100 | | | -->| 177777 | | | ---------- | | ---------- | | | 0 | | | | 177777 | | | ---------- | | ---------- | | | 26 | | | : : | | ---------- | | ---------- | | | 1 | | | | 177777 | | | ---------- | | ---------- | | | 0 | | | | | ---------- | | | | | 12 | | | | | ---------- | | | | | | | | A%() DSC | | A%() | | ---------- | | ---------- | ---->| 21022 | | ---->| 0 | | ---------- | ---------- | | 0 | | | 0 | | ---------- | ---------- | | 26 | | : : | ---------- | ---------- | | 1 | | | 0 | | ---------- | ---------- | | 0 | | | ---------- | | | 12 | | | ---------- | V V FIGURE A-5. POINTER MAP: ONE DIMENSION ARRAYS, UNDEFINED ELEMENTS. BASIC-11 EXTENSIONS Page 28 MISCELLANEOUS COMMENTS 27 Mar 79 | | | A() DSC | A() | ---------- | ---------- ------>| 22040 | ------>| 0 | ---------- ---------- | 0 | | 0 | ---------- ---------- | 54 | : : ---------- ---------- | 1 | | 0 | ---------- ---------- | 0 | | 0 | ---------- ---------- | 12 | ---------- FIGURE A-5 (CONTINUED). POINTER MAP: ONE DIMENSION ARRAYS, UNDEFINED ELEMENTS. DIM B(2),B%(2),B$(2) B(0)=0 \ B%(1)=1% \ B$(2)='TWO' CALL DUMY(B(),B%(),B$()) DSC LST ARG LST ---------- ---------- -------| 137606 |<--------| 137634 | R5 | ---------- ---------- ---------- | -----| 137572 | | 10103 |<---| 137624 | | | ---------- ---------- ---------- | | ---| 137566 | -------| 137716 | | | | ---------- | ---------- | | | | -----| 137710 | | | | | | ---------- | | | | | ---| 137702 | | | | | | | ---------- V V V V V V FIGURE A-6. POINTER MAP: ONE DIMENSION ARRAYS, DEFINED ELEMENTS. BASIC-11 EXTENSIONS Page 29 MISCELLANEOUS COMMENTS 27 Mar 79 | | | | | | | | | B$() DSC | | | B$() PTR B$() | | | ---------- | | | ---------- ------- | | -->| 21100 | | | -->| 55417 |--->| | | | ---------- | | ---------- ------------- | | | 0 | | | | | | | | ---------- | | ------------- | | | 6 | | | E| 105 | 132 |Z | | ---------- | | ------------- | | | 1 | | | O| 117 | 122 |R | | ---------- | | ------------- | | | 0 | | | | | | | | ---------- | | ------------- | | | 2 | | | | | | | | ---------- | | ------------- | | | | N| 116 | 117 |O | | B%() DSC | | B%() ------------- | | ---------- | | ---------- | | 105 |E | ---->| 21022 | | ---->| 0 | ------------- | ---------- | ---------- | | | | | 0 | | | 1 | ------------- | ---------- | ---------- T| 124 | | | | 6 | | | 2 | ------------- | ---------- | ---------- O| 117 | 127 |W | | 1 | | ------------- | ---------- | | | 0 | | | ---------- | | | 2 | | | ---------- | | | | B() DSC | B() | ---------- | ---------- ------>| 22040 | ------>| 0 | ---------- ---------- | 0 | | 0 | ---------- ---------- | 14 | | 40200 | ---------- ---------- | 1 | | 0 | ---------- ---------- | 0 | | 40400 | ---------- ---------- | 2 | | 0 | ---------- ---------- FIGURE A-6 (CONTINUED). POINTER MAP: ONE DIMENSION ARRAYS, DEFINED ELEMENTS. BASIC-11 EXTENSIONS Page 30 MISCELLANEOUS COMMENTS 27 Mar 79 DIM B(2),B%(2),B$(2) B(1)=1 \ B%(2)=2% \ B$(0)='ZERO' CALL DUMY(B(1),B%(2),B$(0)) DSC LST ARG LST ---------- ---------- -------| 137606 |<--------| 137634 | R5 | ---------- ---------- ---------- | -----| 137572 | | 10103 |<---| 137624 | | | ---------- ---------- ---------- | | ---| 137566 | -------| 137722 | | | | ---------- | ---------- | | | | -----| 137714 | | | | | | ---------- | | | | | ---| 55422 | | | | | | | ---------- | | | | | | | | | B$(0) DSC | | | B$(0) | | | ---------- | | | ------- | | -->| 1100 | | | ---->| 132 |Z | | ---------- | | ------- | | | 137702 | | | | 105 |E | | ---------- | | ------- | | | | | 122 |R | | | | ------- | | | | | 117 |O | | | | ------- | | | | | | B%(2) DSC | | B%(2) | | ---------- | | ---------- | ---->| 21022 | | ---->| 2 | | ---------- | ---------- | | 0 | | | ---------- | | | 2 | | | ---------- | | | 1 | | | ---------- | | | 0 | | | ---------- | | | 0 | | | ---------- | V V FIGURE A-7. POINTER MAP: ONE DIMENSION ARRAYS, SPECIFIC ELEMENTS. BASIC-11 EXTENSIONS Page 31 MISCELLANEOUS COMMENTS 27 Mar 79 | | | B(1) DSC | B(1) | ---------- | ---------- ------>| 22040 | ------>| 40200 | ---------- ---------- | 0 | | 0 | ---------- ---------- | 10 | ---------- | 1 | ---------- | 0 | ---------- | 1 | ---------- FIGURE A-7 (CONTINUED). POINTER MAP: ONE DIMENSION ARRAYS, SPECIFIC ELEMENTS. DIM C(1,1),C%(1,1),C$(1,1) C(0,0)=0 \ C%(0,1)=0% \ C$(1,0)='FIVE' CALL DUMY(C(),C%(),C$()) DSC LST ARG LST ---------- ---------- -------| 137602 |<--------| 137634 | R5 | ---------- ---------- ---------- | -----| 137562 | | 10103 |<---| 137624 | | | ---------- ---------- ---------- | | ---| 137542 | -------| 137662 | | | | ---------- | ---------- | | | | -----| 137652 | | | | | | ---------- | | | | | ---| 137642 | | | | | | | ---------- V V V V V V FIGURE A-8. POINTER MAP: TWO DIMENSION ARRAYS, DEFINED ELEMENTS. BASIC-11 EXTENSIONS Page 32 MISCELLANEOUS COMMENTS 27 Mar 79 | | | | | | | | | C$() DSC | | | C$() PTR | | | ---------- | | | ---------- | | -->| 21100 | | | -->| 55657 | | | ---------- | | ---------- | | | 0 | | | | | ---------- | | | | | 10 | | | | | ---------- | | | | | 2 | | | | | ---------- | | | | | 0 | | | | | ---------- | | | | | 1 | | | | | ---------- | | | | | 0 | | | | | ---------- | | | | | 1 | | | | | ---------- | | | | | | | | C%() DSC | | C%() | | ---------- | | ---------- | ---->| 21022 | | ---->| 0 | | ---------- | ---------- | | 0 | | | 1 | | ---------- | ---------- | | 10 | | | 0 | | ---------- | ---------- | | 2 | | | 0 | | ---------- | ---------- | | 0 | | | ---------- | | | 1 | | | ---------- | | | 0 | | | ---------- | | | 1 | | | ---------- | V V FIGURE A-8 (CONTINUED). POINTER MAP: TWO DIMENSION ARRAYS, DEFINED ELEMENTS. BASIC-11 EXTENSIONS Page 33 MISCELLANEOUS COMMENTS 27 Mar 79 | | | C() DSC | C() | ---------- | ---------- ------>| 22040 | ------>| 0 | ---------- ---------- | 0 | | 0 | ---------- ---------- | 20 | | 0 | ---------- ---------- | 2 | | 0 | ---------- ---------- | 0 | | 0 | ---------- ---------- | 1 | | 0 | ---------- ---------- | 0 | | 0 | ---------- ---------- | 1 | | 0 | ---------- ---------- FIGURE A-8 (CONTINUED). POINTER MAP: TWO DIMENSION ARRAYS / DEFINED ELEMENTS. DIM C(1,1),C%(1,1),C$(1,1) C(0,0)=0 \ C%(0,1)=1% \ C$(1,0)='FIVE' CALL DUMY(C(0,0),C%(0,1),C$(1,0)) DSC LST ARG LST ---------- ---------- -------| 137606 |<--------| 137634 | R5 | ---------- ---------- ---------- | -----| 137572 | | 10103 |<---| 137624 | | | ---------- ---------- ---------- | | ---| 137566 | -------| 137662 | | | | ---------- | ---------- | | | | -----| 137654 | | | | | | ---------- | | | | | ---| 55731 | | | | | | | ---------- V V V V V V FIGURE A-9. POINTER MAP: TWO DIMENSION ARRAYS / SPECIFIC ELEMENTS. BASIC-11 EXTENSIONS Page 34 MISCELLANEOUS COMMENTS 27 Mar 79 | | | | | | | | | C$(1,0) DSC | | | C$(1,0) | | | ---------- | | | ------- | | -->| 1100 | | | ---->| 106 |F | | ---------- | | ------- | | | 137646 | | | | 111 |I | | ---------- | | ------- | | | | | 126 |V | | | | ------- | | | | | 105 |E | | | | ------- | | | | | | C%(0,1) DSC | | C%(0,1) | | ---------- | | ---------- | ---->| 21022 | | ---->| 1 | | ---------- | ---------- | | 0 | | | ---------- | | | 10 | | | ---------- | | | 2 | | | ---------- | | | 0 | | | ---------- | | | 2 | | | ---------- | | | | | | ---------- | | | | | | ---------- | | | | C(0,0) DSC | C(0,0) | ---------- | ---------- ------>| 22040 | ------>| 0 | ---------- ---------- | 0 | | 0 | ---------- ---------- | 20 | ---------- | 2 | ---------- | 0 | ---------- | 3 | ---------- | 0 | ---------- | 3 | ---------- FIGURE A-9 (CONTINUED). POINTER MAP: TWO DIMENSION ARRAYS / SPECIFIC ELEMENTS. BASIC-11 EXTENSIONS Page 35 MISCELLANEOUS COMMENTS 27 Mar 79 Being able to write handlers implies a real time capability. When interacting with hardware in real time it is not advisable to use strings (octal values). BASIC-11 allocates string storage space dynamicaly. In the process of doing this dynamic allocation BASIC-11 occasionally collects abandoned string storage space. This may take some considerable amount of time (as much as tens of seconds). The PUT and GET routines offer the ability to perform integer arithmetic in octal. The actual arithmetic operations are performed by BASIC-11 in decimal. Conversions between octal and decimal are handled by the PUT and GET routines. An unused vector location is a convenient bus address for this purpose. BASIC-11 EXTENSIONS Page 36 FLOW CHARTS 27 Mar 79 B. APPENDIX: FLOW CHARTS This appendix contains flow charts and the code which implements the extension routines of DATBAS. The first eight charts are of the interface modules and the last chart is of a macro. All the rest describe the supporting subroutines. Top down design was used to achieve the first draft of the code in one and a half working days. The first draft included both code and flow charts as do the following figures. Top down testing resulted in complete operational status by the end of the fourth working day. This does not include the time spent studying the new CALL statement interface for BASIC-11 V2 [8]. ----- GET$: ( GET ) ----- | V ----------- MOV R5,ORIGR5 | SAVE R5 | ----------- | V / \ / \ / TWO \ NO ----- CMP (R5)+,#101002 < ARGS >---->( 99$ ) BNE 99$ \ / ----- \ / \ / | YES V ------------------- MOV -4(R5),R4 | GET DSC LST PTR | ------------------- | V FIGURE B-1. FLOW CHART: GET. BASIC-11 EXTENSIONS Page 37 FLOW CHARTS 27 Mar 79 | V --------------- JSR PC,GETARG || GETARG || || ARG1=>R3 || --------------- | V ------------- JSR PC,TSTADR || TSTADR || ------------- | V / \ / \ / \ NO ----- ROR R3 < WORD >---->( 99$ ) BCS 99$ \ ADR / ----- \ / \ / | YES V ROL R3 ------------- MOV R3,BUSADR | SAVE ARG1 | CLR BYTFLG ------------- | V ------------- JSR PC,DELARG || DELARG || ------------- | V ----- RTS PC ( RTS ) ----- 99$: JMP $ARGER FIGURE B-1 (CONTINUED). FLOW CHART: GET. BASIC-11 EXTENSIONS Page 38 FLOW CHARTS 27 Mar 79 ------- GETB$: ( GETB ) ------- | V ----------- MOV R5,ORIGR5 | SAVE R5 | ----------- | V / \ / \ / TWO \ NO ----- CMP (R5)+,#101002 < ARGS >---->( 99$ ) BNE 99$ \ / ----- \ / \ / | YES V ------------------- MOV -4(R5),R4 | GET DSC LST PTR | ------------------- | V --------------- JSR PC,GETARG || GETARG || || ARG1=>R3 || --------------- | V ------------- JSR PC,TSTADR || TSTADR || ------------- | V ------------- MOV R3,BUSADR | SAVE ARG1 | INC BYTFLG ------------- | V ------------- JSR PC,DELARG || DELARG || ------------- | V ----- RTS PC ( RTS ) ----- 99$: JMP $ARGER FIGURE B-2. FLOW CHART: GETB. BASIC-11 EXTENSIONS Page 39 FLOW CHARTS 27 Mar 79 ------- IDEN$: ( IDEN ) ------- | V --------- JSR R1,MSG || MSG || .ASCIZ \ID MSG\ --------- | V ----- RTS PC ( RTS ) ----- FIGURE B-3. FLOW CHART: IDEN. ------- NULL$: ( NULL ) ------- | V ----------- MOV R5,ORIGR5 | SAVE R5 | ----------- | V --------------- MOV (R5)+,ARVVAL | GET # ARGS | CLRB ARGVAL+1 --------------- | V ------------------- MOV -4(R5),R4 | GET DSC LST PTR | ------------------- | V / \ / \ / ANY \ NO TST ARGVAL < ARGS >----- BEQ 2$ \ / | \ / | \ / | | YES | V V FIGURE B-4. FLOW CHART: NULL. BASIC-11 EXTENSIONS Page 40 FLOW CHARTS 27 Mar 79 | | 1$: -------->| | | V | | ------------- | JSR PC,NULARY | || NULARY || | DEC ARGVAL | ------------- | | | | | V | | / \ | | / \ | | NO / \ | BGT 1$ -----< DONE > | \ / | \ / | \ / | | YES | 2$: |<-------- V ----- RTS PC ( RTS ) ----- FIGURE B-4 (CONTINUED). FLOW CHART: NULL. ----- PUT$: ( PUT ) ----- | V ----------- MOV R5,ORIGR5 | SAVE R5 | ----------- | V / \ / \ / TWO \ NO ----- CMP (R5)+,#101002 < ARGS >---->( 99$ ) BNE 99$ \ / ----- \ / \ / | YES V ------------------- MOV -4(R5),R4 | GET DSC LST PTR | ------------------- | V FIGURE B-5. FLOW CHART: PUT. BASIC-11 EXTENSIONS Page 41 FLOW CHARTS 27 Mar 79 | V --------------- JSR PC,GETARG || GETARG || || ARG1=>R3 || --------------- | V ------------- MOV R3,ARGVAL | SAVE ARG1 | ------------- | V --------------- JSR PC,GETARG || GETARG || || ARG2=>R3 || --------------- | V ------------- JSR PC,TSTADR || TSTADR || ------------- | V / \ / \ / \ NO ----- ROR R3 < WORD >---->( 99$ ) BCS 99$ \ ADR / ----- \ / \ / | YES V ----------- ROL R3 | DEL VAL | MOV ARGVAL,(R3) ----------- | V ----- RTS PC ( RTS ) ----- 99$: JMP $ARGER FIGURE B-5 (CONTINUED). FLOW CHART: PUT. BASIC-11 EXTENSIONS Page 42 FLOW CHARTS 27 Mar 79 ------- PUTB$: ( PUTB ) ------- | V ----------- MOV R5,ORIGR5 | SAVE R5 | ----------- | V / \ / \ / TWO \ NO ----- CMP (R5)+,#101002 < ARGS >---->( 99$ ) BNE 99$ \ / ----- \ / \ / | YES V ------------------- MOV -4(R5),R4 | GET DSC LST PTR | ------------------- | V --------------- JSR PC,GETARG || GETARG || || ARG1=>R3 || --------------- | V / \ / \ / > \ YES ----- CMP R3,#127. < 127 >----->( 99$ ) BGT 99$ \ / ----- \ / \ / | NO V / \ / \ / < \ YES ----- CMP R3,#-128. < -128 >----->( 99$ ) BLT 99$ \ / ----- \ / \ / | NO V FIGURE B-6. FLOW CHART: PUTB. BASIC-11 EXTENSIONS Page 43 FLOW CHARTS 27 Mar 79 | V ------------- MOV R3,ARGVAL | SAVE ARG1 | ------------- | V --------------- JSR PC,GETARG || GETARG || || ARG2=>R3 || --------------- | V ------------- JSR PC,TSTADR || TSTADR || ------------- | V ----------- MOVB ARGVAL,(R3) | DEL VAL | ----------- | V ----- RTS PC ( RTS ) ----- 99$: JMP $ARGER FIGURE B-6 (CONTINUED). FLOW CHART: PUTB. BASIC-11 EXTENSIONS Page 44 FLOW CHARTS 27 Mar 79 ------- SBIT$: ( SBIT ) ------- | V ------------------- || AG1AG2 || JSR PC,AG1AG2 || ARG1=>ARGVAL || || ARG2=>BUSADR || ------------------- | V --------------- JSR PC,GETARG || GETARG || || ARG3=>R3 || --------------- | V / \ / \ / SET \ NO TST R3 < THE >------ BEQ 1$ \ BIT / | \ / | \ / | | YES | V | --------------- | BIS ARGVAL,@BUSADR | SET THE BIT | | BR 2$ --------------- | | | ----------- | | ----------- 1$: | V | --------------- BIC ARGVAL,@BUSADR | | CLR THE BIT | | --------------- | | 2$: --------->| V ----- RTS PC ( RTS ) ----- FIGURE B-7. FLOW CHART: SBIT. BASIC-11 EXTENSIONS Page 45 FLOW CHARTS 27 Mar 79 ------- TBIT$: ( TBIT ) ------- | V ------------------- || AG1AG2 || JSR PC,AG1AG2 || ARG1=>ARGVAL || || ARG2=>BUSADR || ------------------- | V / \ / \ / IS \ NO BIT ARGVAL,@BUSADR < BIT >----- BEQ 1$ \ SET / | \ / | \ / | | YES | V | ------------- | MOV #1,ARGVAL | SHOW SET | | BR 2$ ------------- | | | ---------- | | ---------- 1$: | V | ------------- CLR ARGVAL | | SHOW CLR | | ------------- | | 2$: -------->| V ----------- MOV #ARGVAL,BUSADR | GET PTR | CLR BYTFLG ----------- | V ------------- JSR PC,DELARG || DELARG || ------------- | V ----- RTS PC ( RTS ) ----- FIGURE B-8. FLOW CHART: TBIT. BASIC-11 EXTENSIONS Page 46 FLOW CHARTS 27 Mar 79 --------- AG1AG2: ( AG1AG2 ) --------- | V ----------- MOV R5,ORIGR5 | SAVE R5 | ----------- | V / \ / \ / 3 \ NO ----- CMP (R5)+,#101003 < ARGS >---->( 99$ ) BNE 99$ \ / ----- \ / \ / | YES V ------------------- MOV -4(R5),R4 | GET DSC LST PTR | ------------------- | V --------------- JSR PC,GETARG || GETARG || || ARG1=>R3 || --------------- | V ----------------- JSR PC,BITMSK || BITMSK || || MSK=>ARGVAL || ----------------- | V --------------- JSR PC,GETARG || GETARG || || ARG2=>R3 || --------------- | V ------------- JSR PC,TSTADR || TSTADR || ------------- | V FIGURE B-9. FLOW CHART: AG1AG2. BASIC-11 EXTENSIONS Page 47 FLOW CHARTS 27 Mar 79 | V / \ / \ / \ NO ----- ROR R3 < WORD >---->( 99$ ) BCS 99$ \ ADR / ----- \ / \ / | YES V ROL R3 ------------- MOV R3,BUSADR | SAVE ARG2 | CLR BYTFLG ------------- | V ----- RTS PC ( RTS ) ----- 99$: JMP $ARGER FIGURE B-9 (CONTINUED). FLOW CHART: AG1AG2. BASIC-11 EXTENSIONS Page 48 FLOW CHARTS 27 Mar 79 --------- BITMSK: ( BITMSK ) --------- | V / \ / \ / ARG \ YES ----- TST R3 < <0 >----->( 99$ ) BLT 99$ \ / ----- \ / \ / | NO V / \ / \ / ARG \ YES ----- CMP R3,#15. < >15 >----->( 99$ ) BGT 99$ \ / ----- \ / \ / | NO V ----------- CLR ARGVAL | CLR MSK | SEC ----------- | 1$: |<-------- V | ------------- | ROL ARGVAL | MAKE MASK | | DEC R3 ------------- | | | V | / \ | / \ | / \ NO | BGE 1$ < DONE >----- \ / \ / \ / | YES V ----- RTS PC ( RTS ) ----- 99$: JMP $ARGER FIGURE B-10. FLOW CHART: BITMSK. BASIC-11 EXTENSIONS Page 49 FLOW CHARTS 27 Mar 79 --------- DELARG: ( DELARG ) --------- | V ----------------- || GETDSC || JSR PC,GETDSC || DSC PTR=>R2 || || DSC WRD=>R3 || ----------------- | V / \ / \ / OCT \ NO BIT #100,R3 < ARG >----- BEQ 1$ \ / | \ / | \ / | | YES | V | ------------- | JSR PC,DELOCT || DELOCT || | BR 3$ ------------- | | | ---------- | | ---------- 1$: | V | / \ | / \ | / \ NO BIT #40,R3 | < REAL >----- BEQ 2$ | \ ARG / | | \ / | | \ / | | | YES | | V | | ------------- | JSR PC,DELREL | || DELREL || | BR 3$ | ------------- | | | | |<-------- | 2$: | ---------- | V | ------------- JSR PC,DELINT | || DELINT || | ------------- | | -------->| 3$: V FIGURE B-11. FLOW CHART: DELARG. BASIC-11 EXTENSIONS Page 50 FLOW CHARTS 27 Mar 79 | V ----------- TST (R5)+ | BUMP R5 | ----------- | V ----- RTS PC ( RTS ) ----- FIGURE B-11 (CONTINUED). FLOW CHART: DELARG. --------- DELINT: ( DELINT ) --------- | V / \ / \ / DEL \ NO TST BYTFLG < BYTE >---- BEQ 1$ \ / | \ / | \ / | | YES | V V ----------- | MOVB @BUSADR,@(R5) | DEL BYT | | BR 2$ ----------- | | | --------- | | --------- 1$: | V | ----------- MOV @BUSADR,@(R5) | | DEL WRD | | ----------- | | 2$: ------->| V ----- RTS PC ( RTS ) ----- FIGURE B-12. FLOW CHART: DELINT. BASIC-11 EXTENSIONS Page 51 FLOW CHARTS 27 Mar 79 --------- DELOCT: ( DELOCT ) --------- | V ------------- JSR R5,PSHRGS || PSHRGS || ------------- | V MOV #10$,-(SP) ------------- MOV #6,-(SP) || PSHVAL || PSHVAL ------------- | V ----------- JSR PC,$OCO || $OCO || ----------- | V / \ / \ / \ YES ----- BCS 99$ < ERR >----->( 99$ ) \ / ----- \ / \ / | NO V ------------- JSR R5,POPRGS || POPRGS || ------------- | MOV 2(R2),11$ V MOV #6,R0 ----------- MOV #100,R1 || $ALC || MOV R5,CRNTR5 ----------- MOV ORIGR5,R5 | JSR PC,$ALC V / \ / \ / \ YES ------ BCS 100$ < ERR >----->( 100$ ) \ / ------ \ / \ / | NO V FIGURE B-13. FLOW CHART: DELOCT. BASIC-11 EXTENSIONS Page 52 FLOW CHARTS 27 Mar 79 | V ------------- MOV #6,R1 | PREP FOR | MOV #10$,R3 | STR MOV | ------------- | 3$: |<-------- V | ----------- | MOVB (R3)+,(R0)+ | MOV STR | | DEC R1 ----------- | | | V | / \ | / \ | / \ NO | BNE 3$ < DONE >----- \ / \ / \ / | YES V MOV SP,R0 ------------- MOV 11$,R1 || $STORE || JSR PC,$STORE ------------- | V ------------- JSR PC,$DEALC || $DEALC || ------------- | V --------------- NOV CRNTR5,R5 | RESTORE R5 | --------------- | V ----- RTS PC ( RTS ) ----- 10$: .BLKB 6 ;STRING SPACE 11$: 0 ;STRING REFERENCE POINTER 99$: JMP $ARGER 100$: JSR R1,$BOMB .ASCIZ \ERR MSG\ FIGURE B-13 (CONTINUED). FLOW CHART: DELOCT. BASIC-11 EXTENSIONS Page 53 FLOW CHARTS 27 Mar 79 --------- DELREL: ( DELREL ) --------- | V ------------- PSHVAL || PSHVAL || ------------- | V ------------- JSR R4,$POLSH || $POLSH || ------------- | V --------- $IR || $IR || --------- | V ------------- $UNPOL || $UNPOL || ------------- | V ----------- MOV (R5),R3 | GET PTR | ----------- | V ------------- MOV (SP)+,(R3) | DEL REAL | MOV (SP)+,2(R3) ------------- | V ----- RTS PC ( RTS ) ----- FIGURE B-14. FLOW CHART: DELREL. BASIC-11 EXTENSIONS Page 54 FLOW CHARTS 27 Mar 79 --------- GETARG: ( GETARG ) --------- | V ----------------- || GETDSC || JSR PC,GETDSC || DSC PTR=>R2 || || DSC WRD=>R3 || ----------------- | V / \ / \ / OCT \ NO BIT #100,R3 < ARG >----- BEQ 1$ \ / | \ / | \ / | | YES | V | ------------- | JSR PC,GETOCT || GETOCT || | BR 3$ || ARG=>R3 || | ------------- | | | ---------- | | ---------- 1$: | V | / \ | / \ | / \ NO BIT #40,R3 | < REAL >----- BEQ 2$ | \ ARG / | | \ / | | \ / | | | YES | | V | | ------------- | JSR PC,GETREL | || GETREL || | BR 3$ | || ARG=>R3 || | | ------------- | | | | |<-------- | V V FIGURE B-15. FLOW CHART: GETARG. BASIC-11 EXTENSIONS Page 55 FLOW CHARTS 27 Mar 79 | | | ---------- 2$: | V | ----------- MOV @(R5),R3 | | INT | | | ARG=>R3 | | ----------- | | 3$: -------->| V ----------- TST (R5)+ | BUMP R5 | ----------- | V ----- RTS PC ( RTS ) ----- FIGURE B-15 (CONTINUED). FLOW CHART: GETARG. BASIC-11 EXTENSIONS Page 56 FLOW CHARTS 27 Mar 79 --------- GETDSC: ( GETDSC ) --------- | V --------------- MOV R4,R2 | DSC WRD=>R2 | MOV (R4)+,R3 | DSC PTR=>R3 | --------------- | V / \ / \ / \ YES BIT #1,R3 < R3 >------ BNE 1$ \ PTR / | \ / | \ / | | NO | V | --------------- | MOV R3,R2 | DSC WRD=>R2 | | MOV (R3),R3 | DSC PTR=>R3 | | --------------- | | | 1$: |<--------- V / \ / \ / \ YES ----- CMP #177,R3 < NULL >----->( 99$ ) BEQ 99$ \ ARG / ----- \ / \ / | NO V ----- RTS PC ( RTS ) ----- 99$: JMP $ARGER FIGURE B-16. FLOW CHART: GETDSC. BASIC-11 EXTENSIONS Page 57 FLOW CHARTS 27 Mar 79 --------- GETOCT: ( GETOCT ) --------- | | MOV 2(R2),R0 V MOV #100,R1 ----------- MOV R5,CRNTR5 || $FIND || MOV ORIGR5,R5 ----------- JSR PC,$FIND | V ------------- JSR R5,PSHRGS || PSHRGS || ------------- | V MOV R0,-(SP) ----------- MOV R1,-(SP) || $OCI || JSR PC,$OCI ----------- | V / \ / \ / \ YES ----- BCS 99$ < ERR >----->( 99$ ) \ / ----- \ / \ / | NO V ----------- MOV (SP)+,6(SP) | ARG=>R3 | ----------- | V ------------- JSR R5,POPRGS || POPRGS || ------------- | V --------------- MOV CRNTR5,R5 | RESTORE R5 | --------------- | V ----- RTS PC ( RTS ) ----- 99$: JMP $ARGER FIGURE B-17. FLOW CHART: GETOCT. BASIC-11 EXTENSIONS Page 58 FLOW CHARTS 27 Mar 79 --------- GETREL: ( GETREL ) --------- | V ----------- MOV (R5),R3 | GET PTR | ----------- | V ----------- MOV 2(R3),-(SP) | PSH REL | MOV (R3),-(SP) | ARG | ----------- | V ------------- JSR R4,$POLSH || $POLSH || ------------- | V --------- $RI || $RI || --------- | V ------------- $UNPOL || $UNPOL || ------------- | V ----------- MOV (SP)+,R3 | ARG=>R3 | ----------- | V ----- RTS PC ( RTS ) ----- FIGURE B-18. FLOW CHART: GETREL. BASIC-11 EXTENSIONS Page 59 FLOW CHARTS 27 Mar 79 --------- NULARY: ( NULARY ) --------- | V ----------------- || GETDSC || JSR PC,GETDSC || DSC PTR=>R2 || || DSC WRD=>R3 || ----------------- | V / \ / \ / \ NO ----- BIT #20000,R3 < ARY >---->( 99$ ) BEQ 99$ \ / ----- \ / \ / | YES V / \ / \ / \ NO BIT #100,R3 < OCT >----- BEQ 1$ \ / | \ / | \ / | | YES | V | ------------- | JSR PC,NULOCT || NULOCT || | BR 2$ ------------- | | | ---------- | | ---------- 1$: | V | ------------- JSR PC,NULNUM | || NULNUM || | ------------- | | 2$: -------->| V ----- RTS PC ( RTS ) ----- 99$: JMP $ARGER FIGURE B-19. FLOW CHART: NULARY. BASIC-11 EXTENSIONS Page 60 FLOW CHARTS 27 Mar 79 --------- NULNUM: ( NULNUM ) --------- | V ----------- MOV 4(R2),R2 | GET LEN | ASR R2 | IN WRDS | ----------- | V ----------- MOV (R5)+,R3 | GET PTR | ----------- | 1$: |<--------- V | ----------- | CLR (R3)+ | NUL ARY | | DEC R2 ----------- | | | | | / \ | / \ | / \ NO | BGT 1$ < DONE >------ \ / \ / \ / | YES V ----- RTS PC ( RTS ) ----- FIGURE B-20. FLOW CHART: NULNUM. BASIC-11 EXTENSIONS Page 61 FLOW CHARTS 27 Mar 79 --------- NULOCT: ( NULOCT ) --------- | V ----------- MOV 4(R2),R2 | GET LEN | ASR R2 | IN WRDS | ----------- | V ----------- MOV (R5)+,R3 | GET PTR | ----------- | 1$: |<--------- V | ----------- | MOV #-1,(R3)+ | NUL ARY | | DEC R2 ----------- | | | V | / \ | / \ | / \ NO | BGT 1$ < DONE >------ \ / \ / \ / | YES V ----- RTS PC ( RTS ) ----- FIGURE B-21. FLOW CHART: NULOCT. BASIC-11 EXTENSIONS Page 62 FLOW CHARTS 27 Mar 79 --------- POPRGS: ( POPRGS ) --------- | V ----------- TST (SP)+ | ADJ SP | ----------- | V MOV (SP)+,R0 ----------- MOV (SP)+,R1 | RESTORE | MOV (SP)+,R2 | REGS | MOV (SP)+,R3 ----------- MOV (SP)+,R4 | V ----- RTS R5 ( RTS ) ----- FIGURE B-22. FLOW CHART: POPRGS. --------- PSHRGS: ( PSHRGS ) --------- | V MOV R4,-(SP) --------- MOV R3,-(SP) | SAVE | MOV R2,-(SP) | REGS | MOV R1,-(SP) --------- MOV R0,-(SP) | V ----- JMP R5 ( JMP ) ----- FIGURE B-23. FLOW CHART: PSHRGS BASIC-11 EXTENSIONS Page 63 FLOW CHARTS 27 Mar 79 --------- V ----------- MOV #1$,@#TIMOUT | NEW VEC | ----------- | V / \ / \ / \ NO TSTB (R3) < REAL >---- \ ADR / | \ / | \ / | | YES | V | ----------- | MOV 2$,@#TIMOUT | RST VEC | | ----------- | | | V | ----- | RTS PC ( RTS ) | ----- | --------- 1$: V ----------- MOV 2$,@#TIMOUT | RST VEC | ----------- | V ----------- JSR R1,$BOMB || $BOMB || .ASCIZ \ERR MSG\ ----------- | V ----- ( RDY ) ----- 2$: 0 ;SAVE TRAP VECTOR HERE FIGURE B-24. FLOW CHART: TSTADR. BASIC-11 EXTENSIONS Page 64 FLOW CHARTS 27 Mar 79 --------- .MACRO PSHVAL ( PSHVAL ) --------- | V / \ / \ / \ NO TST BYTFLG < BYTE >---- BEQ 1$ \ / | \ / | \ / | | YES | V | MOVB @BUSADR,-(SP) ----------- | CLRB 1(SP) | PSH BYT | | BR 2$ ----------- | | | --------- | | --------- 1$: | V | ----------- MOV @BUSADR,-(SP) | | PSH WRD | | ----------- | | 2$: ------->| V ----- .ENDM ( ENM ) ----- FIGURE B-25. FLOW CHART: PSHVAL. BASIC-11 EXTENSIONS Page 65 REFERENCES 27 Mar 79 REFERENCES 1. N. A. Bourgeois, Jr. ,"Set of Utility Routines for any PDP-11 Machine Running RT-11 BASIC", DECUS-11-294, Digital Equipment Computer Users Society, Marlboro, MA, 10-Jan-77. 2. "BASIC-11 Language Reference Manual", DEC-11-LIBBB-A-D, Digital Equipment Corporation, Maynard, MA, Sep-76. 3. "BASIC-11/RT-11 User's Guide", DEC-11-LIBUA-A-D, Digital Equipment Corporation, Maynard, MA, Aug-77. 4. "BASIC-11/RT-11 Installation Guide", DEC-11-LIBTA-A-D, Digital Equipment Corporation, Maynard, MA, Aug-77. 5. "PDP-11 MACRO-11 Language Reference Manual", AA-5075A-TC, Digital Equipment Corporation, Maynard, MA, Aug-77. 6. "RT-11 System User's Guide", DEC-11-ORGDA-A-D, Digital Equipment Corporation, Maynard, MA, Aug-77. 7. "PDP-11 TECO User's Guide", DEC-11-UTECA-A-D, Digital Equipment Corporation, Maynard, MA, Sep-77. 8. Edward Yourdon, "Techniques of Program Structure and Design", Prentice-Hall, Englewood Cliff, NJ, 1975. BASIC-11 EXTENSIONS Page 66 INDEX 27 Mar 79 INDEX ARGUMENT ERROR . . . . . . . 10 Error messages . . . . . . . 10 Extensions . . . . . . . . . 7 GET . . . . . . . . . . . . . 7, 8, 14, 15, 35, 36 GETB . . . . . . . . . . . . 7, 8, 9, 15, 16, 38 IDEN . . . . . . . . . . . . 7, 8, 9, 14, 39 Installation . . . . . . . . 11 NO STRING SPACE . . . . . . . 10 NULL . . . . . . . . . . . . 7, 8, 9, 17, 39 null arguments . . . . . . . 8 ODT . . . . . . . . . . . . . 21, 22 PUT . . . . . . . . . . . . . 7, 8, 9, 14, 15, 17, 35, 40 PUTB . . . . . . . . . . . . 7, 8, 9, 15, 16, 42 Routines . . . . . . . . . . 7 SBIT . . . . . . . . . . . . 7, 8, 10, 17, 18, 19, 44 TBIT . . . . . . . . . . . . 7, 8, 10, 17, 18, 19, 45 Testing . . . . . . . . . . . 14 UNIMPLEMENTED BUS ADDRESS . . 10 BASIC-11 EXTENSIONS Page 67 DISTRIBUTION 27 Mar 79 DISTRIBUTION HEADQUARTERS ESD/MCB/STOP 36 HANSCOM AFB, MA 01731 ATTN: COL. R. T. KOZUMA, OCB HEADQUARTERS ROME AIR DEVELOPMENT CENTER (AFCS) GRIFFISS AFB, NY 13441 ATTN: MR. R. ALLEN, OCDS US ARMY MOBILITY EQUIPMENT RESEARCH AND DEVELOPMENT COMMAND FT. BELVOIR, VA 22060 ATTN: MR. D. KEEHAN, DRXFB-XS NAVAL UNDERSEA CENTER SAN DIEGO, CA 92132 ATTN: MR. J. REDFERN INSTITUTE FOR COMPUTER SCIENCES AND TECHNOLOGY US DEPARTMENT OF COMMERCE NATIONAL BUREAU OF STANDARDS WASHINGTON, DC 20234 ATTN: MR. R. T. MOORE, CHIEF COMPUTER SYSTEMS SECTION DEPARTMENT OF THE NAVY NAVAL COASTAL SYSTEMS LABS PANAMA CITY, FL 32401 ATTN: MR. R. FORBUS DIRECTOR DEFENSE NUCLEAR AGENCY WASHINGTON, DC 20305 ATTN: M. BEASLEY, NSSO KANSAS STATE UNIVERSITY DEPARTMENT OF ELECTRICAL ENGINEERING MANHATTAN, KS 66506 ATTN: PROF. N. AHMED NEW MEXICO STATE UNIVERSITY DEPARTMENT OF COMPUTER SCIENCE LAS CRUCES, NM 88003 ATTN: PROF. D. DEARHOLT BASIC-11 EXTENSIONS Page 68 DISTRIBUTION 27 Mar 79 1111 S. D. STEARNS 1521 J. L. MORTLEY 1554 N. J. POLLARD 1584 T. M. SCHULTHEIS 1736 D. C. HANSON 1736 N. A. BOURGEOIS, JR. (6) 1736 G. W. DONOHOE 1736 G. R. ELLIOTT (5) 1736 R. P. KROMER 2351 T. C. BRYANT, JR. 2355 D. H. JENSEN 2522 J. B. ALLEN 2532 R. A. HAYENGA 2534 R. W. ROBERTS 2627 R. M. JAMES 2648 L. F. TOLENDINO 2648 T. M. UNKELHAEUSER 3141 T. L. WERNER (5) 3151 W. L. GARNER (3) FOR DOE/TIC (UNLIMITED RELEASE) 3172-3 R. P. CAMPBELL (25) FOR DOE/TIC 5722 B. STIEFELD 8266 E. A. AAS 8466 D. N. TANNER 9323 F. I. MAGEE 9323 R. E. TRELLUE 9526 A. J. ROTH 9583 D. M. MORRISON