iiA. Connect the black plug into the EAR jack on the side of the CTR-80.This connection provides the output signal from the CTR-80 to theTRS-80 (for l
8-6PEEK(address)Returns the value stored at the specified byte address (in decimal form). Touse this function, you'll need to refer to two sectio
8-7We can use POKE to turn on the entire PRINT position (6 bits) at one time.When we use SET, only 1 bit is turned on. Therefore POKE is about 6 times
8-8USR (x)This function lets you call a machine-language subroutine and then continueexecution of your BASIC program."Machine language" is t
8-9For example, if the entry point is at 32700:32700 decimal = 7FBC hexadecimalLSB = BC hexadecimal = 188 decimalMSB = 7F hexadecimal = 127 decimalSo
8-10Control will pass back to your program, and the integer in HL will replaceUSR(N). For example, if the call was X=USR(N) then X will be given theva
8-11170 READ A180 POKE X,A190 NEXT X192 '194 ' ******* CLEAR SCREEN & PRINT NUMBERS 1 THRU 100 *******196 '200 CLS205 PRINT
8-127D03 CB15 00250 RL L ;SHIFT L7D05 CB14 00260 RL H ;SHIFT H - ANSWER IN HL7D07 C39A0A 00270 JP PUTANS ;RETURN TO BASIC W/ANSWER00280 ;7D00 00290 EN
8-13VARPTR (variable name)Returns an address-value, which will help you locate where the variablename and its value are stored in memory. If the varia
8-14The address will probably be in high RAM where string storage space hasbeen set aside. But, if your string variable is a constant (a string litera
8-15ExamplesA! = 2 will be stored as follows2 = 10 Binary, normalized as .1 E2 = .1 x 22So exponent of A is 128+2 = 130 (called excess 128)MSB of A is
iii5. When you are not going to use a CTR-80 for loading or recordingprograms, do not leave RECORD or PLAY keys down (press STOP).6. REWIND and FAST-F
8-16The operations are performed in bitwise fashion; this means that each bit ofthe result is obtained by examining the bit in the same position for e
8-17NOT 0 = -1 The bit complement of binary 0 to 16 places is six-teenones (1111111111111111) or-1. Also NOT -1=0.NOT X NOT X is equal to -(X+1). This
9-19 / EditingLEVEL I users undoubtedly spent lots of time retyping longprogram lines, all because of a typo, or maybe just to make aminor change. Onc
9-2Now type EDIT 100 and hit [ENTER]. The Computer will display:100 _You are now in the Edit Mode and may begin editing line 100.NOTE: EDITing a progr
9-3Now type 8 and hit the Space-bar. The cursor will move over 8 spaces to theright, and 8 more characters will be displayed.n ←←←←(Backspace)Moves th
9-4L (List Line)When the Computer is in the Edit Mode, and is not currently executing one ofthe subcommands below, hitting L causes the remainder of t
9-5I (Insert)Allows you to insert material beginning at the current cursor position on theline. (Hitting ←←←← will actually delete material from the l
9-6Q (Cancel and Exit)Tells Computer to end editing and cancel all changes made in the currentediting session. If you've decided not to change th
9-7nC (Change)Tells the Computer to let you change the specified number of charactersbeginning at the current cursor position. If you type C without a
9-8nKc (Search and "Kill")Tells the Computer to delete ail characters up to the nth occurrence ofcharacter c, and move the cursor to that po
10-110 / Expansion InterfaceAn Expansion Interface is available for the TRS-80 LEVEL IIComputer. This interface will allow the use of additionalInput/
10-2This is a very simple application; however, very powerful routines can beconstructed to allow input and output of data using two tapessimultaneous
10-3LLISTWorks like LIST, but outputs to the PrinterLLISTList current program to printer.LLIST 100-Will list line 100 to the end of the program to the
10-4CodesSeveral codes are used to control the output of the line printer. You canLPRINT CHR$(n) where n is the TRS-80 Control Code from the chart bel
10-5page, it figures the number of lines to leave blank and then it spaces downthis amount to start the next page.When the Computer is first powered u
10-6Mini-Disks - (DISK BASIC)The TRS-80 Mini Disk System is a small version of a floppy disk. The diskallows vast file storage space and much quicker
10-7Expansion of RAM MemoryThe TRS-80 Expansion Interface has provisions for adding extra RAMmemory. This is done by adding RAM memory chips. You can
11-111 / Saving Time and SpaceMost LEVEL II programs are faster and take up less memoryspace than their LEVEL I counterparts. But even with itsinheren
1-11 / General InformationThis chapter will provide you with an overview of LEVEL IIBASIC - what some of its special features are, how it differsfrom
11-2Speeding Up ExecutionThe speed at which a program is processed will depend on the complexity ofthe operations and the number of instructions. In m
Appendix
A-1A / Level II SummaryCommandMode Function
A-2Type Declaration CharactersCharacter Type Examples
A-3Order of Operations Page↑
A-4Command/Function Examples PageCSAVESave a BASIC program ontapeCSAVE "A"CSAVE #-2,"A"(with expansion interface)2/4DELETE mm-nnDe
A-5Edit Mode Subcommands and Function KeysSub-Command Function PageENTEREnd editing and return to Command Mode. 9/2SHIFT ↑↑↑↑Escape from X, I, and H s
A-6Input/Output StatementsStatement/Function Examples PagePRINT exp*Output to Display the value ofexp. Exp may be a numeric orstring expression or con
A-7Statement/Function Examples PageDATA item listHold data for access by READstatementDATA 22,33,11,1.2345DATA "HALL ","SMITH ",&q
1-2RADIO SHACK LEVEL II BASICREADY>_will appear on the screen. You are now ready to use LEVEL II BASIC.ResetThe Reset button is on the back of the
A-8StringCharacter Function Example Page!Single character.!3/5%spaces%String with length equal to 2plus number of spaces between% symbols.% %3/5Progra
A-9Statement/Function Examples PageLET variable=expressionAssign value of expression tovariable. LET is optional inLEVEL II BASIC.LET A$="CHARLIE
A-10Statement/Functions Examples PageNEXT variableClose FOR-NEXT loop. Variablemay be omitted. To close nestedloops, a variable list may beused. See C
A-11Statement/Function Examples Page(Graphics Statements)CLSClear Video DisplayCLS8/2RESET(x,y)Turn off the graphics block withhorizontal coordinate x
A-12String FunctionsFunction Operation Examples PageASC(string)Returns ASCII code of first characterin string argument.ASC(B$)ASC ("H")5/5CH
A-13Arithmetic Functions*FunctionOperation (unless noted otherwise,-1.7E+38<= exp < =1.7E+38) Examples PageABS(exp)Returns absolute value.ABS(L*
A-14Function Operation Examples PageSGN(exp)Returns -1 for negative exp; 0 for zeroexp; +1 for positive exp.SGN(A*B+3)SGN(COS(X))7/4SIN(exp)Returns th
A-15Function Operation and Limits Examples PageUSR(n) Branches to machine language sub-routine. See Chapter 8.USR(0) 8/8-12VARPTR(var) Returns the add
A-16LEVEL II Reserved Words*@ FIX PEEKABS FOR POINTAND FORMAT POKEASC FRE POSATN FREE POSNAUTO GET PRINTCDBL GOSUB PUTCHR$ GOTO RANDOMCINT IF READCLEA
A-17Program Limits and Memory OverheadRANGESIntegers -32768 to +32767 inclusiveSingle Precision -1.701411E±38 to +1.701411E±38 inclusiveDouble Precisi
1-3Special Function KeysLEVEL II BASIC offers the same special function keys as LEVEL I plus afew extras. The function of the key depends on what mode
B-1B / Error CodesCODE ABBREVIATION ERROR1 NF NEXT without FOR2 SN Syntax error3 RG Return without GOSUB4ODOut of data5 FC Illegal function call6OVOve
B-2Explanation of Error MessagesNF NEXT without FOR: NEXT is used without a matching FOR statement. This error may alsooccur if NEXT variable statemen
B-3LS String Too Long: A string variable was assigned a string value which exceeded 255characters in length.ST String Formula Too Complex: A string op
C-1C / TRS-80 Character CodesBit-Pattern CodesThe following table illustrates the bit pattern for each of the 128 TRS-80characters. The remaining 128
C-2Decimal/Hexadecimal CodesDec.CodeHex.Code Char.Dec.CodeHex.Code Char.Dec.CodeHex.Code Char.0 00 NULL 32 20 SPACE 64 40 @1 01 BREAK 33 21 ! 65 41 A2
C-3Control Codes: 0-31Dec. Code Hex Code Function0-7 00-07 None8 08 Backspace and erases current character909None10 0A Line feed with carriage return1
C-4The following control characters may be entered directly from the Keyboard:Character Key Character KeyBREAK[BREAK]EM[SHIFT] [\À\]BKSP[\À\]SUB[SHIFT
C-5Space Compression Codes: 192 to 255Decimal HexCodes Codes Function 192-25
1-4Variable NamesVariable names must begin with a letter (A-Z) and may be followed byanother letter or digit (0-9). So the following are all valid and
Graphic Characters
D-1D / Memory MapDecimal Address Hex Address012287LEVEL II ROM000030001228815359RESERVED FOR MEMORY-MAPPEDI /O30013BFF1536016383VIDEO MEMORY3C003FFF16
D-2Important AddressesDecimal Hexadecimal14302 37DECommunication Status Address14303 37DFCommunication Data Address14304 37E0Interrupt Latch Address14
E-1E / Internal Codes for BASIC KeywordsThe following are the internal codes that the Computer uses to store BASICkeywords. If you PEEK at the program
E-2Dec.Code BASIC KeywordDec.Code BASIC Keyword205 + 231 CVS206 – 232 CVD207 * 233 EOF208 / 234 LOC209↑↑↑↑235 LOF210 AND 236 MKI$211 OR 237 MKS$212 &g
F-1F / Derived FunctionsFunction Function Expressed in Terms of Level II Basic FunctionsSECANT SEC(X) = 1/COS(X)COSECANT CSC(X) = 1/SIN(X)COTANGENT CO
G-1G / Base ConversionsThe following table lists base conversions for all one-byte values.DEC. BINARY HEX. OCT.0 00000000 00 0001 00000001 01 0012 000
1-5The same variable name may be used for different variable types, and theComputer will still keep them distinct, because of the type declarationchar
G-2DEC. BINARY HEX. OCT.82 01010010 52 12283 01010011 53 12384 01010100 54 12485 01010101 55 12586 01010110 56 12687 01010111 57 12788 01011000 58 130
G-3DEC. BINARY HEX. OCT.176 10110000 B0 260177 10110001 B1 261178 10110010 B2 262179 10110011 B3 263180 10110100 B4 264181 10110101 B5 265182 10110110
H-1H / User ProgramsSpecial Keyboard Input RoutineHere's a general-purpose keyboard input routine (lines 100-175) for use in anyprogram where the
H-2700 '800 ' *** MAIN PROGRAM ***900 '1000 PRINT: FL$="": INPUT"FIELD-LENGTH (FL) = ";FL$1005 IF FLT<>"
H-3157 '160 INPUTA$: IF A$="END" THEN PRINT@576,CHR$(31);: END170 IF N<6 THEN N=N+1174 '175 ' IF BOTTOM OF SCREEN HAS 6 LI
H-4230 IF A(L) < A(J) THEN TEMP = RtJ): A(J) = A(L): A(L) = TEMP: J = J-D: IF J>0 THEN 220240 NEXT I250 G
H-5• Landing conditions are different for each planetary body because eachhas its own particular gravity: Earth = 980 cm/sect ; Moon = 162 cm/sect :M
H-61040 IF V2<5000 PRINT "MADE A NEW CRATER" : GOTO 50001050 IF V2>4999 PRINT "BORED A HOLE INTO THE PLANET" : GOTO 50001100
H-7410 FOR I=1 TO P1 :IF N$=N$(I) GOTO430415 NEXT420 PRINT"NAME NOT IN FILE" :GOTO460430 PRINT"ENTER THE CORRECTED INFO.: NAME, ADDRESS
1-6Relational OperatorsThese are the same as LEVEL I.< (less than) > (greater than) =(equal to)<> (not equal to) <=(less than or equal
H-8400 'ASA410 PRINT"ENTER 2 ANGLES AND 1 SIDE: THETA1, THETR2, AB:420 INPUT T1, T2, L2425 T1 = (T1 * 3.14159) / 180 : T2 = (T2 * 3.14159) /
H-91 CLS:PRINT : PRINT CHR$(23) ; "HIT 'Z' KEY TO AIM LEFT."2 PRINT "HIT '/' KEY TO RIM RIGHT."3 PRINT "H
H-10100 IF Y=47 THEN 120105 IF Y=0 GOSUB 900110 IF Y <> -1 OR X <> -1 THEN 60120 Y= Y- 2 * D : D= -D : GOTO 60500 IF X=Z OR X=Q+Z OR X=2 *
I-1I / Converting LEVEL I ProgramsBecause of the differences between LEVEL I BASIC and LEVEL II BASIC,you will need to use the CONV program to transla
I-2This statement would allow you to use array elements A(0) throughA(30). Of course, you can use any variable name as an array name inLEVEL II BASIC.
J-1J / Important Information for Cassette UsersFree Modification for LEVEL II UnitsA modification that helps cassette loads in LEVEL II computers is a
2Notice that volume ranges for LEVEL I and LEVEL II are different. This isbecause the LEVEL II data transfer rate is faster (500 baud vs. 250 baud).Al
J-3LEVEL ISometimes you will get an error message during an attempted CLOAD. Thismeans that some information was lost or garbled. Adjust the volume le
Index
1-7String OperatorsStrings may be compared and concatenated ("strung together") in LEVEL ll.A whole chapter of this Manual is devoted to str
IndexSubject Page Subject Page1Abbreviations ...1/8ABS ...
IndexSubject Page Subject Page2File Name ...2/2-2/4FIX ...
IndexSubject Page Subject Page3POINT...8/2POKE ...
RADIO SHACK A DIVISION OF TANDY CORPORATIONU.S.A.: FORT WORTH, TEXAS 76102CANADA: BARRIE, ONTARIO L4M 4W5TANDY CORPORATIONAUSTRALIA BELGIUM U.K.280-3
©Copyright 1978, by Radio Shack, A Division of Tandy Corporation, Ft. Worth, Texas 76102LIMITED WARRANTYRadio Shack warrants for a period of 90 days f
1-8Intrinsic FunctionsMost of the subroutines in the LEVEL I manual are built-in to LEVEL II.They are faster, more accurate (to seven digits generally
1-9Keyboard RolloverWith the LEVEL I TRS-80 (and many other computers) you have to releaseone key before the Computer will allow entry of another key.
1-10Glossary for LEVEL II BASICaddress a value specifying the location of a byte in memory; decimal valuesare used in LEVEL IIalphanumerics the set of
2-12 / CommandsWhenever a prompt > is displayed, your Computer is in the Command Mode.You can type in a command, [ENTER] it, and the Computer will
2-2CLEAR nWhen used without an argument (e.g., type CLEAR and hit [ENTER]), thiscommand resets all numeric variables to zero, and all string variables
2-3CLOAD? "file name"Lets you compare a program stored on cassette with one presently in theComputer. This is useful when you have dumped a
2-4CSAVE "file name"Stores the resident program on cassette tape. (Cassette recorder must beproperly connected, cassette loaded, and in the
2-5EDIT line numberPuts the Computer in the Edit Mode so you can modify your residentprogram. The longer and more complex your programs are, the morei
2-6RUN line numberCauses Computer to execute the program stored in memory. If no linenumber is specified, execution begins with lowest numbered progra
2-7TROFFTurns off the Trace function. See TRON.TRONTurns on a Trace function that lets you follow program-flow for debuggingand execution analysis. Ea
A DIVISION OF TANDY CORPORATIONOne Tandy CenterFort Worth, Texas 76102
3-13 / Input-OutputThe statements described in this chapter let yousend data from Keyboard to Computer, Computerto Display, and back and forth between
3-2--------------------------------------------------30 X=2540 PRINT 25 "IS EQUAL TO" XRUN 25 IS EQUAL TO 25--------------------------------
3-3PRINT @ position, item listSpecifies exactly where printing is to begin. (AT was used in LEVEL IBASIC.) The @ modifier must follow PRINT immediatel
3-4PRINT USING string; item listPRINT USING – This statement allows you to specify a format for printingstring and numeric values. It can be used in m
3-5+ When a + sign is placed at the beginning or end of the field, itwill be printed as specified as a + for positive numbers or as a -for negative nu
3-6? +##.##,12.12+12.12? "THE ANSWER IS "+##.##,-12.12THE ANSWER IS -12.12? ##,##+,12.1212.12+? "THE ANSWER IS ##.##+.",-12.12THE
3-7Multiple strings or string variables can be joined together (concatenated) bythese specifiers. The "!" sign will allow only the first let
3-8WHAT IS YOUR LAST NAME? JONESENTER AMOUNT PAYABLE? 12345.6PAY TO THE ORDER OF J. P. JONES*******$12,345.60 DOLLARSIf you want to use an amount grea
3-9Be sure to enter the correct type of value according to what is called for bythe INPUT statement. For example, you can't input a string-value
Second Edition - 1979Second Printing - 1979All rights reserved. Reproduction or use, withoutexpress permission, of editorial or pictorialcontent, in a
3-10Example:100 INPUT "ENTER YOUR NAME AND AGE (NAME,AGE)";N$,A(RUN)ENTER YOUR NAME AND AGE (NAME,AGE)?_DATA item listLets you store data in
3-1150 PRINT "NAME","AGE"100 READ N$110 IF N$="END" PRINT "END OF LIST":END120 READ AGE130 IF AGE < 18 PRI
3-12PRINT #-1, item listPrints the values of the specified variables onto cassette tape. (Recorder mustbe properly connected and set in Record mode wh
3-13When this statement is executed, the Computer will turn on the tapemachine, input values in the order specified, then turn off the tape machineand
4-14 / Program StatementsLEVEL II BASIC makes several assumptions abouthow to run your programs. For example:* Variables are assumed to be single-prec
4-2DEFINT letter rangeVariables beginning with any letter in the specified range will be stored andtreated as integers, unless a type declaration char
4-3DEFSNG letter rangeCauses any variable beginning with a letter in the specified range to bestored and treated as single precision, unless a type de
4-4DEFSTR letter rangeCauses variables beginning with one of the letters in the specified range to bestored and treated as strings, unless a type decl
4-5Example:10 DIM A(5),B(2,3),C$(20)Sets up a one-dimension array A with subscripted elements 0-5; atwo-dimension array B with subscripted elements 0
CONTENTSSetting up the System... i-iii1 / General Infor
4-6ENDTerminates execution normally (without a BREAK message). Some versionsof BASIC require END as the last statement in a program; with LEVEL 11 iti
4-7GOTO line numberTransfers program control to the specified line number. Used alone, GOTOline number results in an unconditional (or automatic) bran
4-8Control branches from line 100 to the subroutine beginning at line 200. Line210 instructs Computer to return to the statement immediately following
4-9Sample Program Using ON n GOTO100 INPUT "ENTER A NUMBER";X200 ON SGN(X)+2 GOTO 220,230,240220 PRINT "NEGATIVE":END230 PRINT &qu
4-10FOR counter = exp TO exp STEP exp NEXT counterOpens an iterative (repetitive) loop so that a sequence of program statementsmay be executed over an
4-1110 FOR K=0 TO 1 STEP.320 PRINT K;30 NEXTRUN 0.3.6.9READY>_After K=.9 is incremented by .3, K=1.2. This is greater than the final value 1,the
4-12FOR-NEXT loops may be "nested":10 FOR I=1TO320 PRINT"OUTER LOOP"30 FOR J=1 TO 240 PRINT" INNER LOOP"50 N
4-13ERROR codeLets you "simulate" a specified error during program execution. The majoruse of this statement is for testing an ON ERROR GOTO
4-14The ON ERROR GOTO statement can be disabled by executing an ONERROR GOTO 0. If you use this inside an error-trapping routine, BASIC willhandle the
4-15REMInstructs the Computer to ignore the rest of the program line. This allows youto insert comments (REMarks) into your program for documentation.
4-16100 IF 0<=X AND X<=90 THEN Y=X+180If both expressions are True then Y will be assigned the value X+180.Otherwise, control will pass directly
4-17ELSE statement or line numberUsed after IF to specify an alternative action in case the IF test fails. (Whenno ELSE statement is used, control fal
4-18Data ConversionEvery number used during execution must be typed as either integer, singleprecision or double precision. Often this typing involves
4-19Type ConversionWhen operations are performed on one or two numbers, the result must betyped as integer, double or single-precision.When a +, -, or
4-20Effects of Type Conversions on AccuracyWhen a number is converted to integer type, it is "rounded down"; i.e., thelargest integer, which
4-21.6666666865348816READY>_2/3 is converted to a single precision constant; therefore only the first sevendigits of A# are accurate.--------------
4-22Assigning Double-Precision ValuesHere are three ways to be sure double-precision values are stored withoutany trailing "garbage digits".
5-15 / Strings"Without string-handling capabilities, a computer is just asuper-powered calculator." There's an element of truth in that
5-2String Input/OutputString constants -sequences of alphanumeric characters - may be input to aprogram just as numeric constants are input, using INP
5-3String ComparisonsStrings may be compared for equality or alphabetic precedence. When theyare checked for equality, every character, including any
This Reference Manual and YouWe've prepared this Reference Manual with the assumption that you - theuser - already have considerable experience w
5-4String OperationsNot including the functions described below, there is only one stringoperation - concatenation, represented by the plus symbol +.E
5-5ASC (string)Returns the ASCII code (in decimal form) for the first character of thespecified string. The string-argument must be enclosed in parent
5-6CHR$ may also be used to display any of the 64 graphics characters.(See Appendix C, Graphics Codes.)10 CLS20 FOR I=129 TO 19130 PRINT I;CHR$(I),
5-7INKEY$Returns a one-character string determined by an instantaneous keyboardstrobe. The last key pressed before the strobe is returned. If no key i
5-8LEFT$ (string, n)Returns the first n characters of string. The arguments must be enclosed inparentheses. string may be a string constant or express
5-9MID$ (string, p, n)Returns a substring of string with length n and starting at position p. Thestring name, length and starting position must be enc
5-10Example Program10 A=58.5: B=-58.520 PRINT STR$(A)30 PRINT STR$(B)40 PRINT STR$(A+B)50 PRINT STR$(A)+STR$(B)RUN 58.5-58.5 0 58.5-58.5READY>
5-11VAL (string)Performs the inverse of the STR$ function: returns the number representedby the characters in a string argument. The numerical type of
5-12Coding/Decoding Program5 CLS: PRINT CHR$(23)10 CLEAR 100020 INPUT "ENTER MESSAGE"; M$30 FOR K=1 TO LEN(M$)40 T$=MID$(M$, K, 1 )60
5-13Here's a sample program using the INSTRING subroutine. (Type in theabove lines 999-1020 plus the following.)5 CLEAR 1000 : CLS10 INPUT &qu
6-16 / ArraysAn array is simply an ordered list of values. In LEVEL IIthese values may be either numbers or strings, depending onhow the array is defi
6-2Let's set up an array, CK, to correspond to the checkbook information table.Since the table contains 6 rows and 3 columns, array CK will need
6-3Now that our array is set up, we can begin taking advantage of its built-instructure. For example, suppose we want to add up all the checks written
6-4Other Types of ArraysRemember, in LEVEL II the number of dimensions an array can have (andthe size or depth of the array), is limited only by the a
6-5To use this subroutine, your main program must supply values for threevariables N1 (size of dim#1), N2 (size of dim#2) and N3 (size of dim#3).Withi
6-6Main program supplies values for variables N1 , N2, N3. Within thesubroutine, you can assign values to each element of the array using theINPUT sta
6-7Matrix Addition (3 Dimensional)30800 FOR K=1 TO N330810 FOR J = 1 TO N230820 FOR I=1 TO N130830 C(I,J,K)=A(I,J,K)+B(I,J,K)30840 NEXT
7-17 / Arithmetic FunctionsLEVEL II BASIC offers a wide variety of intrinsic ("built-in")functions for performing arithmetic and special ope
iSetting up the SystemCarefully unpack the system. Remove all packing material. Be sure youlocate all cables, papers, tapes, etc. Save the packing mat
7-2CDBL (x)Returns a double-precision representation of the argument. The valuereturned will contain 17 digits, but only the digits contained in the a
7-3EXP (x)Returns the "natural exponential" of X, that is, ex. This is the inverse of theLOG function, so X=EXP(LOG(X)).100 PRINT EXP(-X)FIX
7-4RANDOMRANDOM is actually a complete statement rather than a function. It reseedsthe random number generator. If a program uses the RND function, yo
7-5SQR(x)Returns the square root of the argument. SQR(X) is the same as X↑(1/2), onlyfaster.100 Y=SQR(X↑↑↑↑2-H↑↑↑↑2)TAN(x)Returns the tangent of the a
8-18 / Special FeaturesLEVEL II BASIC offers some unusual functions andoperations that deserve special highlighting. Some may seemhighly specialized;
8-2Examples:100 SET(RND(128)-1,RND(48)-1)Lights up a random point on the Display.100 INPUT X,Y: SET(X,Y)RUN to see where the blocks are.RESET(x,y)Turn
8-3ERLReturns the line number in which an error has occurred. This function isprimarily used inside an error-handling routine accessed by an ON ERRORG
8-4ERR /2+1Similar to ERL, except ERR returns a value related to the code of the errorrather than the line in which the error occurred. Commonly used
8-5MEMReturns the number of unused and unprotected bytes in memory. Thisfunction may be used in the Command Mode to see how much space aresident progr
Commentaires sur ces manuels