! DATBAS.RNO NAB 09-OCT-78/14-NOV-78 .FOOTNOTE 1 .CENTER ##############78K14B ! EDIT LEVEL .LEFT MARGIN 6 .RIGHT MARGIN 68 .UPPER CASE .NOFILL .NOJUSTIFY .NONUMBER .FIGURE 15 .CENTER ##############SOME PDP-11 BASIC-11 EXTENSION ROUTINES .BLANK 5 .CENTER ##############N.#A.#Bourgeois,#Jr. .CENTER ##############Advanced Systems Development Division 1736 .CENTER ##############Sandia Laboratories .CENTER ##############P.#O.#Box 5800 .CENTER ##############Albuquerque, NM 87185 .CENTER ##############505-264-8088 .CENTER ##############FTS 475-8088 .BLANK 5 .CENTER ##############ABSTRACT .FILL .JUSTIFY .PARAGRAPH Some extension routines to Digital Equipment Corporation's BASIC-11 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. .BREAK ! DISCLAIMER NAB 17-JUL-78/09-NOV-78 .PAGE .TITLE ######BASIC-11 EXTENSIONS .LEFT MARGIN 6 .RIGHT MARGIN 68 .FILL .JUSTIFY .UPPER CASE .NUMBER 1 .DATE .FIGURE 12 .PARAGRAPH This document is issued by Sandia Laboratories, operated for the United States Department of Energy by Sandia Corporation. .BLANK .CENTER ##############NOTICE .PARAGRAPH 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, subcontractord, 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. .PARAGRAPH This work was sponsored and funded by: .INDENT 8 Base and Installation Security Systems Program Office .INDENT 8 Electronic Systems Division .INDENT 8 Air Force Systems Command .INDENT 8 Hanscom Air Force Base, MA 01731 .BLANK 5 .CENTER ##############**************** .CENTER ##############* * .CENTER ##############* UNCLASSIFIED * .CENTER ##############* * .CENTER ##############**************** .BREAK ! ACKNOWLEDGEMENT NAB 10-OCT-78/09-NOV-78 .SUBTITLE ######ACKNOWLEDGEMENT .PAGE .LEFT MARGIN 10 .RIGHT MARGIN 64 .TAB STOPS 8,16,24,32,40,48,56,64 .UPPER CASE .FILL .JUSTIFY .FIGURE 23 .CENTER ##############ACKNOWLEDGEMENT .BLANK .PARAGRAPH 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 extension routines described in this paper. The author's original software was written to be compatible with RT-11 V02 [6]. .RIGHT MARGIN 68 .BREAK ! TABLE OF CONTENTS NAB 09-OCT-78/14-NOV-78 .SUBTITLE ######TABLE OF CONTENTS .PAGE .LEFT MARGIN 16 .RIGHT MARGIN 68 .TAB STOPS 8,16,24,32,40,48,56,64 .UPPER CASE .NOFILL .NOJUSTIFY .FIGURE 3 .CENTER ##############TABLE OF CONTENTS .BLANK 2 Introduction 4 .BLANK The Extension Routines 6 .BLANK Installation 9 .BLANK Testing the Routines 12 .BLANK Appendix 20 .BLANK References 33 .BLANK Index 34 .BLANK 2 TABLES .BLANK ##I. The Extension Routines 5 .BLANK ##II. The DATBAS files 9 .BLANK ##III. Descriptor Words 21 .BLANK 2 FIGURES. Pointer Maps .BLANK ##I. Null Arguments 21 .BLANK ##II. Constants 22 .BLANK ##III. Undefined Variables 23 .BLANK ##IV. Defined Variables 24 .BLANK ##V. One Dimension Arrays 25-26 Undefined Elements .BLANK ##VI. One dimension Arrays 26-27 Defined Elements .BLANK ##VII. One Dimension Arrays 28-29 Specific Elements .BLANK ##VIII. Two Dimension Arrays 29-31 Defined Elements .BLANK ##IX. Two Dimension Arrays 31-32 Specific Elements .BREAK ! INTRODUCTION NAB 09-OCT-78/25-OCT-78 .SUBTITLE ######INTRODUCTION .PAGE .LEFT MARGIN 6 .RIGHT MARGIN 68 .FILL .JUSTIFY .UPPER CASE .TAB STOPS 8,16,24,32,40,48,56,64 .FIGURE 8 .CENTER ##############INTRODUCTION .BLANK .PARAGRAPH 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. .PARAGRAPH 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. [1,2,3,4,5] .FOOTNOTE 2 .LEFT MARGIN 11 .RIGHT MARGIN 63 .FILL .JUSTIFY .UPPER CASE *##DEC, PDP and UNIBUS are registered trademarks of Digital Equipment Corporation, Maynard, MA. .LEFT MARGIN 6 .RIGHT MARGIN 68 ! .PARAGRAPH 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. .PAGE .LEFT MARGIN 6 .RIGHT MARGIN 68 .NOFILL .NOJUSTIFY .FIGURE 12 .INDEX GET GET(ARG1,ARG2) Input a word from a UNIBUS address ARG1 UNIBUS word address ARG2 Word value returned .BLANK .INDEX GETB GETB(ARG1,ARG2) Input a byte from a UNIBUS address ARG1 UNIBUS byte address ARG2 Byte value returned .BLANK .INDEX IDEN IDEN Output identification message .BLANK .INDEX NULL NULL(ARG1(),ARG2(),...) Zero array(s) ARG()'s Name(s) of array(s) .BLANK .INDEX PUT PUT(ARG1,ARG2) Output a word to a UNIBUS address ARG1 Word value delivered ARG2 UNIBUS word address .BLANK .INDEX PUTB PUTB(ARG1,ARG2) Output a byte to a UNIBUS address ARG1 Byte value delivered ARG2 UNIBUS byte address .BLANK .INDEX SBIT SBIT(ARG1,ARG2,ARG3) Set or clear a bit at a UNIBUS address ARG1 Bit number ARG2 UNIBUS word address ARG2 Bit value .BLANK .INDEX TBIT TBIT(ARG1,ARG2,ARG3) Test a bit at a UNIBUS address ARG1 Bit number ARG2 UNIBUS word address ARG3 Bit value .BLANK .CENTER ##############TABLE I. .INDEX Extensions .INDEX Routines .CENTER ##############THE EXTENSION ROUTINES .BLANK 2 .FILL .JUSTIFY .BREAK ! ROUTINES NAB 09-OCT-78/25-OCT-78 .SUBTITLE ######THE EXTENSION ROUTINES .PAGE .LEFT MARGIN 6 .RIGHT MARGIN 68 .FILL .JUSTIFY .UPPER CASE .TAB STOPS 8,16,24,32,40,48,56,64 .FIGURE 8 .CENTER ##############THE EXTENSION ROUTINES .BLANK .PARAGRAPH The "BASIC-11 Language Reference Manual" [1] and the "BASIC-11/RT-11 User's Guide" [2] 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. .PARAGRAPH .INDEX GET .INDEX GETB .INDEX PUT .INDEX PUTB .INDEX SBIT .INDEX TBIT 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". [1] .PARAGRAPH .INDEX IDEN No arguments are required with the IDEN routine. .PARAGRAPH .INDEX NULL 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). .PARAGRAPH .INDEX null arguments Null arguments are not allowed. .PARAGRAPH 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. .BLANK .TEST PAGE 12 .PARAGRAPH .INDEX GET GET####Deliver the contents of the UNIBUS word address of argument one into the BASIC-11 variable named in argument two. .NOFILL .NOJUSTIFY .BLANK Calling sequence: CALL GET(ARG1,ARG2) .BLANK 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 .FILL .JUSTIFY .BLANK .TEST PAGE 13 .PARAGRAPH .INDEX GETB GETB####Deliver the contents of the UNIBUS byte address of argument one into the BASIC-11 variable named in argument two. .NOFILL .NOJUSTIFY .BLANK Calling sequence: CALL GETB(ARG1,ARG2) .BLANK 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 .FILL .JUSTIFY .BLANK .TEST PAGE 6 .PARAGRAPH .INDEX IDEN IDEN####Output a message identifying the extended BASIC-11 interpreter. No arguments are required. .NOFILL .NOJUSTIFY .BLANK Calling sequence: CALL IDEN .FILL .JUSTIFY .BLANK .TEST PAGE 9 .PARAGRAPH .INDEX NULL 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. .NOFILL .NOJUSTIFY .BLANK Calling sequence: CALL NULL(ARG1(),ARG2(),...) .FILL .JUSTIFY .BLANK .TEST PAGE 12 .PARAGRAPH .INDEX PUT PUT####Deposit the value of argument one at the UNIBUS word address of argument two. .NOFILL .NOJUSTIFY .BLANK Calling sequence: CALL PUT(ARG1,ARG2) .BLANK 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 .FILL .JUSTIFY .BLANK .TEST PAGE 12 .PARAGRAPH .INDEX PUTB PUTB####Deposit the value of argument one at the UNIBUS byte address of argument two. .NOFILL .NOJUSTIFY .BLANK Calling sequence: CALL PUTB(ARG1,ARG2) .BLANK 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 .FILL .JUSTIFY .BLANK .TEST PAGE 13 .PARAGRAPH .INDEX SBIT SBIT####Set the bit named in argument one at the UNIBUS word address of argument two to the value given in argument three. .NOFILL .NOJUSTIFY .BLANK Calling sequence: CALL SBIT(ARG1,ARG2,ARG3) .BLANK 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 .FILL .JUSTIFY .BLANK .TEST PAGE 14 .PARAGRAPH .INDEX TBIT 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. .NOFILL .NOJUSTIFY .BLANK Calling sequence: CALL TBIT(ARG1,ARG2,ARG3) .BLANK 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 .FILL .JUSTIFY .BLANK .PARAGRAPH .INDEX Error messages 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. .PARAGRAPH .INDEX ARGUMENT ERROR ?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. [1] .PARAGRAPH .INDEX NO STRING SPACE ?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. .PARAGRAPH .INDEX UNIMPLEMENTED BUS ADDRESS ?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. .BREAK ! INSTALLATION NAB 09-OCT-78/14-NOV-78 .SUBTITLE ######INSTALLATION .PAGE .LEFT MARGIN 6 .RIGHT MARGIN 68 .FILL .JUSTIFY .UPPER CASE .TAB STOPS 8,16,24,32,40,48,56,64 .INDEX Installation .FIGURE 8 .CENTER ##############INSTALLATION .BLANK .PARAGRAPH The "BASIC-11/RT-11 Installation Guide" [3] describes the general technique used to install assembly language routines into the BASIC-11 interpreter. .PARAGRAPH Table II 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. .PARAGRAPH 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. .LEFT MARGIN 32 .BLANK 2 .TEST PAGE 27 .INDENT -16 FILE NAME#######DESCRIPTION .BLANK .INDENT -16 DATBAS.BAS######BASIC-11 program to test the extension routines of DATBAS.MAC. .BLANK .INDENT -16 DATBAS.DAT######Resulting output from execution of DATBAS.BAS. .BLANK .INDENT -16 DATBAS.DIR######This directory of the DATBAS package. .BLANK .INDENT -16 DATBAS.DOC######Full description of the DATBAS package. .BLANK .INDENT -16 DATBAS.HLP######Brief description of the use of the DATBAS.MAC extension routines. .BLANK .INDENT -16 DATBAS.MAC######MACRO-11 source of the extension routines. .BLANK .INDENT -16 DATBAS.RNO######Source file for DATBAS.DOC. .BLANK .INDENT -16 DATBAS.TEC######TECO macro to make DATCLI.MAC. .BLANK .CENTER ##############TABLE II. .CENTER ##############THE DATBAS FILES .PAGE .LEFT MARGIN 6 .PARAGRAPH DATCLI.MAC is constructed from BSCLI.MAC by executing the TECO macro file DATBAS.TEC. It adds the globals and the FTBL entries required to access the DATBAS.MAC routines. The following commands accomplish this. .TEST PAGE 3 .NOFILL .NOJUSTIFY .BLANK .SET EDIT TECO .EDIT/EXEC DATBAS .FILL .JUSTIFY .PARAGRAPH 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. .TEST PAGE 4 .NOFILL .NOJUSTIFY .BLANK .RUN MACRO *DATCLI,LP:' 123' THEN PRINT _#1,' ERROR: Z$<>123' 420 GOSUB 3040 _\ REM INTEGER CONSTANTS .RIGHT MARGIN 68 .PAGE .RIGHT MARGIN 72 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) .INDEX GET 480 CALL GET(254,Z) 490 IF Z<>83 THEN PRINT _#1,' ERROR: Z<>83' 500 GOSUB 3120 _\ REM STRING EXPRESSIONS .INDEX PUT 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 .BLANK 870 PRINT _#1 880 PRINT _#1 890 PRINT _#1,'TEST PUTB _& GETB' 900 GOSUB 3000 _\ REM STRING CONSTANTS .INDEX PUTB 910 CALL PUTB('123','376') .INDEX GETB 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%) .RIGHT MARGIN 68 .PAGE .RIGHT MARGIN 72 960 CALL GETB(255%,Z%) 970 IF Z%<>83% THEN PRINT _#1,' ERROR: Z%<>83' 980 GOSUB 3080 _\ REM NUMERIC CONSTANTS .INDEX PUTB 990 CALL PUTB(83,254) .INDEX GETB 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 .BLANK 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 .RIGHT MARGIN 68 .PAGE .RIGHT MARGIN 72 .INDEX NULL 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 .BLANK 1730 PRINT _#1 1740 PRINT _#1 1750 PRINT _#1,'TEST SBIT _& TBIT' .INDEX PUT 1760 CALL PUT(0,254) 1770 GOSUB 3080 _\ REM NUMERIC CONSTANTS .INDEX SBIT 1780 CALL SBIT(5,254,1) .INDEX TBIT 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 .RIGHT MARGIN 68 .PAGE .RIGHT MARGIN 72 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 .INDEX SBIT 2060 CALL SBIT(2*3.5,2*A,3-3) .INDEX TBIT 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) .RIGHT MARGIN 68 .PAGE .RIGHT MARGIN 72 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 .INDEX SBIT 2670 CALL SBIT(I,A(0),V1) .INDEX TBIT 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 .BLANK 3000 PRINT _#1 3010 PRINT _#1,' STRING CONSTANTS' 3020 GOSUB 3750 _\ REM TIME DELAY 3030 RETURN .BLANK 3040 PRINT _#1 3050 PRINT _#1,' INTEGER CONSTANTS' 3060 GOSUB 3750 _\ REM TIME DELAY .RIGHT MARGIN 68 .PAGE .RIGHT MARGIN 72 3070 RETURN .BLANK 3080 PRINT _#1 3090 PRINT _#1,' NUMERIC CONSTANTS' 3100 GOSUB 3750 _\ REM TIME DELAY 3110 RETURN .BLANK 3120 PRINT _#1 3130 PRINT _#1,' STRING EXPRESSIONS' 3140 A$='3' 3150 V$='1' 3160 Z$='' 3170 GOSUB 3750 _\ REM TIME DELAY 3180 RETURN .BLANK 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 .BLANK 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 .BLANK 3330 PRINT _#1 3340 PRINT _#1,' STRING VARIABLES' 3350 A$='376' 3360 V$='123' 3370 Z$='' 3380 GOSUB 3750 _\ REM TIME DELAY 3390 RETURN .BLANK 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 .BLANK 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 .RIGHT MARGIN 68 .PAGE .RIGHT MARGIN 72 .BLANK 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 .BLANK 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 .BLANK 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 .BLANK .INDEX ODT 3750 FOR K%=0% TO 1% _\ REM MAKE 1000% FOR ODT 3760 NEXT K% 3770 RETURN .BLANK 3780 END .RIGHT MARGIN 68 .BREAK ! APPENDIX NAB 09-OCT-78/14-NOV-78 .SUBTITLE ######APPENDIX .PAGE .LEFT MARGIN 6 .RIGHT MARGIN 68 .FILL .JUSTIFY .UPPER CASE .TAB STOPS 8,16,24,32,40,48,56,64 .FIGURE 8 .CENTER ##############APPENDIX .CENTER ##############MISCELLANEOUS COMMENTS .BLANK .PARAGRAPH The "BASIC-11/RT-11 User's Guide" [2] 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" [3]. This appendix will add to the information contained in these two references. .PARAGRAPH .INDEX ODT It is convenient to use the Online Debugging Technique (ODT) [5] 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. .PARAGRAPH 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. .PARAGRAPH 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 I through IX 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. .PARAGRAPH Some selected descriptor words are given in Table III. .PARAGRAPH 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). BASIC11 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). .PARAGRAPH .INDEX PUT .INDEX GET 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. .NOFILL .NOJUSTIFY .BLANK 3 .TEST PAGE 12 377 Null argument .BLANK 1023 Integer variable .BLANK 1100 String variable or array element .BLANK 1223 Integer constant .BLANK 2041 Numeric variable .BLANK 2241 Numeric constant .BLANK 21022 Integer array .BLANK 21100 String array .BLANK 22040 Numeric array .BLANK .CENTER ##############TABLE III. .CENTER ##############DESCRIPTOR WORDS .TEST PAGE 21 .LEFT MARGIN 18 .BLANK 3 CALL DUMY(,,) .BLANK DSC LST ARG LST ---------- ---------- | 377 |<---| 137634 | R5 ---------- ---------- ---------- | 377 | | 10103 |<---| 137624 | ---------- ---------- ---------- | 377 | | 177777 | ---------- ---------- | 177777 | ---------- | 177777 | ---------- .BLANK .CENTER ##############FIGURE I. .CENTER ##############POINTER MAP .CENTER ##############NULL ARGUMENTS .PAGE .LEFT MARGIN 14 .FIGURE 10 CALL DUMY(1%,2,'3') .BLANK 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 | ---------- .BLANK .CENTER ##############FIGURE II. .CENTER ##############POINTER MAP .CENTER ##############CONSTANTS .PAGE .LEFT MARGIN 14 .FIGURE 13 CALL DUMY(A,A%,A$) .BLANK 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 | ---------- .BLANK .CENTER ##############FIGURE III. .CENTER ##############POINTER MAP .CENTER ##############UNDEFINED VARIABLES .PAGE .LEFT MARGIN 14 .FIGURE 6 A=.5 _\ A%=5% _\ A$='DUMY' CALL DUMY(A,A%,A$) .BLANK 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 | ---------- .BLANK .CENTER ##############FIGURE IV. .CENTER ##############POINTER MAP .CENTER ##############DEFINED VARIABLES .PAGE .LEFT MARGIN 12 .FIGURE 3 DIM A(10),A%(10),A$(10) CALL DUMY(A(),A%(),A$()) .BLANK 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 .BLANK .CENTER ##############FIGURE V. .CENTER ##############POINTER MAP .CENTER ##############ONE DIMENSION ARRAYS / UNDEFINED ELEMENTS .PAGE .FIGURE 7 V V | A() DSC | A() | ---------- | ---------- ------>| 22040 | ------>| 0 | ---------- ---------- | 0 | | 0 | ---------- ---------- | 54 | : : ---------- ---------- | 1 | | 0 | ---------- ---------- | 0 | | 0 | ---------- ---------- | 12 | ---------- .BLANK .CENTER ##############FIGURE V. (CONTINUED) .CENTER ##############POINTER MAP .CENTER ##############ONE DIMENSION ARRAYS / UNDEFINED ELEMENTS .LEFT MARGIN 12 .BLANK 3 DIM B(2),B%(2),B$(2) B(0)=0 _\ B%(1)=1% _\ B$(2)='TWO' CALL DUMY(B(),B%(),B$()) .BLANK DSC LST ARG LST ---------- ---------- -------| 137606 |<--------| 137634 | R5 | ---------- ---------- ---------- | -----| 137572 | | 10103 |<---| 137624 | | | ---------- ---------- ---------- | | ---| 137566 | -------| 137716 | | | | ---------- | ---------- | | | | -----| 137710 | | | | | | ---------- | | | | | ---| 137702 | | | | | | | ---------- V V V V V V .BLANK .CENTER ##############FIGURE VI. .CENTER ##############POINTER MAP .CENTER ##############ONE DIMENSION ARRAYS / DEFINED ELEMENTS .PAGE .FIGURE 4 V V V V V V | | | 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 | ---------- ---------- .BLANK .CENTER ##############FIGURE VI. (CONTINUED) .CENTER ##############POINTER MAP .CENTER ##############ONE DIMENSION ARRAYS / DEFINED ELEMENTS .PAGE .LEFT MARGIN 12 .FIGURE 5 DIM B(2),B%(2),B$(2) B(1)=1 _\ B%(2)=2% _\ B$(0)='ZERO' CALL DUMY(B(1),B%(2),B$(0)) .BLANK 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 .BLANK .CENTER ##############FIGURE VII. .CENTER ##############POINTER MAP .CENTER ##############ONE DIMENSION ARRAYS / SPECIFIC ELEMENTS .PAGE .FIGURE 7 V V | B(1) DSC | B(1) | ---------- | ---------- ------>| 22040 | ------>| 40200 | ---------- ---------- | 0 | | 0 | ---------- ---------- | 10 | ---------- | 1 | ---------- | 0 | ---------- | 1 | ---------- .BLANK .CENTER ##############FIGURE VII. (CONTINUED) .CENTER ##############POINTER MAP .CENTER ##############ONE DIMENSION ARRAYS / SPECIFIC ELEMENTS .LEFT MARGIN 12 .BLANK 3 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$()) .BLANK DSC LST ARG LST ---------- ---------- -------| 137602 |<--------| 137634 | R5 | ---------- ---------- ---------- | -----| 137562 | | 10103 |<---| 137624 | | | ---------- ---------- ---------- | | ---| 137542 | -------| 137662 | | | | ---------- | ---------- | | | | -----| 137652 | | | | | | ---------- | | | | | ---| 137642 | | | | | | | ---------- V V V V V V .BLANK .CENTER ##############FIGURE VIII. .CENTER ##############POINTER MAP .CENTER ##############TWO DIMENSION ARRAYS / DEFINED ELEMENTS .PAGE .FIGURE 7 V V V V V V | | | 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 .BLANK .CENTER ##############FIGURE VIII. (CONTINUED) .CENTER ##############POINTER MAP .CENTER ##############TWO DIMENSION ARRAYS / DEFINED ELEMENTS .PAGE .FIGURE 5 V V | C() DSC | C() | ---------- | ---------- ------>| 22040 | ------>| 0 | ---------- ---------- | 0 | | 0 | ---------- ---------- | 20 | | 0 | ---------- ---------- | 2 | | 0 | ---------- ---------- | 0 | | 0 | ---------- ---------- | 1 | | 0 | ---------- ---------- | 0 | | 0 | ---------- ---------- | 1 | | 0 | ---------- ---------- .BLANK .CENTER ##############FIGURE VIII. (CONTINUED) .CENTER ##############POINTER MAP .CENTER ##############TWO DIMENSION ARRAYS / DEFINED ELEMENTS .LEFT MARGIN 12 .BLANK 3 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)) .BLANK DSC LST ARG LST ---------- ---------- -------| 137606 |<--------| 137634 | R5 | ---------- ---------- ---------- | -----| 137572 | | 10103 |<---| 137624 | | | ---------- ---------- ---------- | | ---| 137566 | -------| 137662 | | | | ---------- | ---------- | | | | -----| 137654 | | | | | | ---------- | | | | | ---| 55731 | | | | | | | ---------- V V V V V V .BLANK .CENTER ##############FIGURE IX. .CENTER ##############POINTER MAP .CENTER ##############TWO DIMENSION ARRAYS / SPECIFIC ELEMENTS .PAGE .FIGURE 2 V V V V V V | | | 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 | ---------- | | ---------- | | ---------- .BLANK .CENTER ##############FIGURE IX. (CONTINUED) .CENTER ##############POINTER MAP .CENTER ##############TWO DIMENSION ARRAYS / SPECIFIC ELEMENTS .BREAK ! REFERENCES NAB 09-OCT-78/25-OCT-78 .SUBTITLE ######REFERENCES .PAGE .LEFT MARGIN 10 .RIGHT MARGIN 68 .FILL .JUSTIFY .UPPER CASE .TAB STOPS 8,16,24,32,40,48,56,64 .FIGURE 8 .CENTER ##############REFERENCES .BLANK 2 .INDENT -4 1.##"BASIC-11 Language Reference Manual", DEC-11-LIBBB-A-D, Digital Equipment Corporation, Maynard, MA, Sep-76. .BLANK .INDENT -4 2.##"BASIC-11/RT-11 User's Guide", DEC-11-LIBUA-A-D, Digital Equipment Corporation, Maynard, MA, Aug-77. .BLANK .INDENT -4 3.##"BASIC-11/RT-11 Installation Guide", DEC-11-LIBTA-A-D, Digital Equipment Corporation, Maynard, MA, Aug-77. .BLANK .INDENT -4 4.##"PDP-11 MACRO-11 Language Reference Manual", AA-5075A-TC, Digital Equipment Corporation, Maynard, MA, Aug-77. .BLANK .INDENT -4 5.##"RT-11 System User's Guide", DEC-11-ORGDA-A-D, Digital Equipment Corporation, Maynard, MA, Aug-77. .BLANK .INDENT -4 6.##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. .BREAK ! INDEX NAB 11-OCT-78/09-NOV-78 .SUBTITLE ######INDEX .PAGE .LEFT MARGIN 9 .RIGHT MARGIN 68 .NOFILL .NOJUSTIFY .FIGURE 8 .CENTER ##############INDEX .BLANK .PRINT INDEX .BREAK ! DISTRIBUTION NAB 09-OCT-78/14-NOV-78 ! DSTRIB.RNO NAB 27-OCT-77/06-OCT-78 .SUBTITLE ######DISTRIBUTION .UPPER CASE .PAGE .LEFT MARGIN 6 .RIGHT MARGIN 68 .NOJUSTIFY .NOFILL .TAB STOPS 8,16,24,32 .CENTER ##############DISTRIBUTION .BLANK 2 HEADQUARTERS (3) ESD/MCB/STOP 36 HANSCOM AFB, MA 01731 ATTN: COL. R. T. KOZUMA, OCB LT. COL. P. E. PECO, OCBE MR. B. ALLEN, OCBE .BLANK HEADQUARTERS ROME AIR DEVELOPMENT CENTER (AFCS) GRIFFISS AFB, NY 13441 ATTN: MR. R. ALLEN, OCDS .BLANK US ARMY MOBILITY EQUIPMENT RESEARCH AND DEVELOPMENT COMMAND FT. BELVOIR, VA 22060 ATTN: MR. D. KEEHAN, DRXFB-XS .BLANK NAVAL UNDERSEA CENTER (2) SAN DIEGO, CA 92132 ATTN: MR. J. REDFERN MR. J. ZIEDLER .BLANK 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 .BLANK DEPARTMENT OF THE NAVY NAVAL COASTAL SYSTEMS LABS PANAMA CITY, FL 32401 ATTN: MR. R. FORBUS .BLANK DIRECTOR DEFENSE NUCLEAR AGENCY WASHINGTON, DC 20305 ATTN: M. BEASLEY, NSSO .BLANK KANSAS STATE UNIVERSITY DEPARTMENT OF ELECTRICAL ENGINEERING MANHATTAN, KS 66506 ATTN: PROF. N. AHMED .BLANK NEW MEXICO STATE UNIVERSITY DEPARTMENT OF COMPUTER SCIENCE LAS CRUCES, NM 88003 ATTN: PROF. D. DEARHOLT .PAGE .LEFT MARGIN 16 1000 G. A. FOWLER 1111 S. D. STEARNS 1521 J. L. MORTLEY 1554 N. J. POLLARD 1584 T. M. SCHULTHEIS 1700 W. C. MYRE 1710 V. E. BLAKE, JR. 1730 C. H. MAUNEY 1730A S. A. INGHAM 1731 E. R. JULIUS 1732 R. P. SYLER 1733 T. J. HOBAN, JR. 1734 W. N. CAUDLE 1736 D. C. HANSON 1736 N. A. BOURGEOIS, JR. (6) 1736 G. W. DONOHOE 1736 G. R. ELLIOTT (5) 1736 R. J. GOSSETT 1736 R. N. HORTON 1736 W. L. JACKLIN 1736 R. P. KROMER 1736 L. W. MASCHOFF 1736 J. E. SCHEIBNER 1736 J. E. SIMPSON 1736 R. A. WAYNE 1739 J. D. WILLIAMS 1750 J. E. STIEGLER 1759 M. J. EATON 1760 J. JACOBS 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 .BREAK