Basic`8BASIC is the ARM BBC BASIC interpreter. Syntax: *BASIC [-help|-chain|-load|-quit] BASICBBC BASIC V 1.02 (25 Sep 1987) 7OQO RP̌\ ꋰူ ̠pLNARW! OH< O0 РXtpd`OHH TPXxTF+H1PXH-xM0H  2F R  C R -R\ &2: @2r`,2525U5p` 6`V `V:p @0-e-H$ H"-ARM BBC BASIC V version 1.02 (C) Acorn 1987  Starting with Ap bytes free. @"Q: @ PProgram renumbered P ,HR? LR2 QR$ CRHRARIRNR RJ R  2 @2 LH  R PPHpz 0PURIRTR R(MHORARDR RERLRPRBASIC -help activated (use HELP at the > prompt for more help): kUnknown keyword. BASIC [-chain] to run a file (text/tokenised). BASIC -quit to run a file (text/tokenised) and quit when done. BASIC -load to start with a file (text/tokenised). BASIC @xxxxxxxx,xxxxxxxx to start with in-core text/tokenised program. BASIC -chain @xxxxxxxx,xxxxxxxx to run in-core text/tokenised program. ppQ:+P@ 0R4::R:AR4:GR4* B T@TZ  aR #뇌H!-NHxMXP>r 3H -  -@  U:Warning: unmatched ()   Warning: line number too big P5Warning: unmatched "  Z:Z ZZ p@T & Z HZ p@T Z5< Z :Zy Z Z5-Z+:3}4=:z4:%9~4 `RZ01#%0U *O.@( U*9|4 pP%(lHpW ``F vk5*``pWЍ./ 0/000Z8@ZAD44T5h>5><A> 2$* p W =W%4# $4  TJ- Z =Z YB*% :Zq Z A<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<` <<<I<<<<<]Hdb<<<l<<<iL]]^^<<<<<<<<<<<<<<i<<<<<<<<<<<<<<<<<<<<<<<<<<<<<^(_`<<<<<I<OdLiL]]^^DZinJJTj``llJ b L,LLLMMcNPP4Qd0gQS,igTUHWlWlWX(X\XYZa[4\p\l@ZADD\_HcccVpXpe`migDhd^U VUUV, l`H,`Q:` H \1+1 +1PK Z *`pqZ`ZP` V`{Z [!P%V?H    R ~L Q R  tHP||0x P*Attempt to use badly nested error handler. (AxH|xX H 0l3*H !|::!(-4)=@%:@%=&900::" at line " @%=!(-4): @-`Q  Q`@-A @-P POX0 8L  PK{ [ P  `K` V1* 00rc2@$TP` P 00 0 Z Z  !* Z  Z  @-V#1 +K,Z1 Z =Z1 @-I#1 +K@   Z :Z ZZ21 HzPރ_P!ZPރAP!9Pރ0P.P%D?@@@@?@@@@%F @P%AT@$@ @-P6@-P,H@@-P@-,HP@0 P 0 B P"PP%5J(PZ)PZE&P *AP:GP:aP:gP::P ,P *P3P @0.P #:4 :-P :QP U::\*@0@BЍ8:~*AP:WP-`aP`P`V*pV .W `V:V P`V:P:-W!*%:pp#p#P#pB :3@``B%0#@#0#@#668*A B@#%P#Z[PEdtRu/P :@- P( AP:ZP  @00,0A@@!Ub>-$\iBzton  3 "',?L\SJW{gV)/2zton9T`mt{:aPh{)m9L[ZF6L Ru1?b?+%u$GFANDABSACSADVALASCASNATNAUTOAPPEND BGETBPUTBEATSJBEATCOLOURCALLCASEJCHAINCHR$CLEARCLOSECLGCLSCOSCOUNTCIRCLEJCOLORDATA DEGDEFDELETEDIVDIMDRAWENDPROCEDIT(ENDWHILEENDCASEENDIFENDENVELOPEELSEEVALERLERROREOFEORERREXPEXTELLIPSEJFORFALSEFILLJFNGOTOGET$GETGOSUBGCOLHIMEMCHELP INPUTIFINKEY$INKEYINTINSTR(INSTALLJLISTLINELOAD LOMEMCLOCALLEFT$(LENLETLOGLNLIBRARYJLVAR MID$(MODEMODMOVEMOUSEJNEXTNEW NOTOLD ONOFFOFORIGINJOROPENINOPENOUTOPENUPOSCLIOTHERWISEPRINTPAGECPTRCPIPLOTPOINT(POINTJPROCPOSQUITIRETURNREPEATREPORTREADREM RUNRADRESTORERIGHT$(€RNDRECTANGLEJRENUMBERSTEPSAVE SGNSINSQRSOUNDSPCSTR$STRING$(ĀSTOPSTEREOJSUMSWAPJSYSJTANTAB(TEMPOJTHENTIMECTINTJTOTRACETRUETWINO TWIN UNTILUSRVDUVALVPOSVOICESJVOICEJWHILEJWHENWAITIWIDTH unlistable token Identifies case exceptional sectiont . See CASE.Bitwise logicalnd between two tegers. Priority 6.Integer division, roundedwards zero, between two tegers. Priority 3.Bitwise logical exclusive-or between two tegers. Priority 7.Remainderfter teger division between two tegers. Priority 3.Bitwise logical between two tegers. Priority 7.Part ON ERROR; LOCAL ERRORnd RESTORE ERROR s.Causen error: ERROR ,.Draw : LINE x1,y1,x2,y2Part INPUT LINE LINE INPUT .OFF: turn cursorf.Part TRACE OFF, ON ERROR OFF s.Part FOR..TO..STEP.In PRINT INPUT s, prints out n spaces: PRINT SPC(10).In PRINT INPUT s:TAB column n: PRINT TAB(10)s$.TAB screen position : PRINT TAB(10,20)s$.Part IF..THEN..ELSE. If foundt , it is partof block IF..THEN..ELSE..ENDIF.ELSE canlsoppear ON .. GOTO|GOSUB|PROC set default option.Part IF..THEN. If THEN is followed by new it troducesa blockd IF..THEN..ELSE..ENDIF.Introduces  reference ternalm.Open Update: opens putnd output. magnitude (absolute)rc cosine specifiednalogue port buffer. ASCII code first.rc sinerc tangent next byte specified: BGET. cosines PRINTed since last new . degrees radians.  last error. error last error.This evaluates: EVAL("2*X+1"). exponential length (extent)n open: EXT.EXT= sets lengthn open. logical 'false' i.e. 0.Call FNfred( ): define one DEF FNfred(a,b). ASCII next  put stream.INKEY 0 32767: waits  centiseconds read.INKEY -255 -1: checks specific key TRUE|FALSE.INKEY -256: operating system.INSTR(,[,]) find sub position. nearest teger less than equal. length. natural logarithm (base e) common logarithm (base 10)ll bits verted (0nd 1 exchanged).Open Input: opens put.Open Output: opens output. 'pi' 3.1415926535.POINT( ) logical colour graphics point. x-coordinate text cursor. radians degrees.RND: random teger.RND(n) where n<0: itialise random generator based on n.RND(0): last RND(1).RND(1): random real 0..1.RND(n) where n>1: random between 1nd INT(n).s -1, 0, 1 negative, zero, positives. sine square root tangentTO: part FOR..TO..TOP:ddress end . logical 'true' i.e. -1. returned by machine code routine. numeric textual e.g. VAL"23". y-coordinate text cursor. one supplied ASCII code. next puts one.GET$ next.CHR$(INKEY...): see INKEY.LEFT$(,): leftmosts.LEFT$(): leftmost LEN-1s.LEFT$([,])=: overwrites from.MID$(,):lling position.MID$(,,): some position.MID$(,[,])=: overwrites.RIGHT$(,): rightmosts.RIGHT$(): rightmost.RIGHT$([,])=: overwritest end.STR$[~]: representation [in hex]STRING$(,): replicated times.This TRUE ift end open; else FALSE: EOF.WHEN [,]^: identifies case sectiont .See CASE.Part CASE  OF .End CASEt . See CASE.End block IFt . See IF.End WHILE. See WHILE. position : PTR.PTR= sets position .ddress . computational real time clock.TIME$ reads sets display version clock.ddress s.ddress end BASIC's memory.SOUND ,,,[,]: make sound.SOUND ON|OFF: enable|disable sounds.BPUT,: put byte open.BPUT,[;]: put open,[out] new .CALL[,<>]^: Call machine code.Loadnd run new Basic .Forgetll s.CLOSE: close specified.Clear graphics screen.Clear text screen.Introduces  DATA be READ. The list items is separated by commas.Define procedure: DEF FN|PROC[()].End =; end procedure ENDPROC.DIM fred(100,100): creatend itialisenrray.DIM fred% 100:llocate space byterray etc.DIM(fred()): dimensions.DIM(fred(),n): size n'th dimension.DRAW [BY] : graphics draw [relative by] .Statement marking end execution.As END endddress memory used.End procedure definition.ENVELOPE takes 14 numeric parameters separated by commas.FOR <> = TO [STEP ].GOSUB < >: call subroutinet .GOTO < >: go .GCOL [TINT t]: set graphicseground colour [and tint] (background 128+a).GCOL ,a [TINT t]: set graphicse|background colourndction.Single if: IF  [THEN] <s> [ELSE <s>].Block if: IF  THEN < s>optional: ELSE < s> ENDIFINPUT [LINE]['|TAB|SPC]["display"][,|;]<>: put user.INPUT,: put data open.Optional partssignment.LOCAL : make things private procedure.LOCAL ERROR: save error control status on stack.MODE : set screen mode.As MODE current screen mode.MOVE [BY] : graphics move [relative by] .NEXT [<>[,<>]^]: closes one several FOR..NEXTs.ON: cursor on.ON ERROR [LOCAL|OFF]: define error handler.ON  GOTO|GOSUB|PROC.... ELSE: call specified list item.VDU [;|][,[;|]]: lists be sent vdu., only - 8 bits.; 16 bits.| 8 bytes zeroes.PLOT n, : graphics operation n.PRINT ['|TAB|SPC]["display"][][;] print things fieldsdefined by @%. See manual.PRINT,: print data open.Call procedure PROCfred( ); define one DEF PROCfred(a,b).READ : read s turn DATA s.Ignores rest .REPEAT: REPEAT..UNTIL;  delimiter not required.REPORT: print last error message.REPORT$ last error.RESTORE [< >]: restore data pointer first given .RESTORE ERROR: restore error control status stack.End subroutine.Clear snd executiont beginning .Stop .COLOUR [TINT t]: set texteground colour [and tint] (background 128+a).COLOUR,p: set palette entry logical colour physical colour p.COLOUR,r,g,b: set palette entry r, g, b physical colour.TRACE [STEP] ON|OFF|PROC|: trace [in single step mode] on f procedure  calls s below.UNTIL : end REPEAT..UNTIL.WIDTH : set width output.OSCLI : give Operating System Command Line Interpreter.CASE  OF: CASE..WHEN..OTHERWISE..ENDCASE.CIRCLE [FILL] ,r: draw circle out [solid].FILL [BY] : flood fill [relative] point .ORIGIN : sets s new graphics 0,0 point.POINT [BY] : set pixelt [relative] .POINT TO : position pointert if not linked mouse.RECTANGLE [FILL] xlo,ylo,width[,height] [TO xlo,ylo]:Draw rectangle out [solid] copy [move] rectangle.SWAP <>,<>: exchange contents.WHILE : WHILE..ENDWHILE.Wait vertical sync.MOUSE ,z[,t]: sets  mouse position; z button state [t time].MOUSE COLOUR,r,g,b: set mouse palette entry r, g, b physical colour.MOUSE OFF: turn mouse pointerf.MOUSE ON [a]: sets mouse pointer 1 [or].MOUSE RECTANGLE ,width,height: constrain mouse movement side rectangle.MOUSE STEP a[,b]: sets mouse step multiplier,a [or,b].MOUSE TO : positions mousend pointert .The QUIT  leaves terpreter.The SYS  calls operating system:SYS  [,]^ [TO <>[,<>]^[;<>]]Permanently stall|procedure library: see HELP LIBRARY.LIBRARY :snd procedures named can be used.TINT,t: set tint COLOUR|GCOL|fore|back t 256 colour modes.Alsovailables suffix GCOLnd COLOUR.As TINT( ) tint point 256 colour modes.ELLIPSE [FILL] ,maj,min[,angle]: draw ellipse out [solid].BEATS : set microbeats  bar.As BEATS current microbeats.TEMPO : set sound microbeat tempo.As TEMPO current microbeat tempo.VOICES : set sound voice channels.VOICE ,: assign named sound algorithm voice channel.STEREO ,: set stereo position channel.ppends nd renumbers new s. generates s typing  .AUTO [[,]] deletesll s between specifieds.DELETE , calls ARM BASIC Editor. help on usage terpreter. lists :LIST [< >][,[< >]][IF]. list section [if pattern]LISTO . Bits mean:-0: space before 1: dent2: split st :3: don't list 4: listkens lower case loads new . listsll s use. erases current . recovers justfter NEW. renumbers s  :RENUMBER [[,]] saves current . converts  textnd calls Twin. converts  text LIST optionnd calls Twin. sumll elements nrray. current microbeat.aT 0S0 0t2 p L0  A`AAL P0-e@H0@ T: @- L@ ,Z P4&'@,Z&'P.Zo [Z AZ:XZY:Z*!(-4)=@%:"ARM BBC BASIC V assembled on 25th September 1987.":@%=&900:"The program size is "P-" bytes, the variables use "-" bytes."'"There are "-" bytes of memory remaining."'"Help can do: 'HELP .' or 'HELP A' to print the names of keywords;"'"'HELP PRINT' for help on any particular keyword and 'HELP [' for assembler.":@%=!(-4): Possible keywords: P !*P:  P .Z PFQ#/ *Q  QQQ(Q2Q<QFQP: Q^t*sOZ :,:4:<P% PP/B* P/*( 0SP P/* the of number structure gives function string to line x,y or in program start value file from for# with charactervariablestatement a of a number ().This commandThis function gives theThis psuedo-variable reads or sets theAssembly language is contained in [] and assembled at P%. Labels follow '.'. Syntax: SWI[] ADC|ADD|AND|BIC|EOR|ORR|RSB|RSC|SBC|SUB[][S] ,, MOV|MVN[][S] , CMN|CMP|TEQ|TST[][S|P] , MLA[][S] ,,, MUL[][S] ,, LDR|STR[][B] , '[ [,] '] [,][!] LDM|STM[]DA|DB|EA|ED|FA|FD|IA|IB [!],{}[^] B[L][]