COPYRIGHTCopyright 1988-1994 – Octagon Systems and Remote Processing Corp. All rights reserved.Modifications by Remote Processing Co
Concepts - 4Below is a list of CAMBASIC commands. Some CPU Cards do not use all of the commands. Refer to your hardwaremanual for ex
Commands - 67KEYPAD$Process FunctionSYNTAX: a$= KEYPAD$(0)a= KEYPAD$(1)PURPOSE: To return a one– character string in response to a key
Commands - 68LEFT$String FunctionSYNTAX: n$ = LEFT$(m$,p)PURPOSE: To return the leftm ost p characters of m$.REMARK S: If p is great
Commands - 69LENNumeric Fun ctionSYNTAX: n = LEN(m$)PURPOSE: To return the number of characters in m$.REMARK S: Unprintable and blan
Commands - 70LINEProcess FunctionSYNTAX: a = LINE(terminal #)PURPOSE: To return the status of an input on a STB-26 terminal board.REM
Commands - 71LINEProcess StatementSYNTAX: LINE terminal #, valuePURPOSE: To write directly to the STB-26 terminal board.REMARK S: The
Commands - 72LISTCommandSYNTAX: LIST [line [– [line]]]LIST #n, [line [– [line]]]LIST!PURPOSE: To list a part or all of the program cur
Commands - 73ERROR: < Line not found> – if line does not exist
Commands - 74LOADCommandSYNTAX: LOADLOAD programLOAD program RUNLOAD to RAM segment, RAM address, from me mory segm ent, memo r
Commands - 75LOCKUNLOCKTasking StatementsSYNTAX: LOCKUNLOCK [RETURN]UNLOCK E XITPURPOSE: To lock out interrupts from time critical por
Commands - 76LOGNumeric Fun ctionSYNTAX: n = LOG(m)PURPOSE: To return the natural logarithm of m.REMARK S: The natural logarithm is t
Concepts - 5Software and Hardware InterruptsCAMBASIC supports multiple hardware and software interrupts. These interrupts causes the
Commands - 77MID$String FunctionSYNTAX: n$ = MID$(m$,p[,q])PURPOSE: To return the requested part of a given string.REMARK S: The func
Commands - 78MID$String StatementSYNTAX: MID$(a$,s [,n]) = b$PURPOSE: To replace a portion of one string with another.REMARK S: A com
Commands - 79MODOperatorSYNTAX: n = a MOD bPURPOSE: To return the rem ainder of an integer division.REMARK S: a is divided by b and t
Commands - 80MONCommandSYNTAX: MON PURPOSE: To invoke the Mini– MonitorREMARK S: The Mini– Monitor is used primarily for debugging obj
Commands - 81NEW and UNNEWCommandsSYNTAX: NEWUNNEWPURPOSE: NEW initializes CAMBASIC for a new program.UNNEW restor es a program erase
Commands - 82ONStatementSYNTAX: ON expression GOSUB line [,line] ...ON expression GOTO line [,line] ...PURPOSE: In the ON. .. GOT O s
Commands - 83ON BITTasking StatementSYNTAX: ON BIT task numbe r,ad dress, bit GOS UB line/labelPURPOSE: To declare an I/ O line to be
Commands - 84ON COM$Tasking StatementSYNTAX: ON COM$ n GOS UB line/labelON COM$ n GOSUBPURPOSE: To define a program branch when a task
Commands - 85ON COUNTTasking StatementSYNTAX: ON COUNT n GOSUB line/labelON COUNT n GOSUBPURPOSE: To execute a subroutine when a prese
Commands - 86ON ERR GOTOStatementSYNTAX: ON ERR GOTO line/labelPURPOSE: To enable error trapping and specify the first line of the err
Concepts - 6AUTORUN OPERATIONOnce a program has been stored in nonvolatile memory, it can autorun on power – up.PROTECTING YOUR PROGR
Commands - 87ON INPTasking StatementSYNTAX: ON INP n, address, mask, compare GOSUB line/labelPURPOSE: To cause an interr upt when a pr
Commands - 88ON ITRTasking StatementSYNTAX: ON ITR n GOSUB line/labelON ITR n GOSUBPURPOSE: To enable or disable a progr am br anch d
Commands - 89ON KEYPAD$Tasking StatementSYNTAX: ON KEY PAD $ GO SUB line/labelON KEYPAD$ GOSUBON KEYPAD $ size GOSUB line/lableON KEYP
Commands - 90ON TICKTasking StatementSYNTAX: ON TICK n,t GOSUB line/labelON TICK n,t GOSUBPURPOSE: To cause periodic program branchin
Commands - 91OPTOProcess FunctionSYNTAX: a = OPTO (channel)PURPOSE: To return the status of an input on an on board opto isolator rac
Commands - 92OPTOProcess StatementSYNTAX: OPTO channel, valuePURPOSE: To turn output modules on and off on 24 position opto-isolator
Commands - 93OUTI/O StatementSYNTAX: OUT I/O address, dataPURPOSE: Sends a byte to an I/O address.REMARK S: The I/O addre ss is any o
Commands - 94PEEK and POKEMemory Function and StatementSYNTAX: n = PEEK(address)n = PEEK(address,segment)POKE address, dataPOKE add
Commands - 95PEEK$ and POKE$Memory Function and StatementSYNTAX: x$ = PEEK$(address)x$ = PEEK$(address, segment)POKE $ address, X$PO
Commands - 96PRINTStatementPR [#n,] [expression] [; or , ] [expression]..PRINT [#n,] [expression] [; or , ] [expression]..PURPOSE: To
Concepts - 7For example,GOTOE is not okEGOTO is okString variables are limited to 255 characters. Arrays may be any leng th, may be
Commands - 97In the example below, the semicolon at the end of line 20 causes both PRINT statements to beprinted on the same line.10 I
Commands - 98PRINT USINGStatementSYNTAX: PRINT [#n,]USING"format string"; expr essionPURPOSE: To print strings or number s
Commands - 99Leading zeros to the left of the first digit to the left of the decimal point are suppressed.A=25.5555PRINT #10,USING &qu
Commands - 100PRINT$StatementSYNTAX: PRINT [#n,] $ character [,character]...PR [#n,] $ character [,character]...PURPOSE: Used to send
Commands - 101PULSEProcess FunctionSYNTAX: n= PULSE(m)PURPOSE: To return the r emaining time of a pulsed output.REMARK S: The resolut
Commands - 102PULSETasking StatementSYNTAX: PULSE n,a ddress, bit,tim e,p olarityPURPOSE: To configure a digital output line as a time
Commands - 103READStatementSYNTAX: READ variable [,variable] . . .PURPOSE: To read values fr om a D ATA statement and assign them
Commands - 104REMARKStatementSYNTAX: ' any charactersPURPOSE: To allow explanator y remarks to be inserted in a progr am or desi
Commands - 105RENUMCommandSYNTAX: RENUM [newline] [,increment] [,oldline]PURPOSE: To renum ber prog ram lines.REMARK S: newline is the
Commands - 106RESTOREStatementSYNTAX: RESTORE [line]PURPOSE: To reset the RE AD pointer to the b eginning of the DAT A list.REMARK S:
Concepts - 8Lower– case characters have a higher ASC II value than upper– case characters. If two strings are identical up to the poi
Commands - 107RESUMEStatementSYNTAX: RESUMERESUME NEXTRESUME linePURPOSE: To continue program execution after an error recovery proced
Commands - 108RESUME COUNTTasking StatementSYNTAX: RESUME COUNT m [,m1] [,m2] . . . [,mn]PURPOSE: To reenable a software event counter
Commands - 109RETURNStatementSYNTAX: RETURN [line/label]RETURN ITR numberPURPOSE: To resume execution after a GOSUB, interrupt, multit
Commands - 110RIGHT$String FunctionSYNTAX: n$ = RIGHT$(m$,p)PURPOSE: To return the r ight– most p characters of m$ as a string.REMARK
Commands - 111RNDNumeric Fun ctionSYNTAX: n = RND(m)PURPOSE: To return a pseudo– random number between 0 and 1.REMARK S: The RND func
Commands - 112RUNCommandSYNTAX: RUN [line]PURPOSE: To begin the execution of a program.REMARK S: RUN resets the numeric variables to z
Commands - 113SAVECommandSYNTAX: SAVE SAVE programSAVE to Flash segme nt, to Flash address, from RA M segm ent, from RA M addres
Commands - 114< 21> < Hardw are> - If Flash EPROM or jumper missing or bad F lash
Commands - 115SGNNumeric Fun ctionSYNTAX: n = SGN(m)PURPOSE: Determines if number is positive or negative.REMARK S: m is any number.
Commands - 116SINNumeric Fun ctionSYNTAX: n = SIN(m)PURPOSE: To calculate the trigonometric sine function.REMARK S: m is an angle in
Concepts - 9NOTE: Attempting to enter a line with more than 24 constants will cause the remainder of the line to beterminated. CAM BA
Commands - 117SOUNDCOMMANDSYNTAX: SOUND frequencySOUNDPURPOSE: Gener ates a squar e wave signal at frequency.REMARK S: frequency is f
Commands - 118SPIFUNCTIONSYNTAX: a = SPI(channel,out_length,data, delay,in_length)Where:channel = 0 to 2, the SPI channel number.out
Commands - 119SQRNumeric Fun ctionSYNTAX: n = SQR(m)PURPOSE: Calculates the square root of a number.REMARK S: m is any positive numbe
Commands - 120START BITTasking StatementSYNTAX: START BIT task number [,task number]. . .PURPOSE: To enable a BIT task that has previo
Commands - 121START COUNTTasking StatementSYNTAX: START COUNT n [,n1] [,nm]PURPOSE: To activate a software counter task that was previ
Commands - 122START INPTasking StatementSYNTAX: START INP n [,n1] [,n2] PURPOSE: To enable one or m ore IN P tasks dec lared by the ON
Commands - 123STOPStatementSYNTAX: STOPPURPOSE: To terminate pr ogram execution and return to comm and level.REMARK S: STOP statemen
Commands - 124STOP BITTasking StatementSYNTAX: STOP BIT task [,task] . . .PURPOSE: To disable a bit that has previously been defined w
Commands - 125STOP COUNTTasking StatementSYNTAX: STOP COUNT n [,n1] [,nn]PURPOSE: To deactivate a software counter task that was previ
Commands - 126STOP INPTasking StatementSYNTAX: STOP INP n [,n1] [,n2]PURPOSE: To disable one or m ore IN P tasks declared by the ON IN
Concepts - 10> greater than X> Y < less than X< Y>= greater than X> = Y or equal to<= less than X< = Yor equal
Commands - 127STR$String FunctionSYNTAX: n$ = STR$(m)PURPOSE: To convert a number to a string.REMARK S: For positive numbers, the st
Commands - 128SYSSystem FunctionSYNTAX: a = SYS(n)PURPOSE: To access system data and addresses.REMARK S: n is the system number.The f
Commands - 129SYS(3) is used by assembly language programmers to determine jump vector location.SYS(4) and SYS (5) return the status o
Commands - 130TABPrint FunctionSYNTAX: PRIN T TA B(m)PURPOSE: To tab to position m.REMARK S: m ranges from 0 to 255If the current prin
Commands - 131TANNumeric Fun ctionSYNTAX: n = TAN(m)PURPOSE: To return the trigonometric tangent of m.REMARK S: The angle m must be i
Commands - 132TICKProcess FunctionSYNTAX: a= TICK(n)PURPOSE: To return the time from the TICK timers.REMARK S: n is from 0 to 2, corre
Commands - 133TIME$FunctionSYNTAX: a$ = TIME$(n)PURPOSE: The TIME$ function is used to read the system calendar/clock. The system cl
Commands - 134TIME$StatementSYNTAX: TIME$ = time stringPURPOSE: TIME$ is used to set the time on the system calendar/clock. The clo
Commands - 135TRON/TROFFStatementSYNTAX: TRONTROFFPURPOSE: To trace program execution.REMARK S: Execute TRON to turn on the trace and
Commands - 136VALNumeric Fun ctionSYNTAX: n = VAL(m$)PURPOSE: To convert a string to a number.REMARK S: The VAL function strips leadi
Concepts - 11AND Operand 2
Commands - 137VARPTRNumeric Fun ctionSYNTAX: VARPTR(variable)PURPOSE: To return the address in RAM of the variable. This command is s
Commands - 138Strings ar e stored in tw o ways. A literal str ing (e. g., A$ = "string") is stor ed in the program line
Commands - 139the value returned will not change.
Commands - 140XORNumeric Fun ctionSYNTAX: n = a XOR b PURPOSE: Performs bitwise XOR operation on two numbers. XOR'ing is usuall
CONFIG C ommands - 1CONFIG AINStatementSYNTAX: CONFIG AIN channel, input, rangeWhere: channel is 0 to range of inputs for your card.in
CONFIG C ommands - 2CONFIG BAUDStatementSYNTAX: CONFIG BAUD port,baud rate, mode, parity [,com]PURPOSE: To change the ser ial port par
CONFIG C ommands - 3within one character time after the last char acter is sent.0 = RS-232 (default)1 = RS-422 (transmitter always
CONFIG C ommands - 4CONFIG BREAKStatementSYNTAX: CONF IG BREAK com port,modePURPOSE: To enable or disable response to a break charac
CONFIG C ommands - 5CONFIG CLOCKStatementSYNTAX: CONF IG CLOC K mode,runCONF IG CLOC K run (RPC-2350 series only)PURPOSE: Configures r
CONFIG C ommands - 6CONFIG COM$Tasking StatementSYNTAX: CONFIG C OM$ n,terminator, length,XON ,echoPURPOSE: To configure a communicati
Concepts - 12The NOT operator performs a logical negative of a value.Operand 1 0001 0111 = 23NOT Operand 1 1110 1000 = 232Value of exp
CONFIG C ommands - 7CONFIG COUNTTasking StatementSYNTAX: CONFIG COUNT number,address,bit [,preset] [,AUTO]PURPOSE: To define the chara
CONFIG C ommands - 8CONFIG DISPLAYStatementSYNTA X: CONFIG DISPLAY address,type,cursorPURPOSE: To install a driver for a displayREMAR
CONFIG C ommands - 9EXAMPLE: The example below is for a vacuum florescent 2x20 display. It illustrates both continuous updatingand pe
CONFIG C ommands - 10CONFIG PIOStatementSYNTAX: CONFIG PIO init,port A, port B, p ort LC, port UC [,address]PURPOSE: To initialize an
Program debugging - 1PROGRAM DEBUGGINGCAM BASIC has several constructs which can be used to debug a program. This section will outli
Program debugging - 250 NEXT60 TROFF70 END80 S = 090 INC H100 RETURNRUN.30..40..90..100..50..40..90..100..50..40..90..100..50..60.USI
Error Messages - 1The following list of error messages are returned by CAM BASIC. These indicate clearly, what is wrong, within th
Error Messages - 2NUM MESSAGE EXPLANATION12 < Illegal imm ediate> A statement that is illegal in Immediate M ode is enter ed as
Error Messages - 3
Error Messages - 4NUM MESSAGE EXPLANATION27 < Data > 255> The argument or parameter may not exceed 255.28 < Data > 6
Concepts - 136. relational operators= (equal)<> (not equal)< (less than)> (greater than)<= (less than or equal to)>=
Event Multitasking - 1Event MultitaskingEvent Multitasking was developed to give faster response to real time events. It is different
Event Multitasking - 2Between each program statement CAM BASIC checks to see if any interrupt flags are set. If so, it branches to th
Event Multitasking - 3COUNT MULTITASKINGIntroductionCAM BASIC supports eight event counters. These ar e generated in software and are
Event Multitasking - 4Theoretically, a 100 Hz square wave can be counted. However, due to sample timing variations (dependent upon ot
Event Multitasking - 5The second is the interrupt mode. When the preset count is reached, a software interrupt is generated and the p
Event Multitasking - 6NOTE: It is theoretically possible for the subroutine to take so long to execute that another 20 00 counts isre
Event Multitasking - 7Line 110 prints the count in the counter.Line 120 returns execution to the place where the one– second interrupt
Event Multitasking - 840 DELAY .2550 GOTO 3060 PRINT "match"70 RETURNLine 10 defines the INP task 0 to look at address 2.
Event Multitasking - 92. KEYPA D$ function returns either a one– character string that has been assigned to each key or thenumerical p
Event Multitasking - 10Line 80 returns program execution to the place that it was executing before the key was pressed.Inputting Multi
Preface - 1HOW TO USE THIS MANUALThis manual contains information on CAMBASIC and its commands. You will find that some information
Program Editing - 1CAMBASIC EDITORUsing the Line EditorWhen using a CRT terminal to write program s, the resources of the PC are not
Event Multitasking - 11Intercepting these keys in the form of strings provides a slower response than using the key positions. The fo
Event Multitasking - 12the COM1 ser ial port. In an actual application, the characters would prob ably be echoed to a multiline dis
Event Multitasking - 13MULTITASKING ON A CLOCK TICKThe three 200 Hz (100 Hz in 9 MHz systems) tick timers are used for a number of mul
Event Multitasking - 14PULSE MULTITASKINGIntroductionCAM BASIC supports eight timed (or pulsed) outputs. These ar e gener ated in s
Event Multitasking - 15executed and then go low.The PU LSE function r eturns the rem aining time of each stage. The example below d
Event Multitasking - 16..emergency'Emergency stop pressed. Turn off all outputsout 2,255return'..headup'Head has moved
Differences - 1DIFFERENCES—CAMBASIC vs QBASIC1. CAM BASIC is a multitasking language while the others are not. This adds features to
Mini-Monitor - 1THE CAMBASIC MINI– MONITORThe Mini– Monitor is included in CAMBASIC primar ily for those who will be combining object
Mini-Monitor - 2Edit MemoryThis routine lets you poke hex values into memor y. For example, to edit at A000, you enter the command be
Program Editing - 2Executing the EDIT statement will cause the target line to be displayed. Below this line the line number will be
Program Editing - 3H Hack Remainder Of The Line And E nter InsertThe Hack command deletes from the cursor position to the end of the
Program Editing - 4R ReplaceThe Replace command does a delete and insert on a character basis. For example: EDIT 1010 PRINT "Th
Program ing Tips - 1How to Maximize Execution Speed1. Use the pre-compiled variable A% to Z%. In an average program these will run 5
Program ing Tips - 2can use PC SmartLINK to strip out the remar ks in the final program. H owever, this may have a significantimpact
Program ing Tips - 3b. Erroneous error m essage for a good line.c. A < System corruption> error message.d. The system will not
Command Summary - 1Command Syntax PurposeABS n= ABS(m) Returns absolute value of a numberAIN n= AIN(channel) Returns result of A/D con
Command Summary - 2DISPLAY DISPLAY a$ Writes data to display
Command Summary - 3Command Syntax PurposeDO/UNT IL DO list UNTIL expr. Executes until expression is trueDO/ENDDO DO n Fast loop struct
Preface - 2PRODUCT SUPPORTIf you have a question about CAMBASIC and you cannot find the answer in this manual, call Technical Support
Command Summary - 4Command Syntax PurposeLINE a = LINE(n) Read a single line on a STB-26LINE n, m Write to a line number on a STB-26L
Command Summary - 5Command Syntax PurposePRINT$ PRINT $ char [,char] Prints string of charactersPULSE n= PULSE(m) Returns time from
Command Summary - 6
Command Summary - 7Command Syntax PurposeTIME$ n$= TIME$(n) Reads calendar/clockTIME$= n$ Writes to calendar/clockTROFF TROFF Stops th
Commands - 1ABSNumeric Fun ctionSYNTAX: n = ABS(m)PURPOSE: To return the absolute value of the expression m.REMARK S: The absolute va
Commands - 2AINProcess FunctionSYNTAX: a = AIN(channel)PURPOSE: To return the analog input value.REMARK S: The channel is the channel
Commands - 3ANDNumeric Fun ctionSYNTAX: n = a AND b PURPOSE: Performs bitwise or logical operation on two numbers. AND'ing is u
Commands - 4AOTProcess StatementSYNTAX: AOT channel,valuePURPOSE: To wr ite data to a analog output port.REMARK S: AOT causes the an a
Commands - 5ASCNumeric Fun ctionSYNTAX: n = ASC(m$) PURPOSE: To return the ASC II code for the first character of the string m$.REMAR
Commands - 6ATNNumeric Fun ctionSYNTAX: n = ATN(m)PURPOSE: To return the arctangent of m.REMARK S: The result, n, of the ATN function
Introduction - 1ABOUT CAMBASICCAMBASIC is the result of 18 years of industrial language development at Octagon. Its major strengths a
Commands - 7AUTOCOMMANDSYNTAX: AUTO [line] [,increment]PURPOSE: Generate a line number automatically each time you press < Enter&g
Commands - 8BCDNumeric Fun ctionSYNTAX: n = BCD(m)PURPOSE: To return four digits in packed BCD format from a number.REMARK S: The fou
Commands - 9BINNumeric Fun ctionSYNTAX: n = BIN(m)PURPOSE: To return a number from a packed BCD number.REMARK S: This function assume
Commands - 10BIN$String FunctionSYNTAX: n$ = BIN$(m)PURPOSE: Returns an 8– bit binary representation of a number.REMARK S: The most s
Commands - 11BITProcess FunctionSYNTAX: n = BIT(I/O address, bit)PURPOSE: To read a specified bit at a specified I/O address.REMARK S
Commands - 12BITProcess StatementSYNTAX: BIT I/O address,bit,valueBIT I/O address, bit,ONBIT I/O address, bit,OFFBIT I/O address, bit,
Commands - 13CALLStatementSYNTAX: CALL address [,m1] [,m2]. . .PURPOSE: To execute an assembly language program at the specified add
Commands - 14NOTE2: CAMBASIC internal routines are not accessible by the object code programmer exceptthose listed in the SYS functi
Commands - 15CHR$String FunctionSYNTAX: n$ = CHR$(m)n$ = CHR$(m,n)PURPOSE: To convert an ASCII cod e to its character equivalent. A
Commands - 16CLEARStatementSYNTAX: CLEAR [string space] PURPOSE: To set all numeric variables to zero, set all string variables to nul
Introduction - 2 OUT HEAT,0All you need is the addition of the AUTO command at the beginning of the program. N o programlines can be
Commands - 17CLEAR COM$Process StatementSYNTAX: CLEAR CO M$ nPURPOSE: To reset a serial port input buffer to the power– up condition.R
Commands - 18CLEAR COUNTTasking StatementSYNTAX: CLEAR COUNT n [,n1] . . . [,nm]PURPOSE: To clear the accumulated count in a software
Commands - 19CLEAR TICKTasking StatementSYNTAX: CLEAR TICK nPURPOSE: To reset the internal TICK clock to zero. This does not affect
Commands - 20CLEAR PULSETasking StatementSYNTAX: CLEAR PULSE n [,n1] . . . [,nm]PURPOSE: To clear the remaining time in a software tim
Commands - 21CLSStatementSYNTAX: CLS [#n]PURPOSE: To clear the screen of a terminal connected to a serial port using PC SmartLINK.REMA
Commands - 22COM$Process FunctionSYNTAX: n$ = COM$(n)PURPOSE: To return a string from the serial input buffer. This function is usual
Commands - 23CONFIGStatementSYNTAX: CONFIG com mand [list]PURPOSE: The CONFIG statement is used to set parameters for a number of indu
Commands - 24CONTCommandSYNTAX: CONTPURPOSE: To resume program execution after a break.REMARK S: The CONT comm and may be used to re
Commands - 25COSNumeric Fun ctionSYNTAX: n = COS(m)PURPOSE: To return the trigonometric cosine function.REMARK S: m must be in radian
Commands - 26COUNTProcess FunctionSYNTAX: n = count(channel)PURPOSE: To return the count in the software event counters and r eturn th
Introduction - 313. Process Functions Simplify ProgrammingMost functions return the result of a numeric or string calculation. A proc
Commands - 27DATAStatementSYNTAX: DATA constant [,constant] . . . .PURPOSE: To provide a means to store numeric and string constants
Commands - 28DATE$System StatementSYNTAX: DATE$ = date stringPURPOSE: DATE$ is used to set the date on the system calendar clock. Th
Commands - 29DATE$System FunctionSYNTAX: a$ = DATE$(n)PURPOSE: The DAT E$ function is used read the date of the system calendar clock
Commands - 30DEC & DECFStatementsSYNTAX: DEC variableDEC F var iablePURPOSE: To decrement a variable by one (DEC) or four (DEC F
Commands - 31DELETECommandSYNTAX: DEL [– ] line [– line] [– ]PURPOSE: To delete CA MBASIC program lines.REMARK S: The DEL command er
Commands - 32DELAYStatementSYNTAX: DELAY nPURPOSE: To create a precision delay. T he resolution is 5 mS (10 mS on 9 MHz systems).REM
Commands - 33DIMStatementSYNTAX: DIM variable (value) [,variable (value)] . . .PURPOSE: To specify the maximum size for array variabl
Commands - 34DISPLAYProcess StatementSYNTAX: DISPLAY data [,][;][ data ] . . .DISPLA Y$ data [,da ta] . . .DISPLA Y! "format&qu
Commands - 35Random access mode is most commonly used when presenting data or during operator feedback. You specify a row and column w
Commands - 36A point is erased using the CLEAR DISPLAY P(x, y) command. Gr aphics dots in a line are clearedusing the CLEAR DISPLA Y
Concepts - 1Getting StartedTo program in CAMBASIC you will need a terminal to interface with your CPU card. This may be a CRT termina
Commands - 37Lines 20 to 50 define the four strings to be printedLines 60 to 90 display the strings in the random access modeLine 100
Commands - 38DO/ENDDOStatementsSYNTAX: DO value...ENDDO PURPOSE: To execute a loop a number of times quickly.REMARK S: value range is
Commands - 39DO/UNTILStatementsSYNTAX: DO...UNTIL expression is true PURPOSE: To execute a conditional loop structure.REMARK S: The DO
Commands - 40DPEEK and DPOKEMemory Function and StatementSYNTAX: n = DPEE K(address)n = DPEE K (address, segment)DPOKE address, dat
Commands - 41EDITCommandSYNTAX: EDIT line“ . ”PURPOSE: To display a line for editing.REMARK S: The EDIT statement simply displays the
Commands - 42ENDStatementSYNTAX: ENDPURPOSE: To halt execution of a pr ogram at a given point.REMARK S: END causes execution to cease
Commands - 43ERLSystem VariableSYNTAX: n = ERLPURPOSE: To return the line number associated with an error.REMARK S: The function ret
Commands - 44ERRSystem VariableSYNTAX: n = ERRPURPOSE: To return the error code associated with an error.REMARK S: The function retu
Commands - 45ERRORSystem StatementSYNTAX: ERR nPURPOSE: To simulate the occurrence of a run time error.REMARK S: This statement is us
Commands - 46EXIT and EXIT CLEARStatementSYNTAX: EXIT [line/label]EXIT CLEARPURPOSE: To allow legal branching out of a loop structure.
Concepts - 2Line LabelsYou can write a program to GOTO or GOSUB to a label instead of a line number. This makes for more readable cod
Commands - 47EXPNumeric Fun ctionSYNTAX: n = EXP(m)PURPOSE: To return the exponential function of “e. ”REMARK S: This function retur
Commands - 48FINDCommandSYNTAX: FIND argumentPURPOSE: Used to locate variables, keyw ords, and labels.REMARK S: This is a useful tool
Commands - 4960 UNTIL RUNAMPS >5310 RUNAMPS = 1.5*AIN(2)>FIND GOSUB20 GOSUB . . confirm50 GOSUB . . current_test>FIND . .200
Commands - 50FOR / NEXT / STEPStatementsSYNTAX: FOR variable = n TO m [STEP z]...NEXTPURPOSE: To perfor m a loop oper ation a given n
Commands - 51FPEEK and FPOKEMemory Function and StatementSYNTAX: a = FPEE K(address)a = FPEE K(address,segment)FPOKE address, dataF
Commands - 52FREFunctionSYNTAX: a = FRE(0)a = FRE(c$)PURPOSE: Returns the number of bytes of unused but allocated string space, or t
Commands - 53GOSUBStatementSYNTAX: GOS UB line/label...RETURNPURPOSE: To branch to and return from a subroutine.REMARK S: line/label
Commands - 54The following shows the use of labels:90 A3 = AIN(0)100 GOSUB ..FILTER110 PR FL . . .3000 ..FILTER3010 FL = .875 * FL
Commands - 55GOTOStatementSYNTAX: GOTO line/labelPURPOSE: To branch unconditionally out of the norm al progr am sequence to a specif
Commands - 56HEX$String FunctionSYNTAX: n$ = HEX$(m)PURPOSE: To return a hex representation of a number.REMARK S: The value of m may
Concepts - 3Reserved WordsCAM BASIC comprises a set of statements, com mands and function names which are treated as reser ved words a
Commands - 57IF / THEN / ELSEStatementSYNTAX: IF m THEN statement(s) [ELSE statement(s)]IF m GOTO line/labelIF m THEN line/labelPURPO
Commands - 58INC and INCFStatementsSYNTAX: INC variableINCF variablePURPOSE: To increment a variable by one (INC) or four (INC F). I
Commands - 59INKEY$FunctionSYNTAX: a$ = INKEY$(n)PURPOSE: To return a single character from a serial input buffer.REMARK S: The retur
Commands - 60INPI/O FunctionSYNTAX: n = INP(I/O addre ss)OUT I/O a ddress, dataPURPOSE: INP returns a byte from an I/O address.OUT w
Commands - 61INPUTStatementSYNTAX: INPUT [#n,][;] var [,var] ...INPUT [#n,][;] "prompt message"; var [,var] ...INPUT [#n
Commands - 62
Commands - 63INPUT KEYPAD$StatementSYNTAX: INPUT KEYP AD$ echo port,variableINPUT KEYP AD$ echo port,"text" ,variableINPUT K
Commands - 64EXAMPLE: 10 ON KEYPAD$ 24 GOSUB 500 20 DISPLAY (1,0);30 INPUT KEYPAD$ 10,"Enter weight",WEIGHT 40 PRINT WEIGHT5
Commands - 65INSTRFunctionSYNTAX: a = INSTR(n,string,substring)PURPOSE: Returns the position of the first occurrence on a sub-string
Commands - 66INTNumeric Fun ctionSYNTAX: a = INT(b)PURPOSE: To return an integer that is equal to or less tha n the argument.REMARK S
Comments to this Manuals