File: bbcbasic

package info (click to toggle)
ruby-rouge 4.6.1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 6,836 kB
  • sloc: ruby: 38,168; sed: 2,071; perl: 152; makefile: 8
file content (44 lines) | stat: -rw-r--r-- 947 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
REM > DefaultFilename
PRINT:REM Ordinary comment: This is still a comment
ONERRORPRINTERR:END
ERROR1,"error"
IF2*2=4ELSE*Cat:4.$
FOR n=1 TO 10
PRINTTAB(n)"Hello there ";FNnumber(n)DIV3+1'INKEY$(500)INKEY(500)
NEXT
DIM code% 100
FOR opt=0 TO 3 STEP 3
P%=code%
[OPT opt
.label1%
.label2% LDR r0,[P%MOD2,#0]
 MOV pc,r14:REM comments in assembly terminate at colon:EQUD -1
.label3;comment
 ALIGN
.label4
]
NEXT
CALL code%:PRINT USR(code%)
DIM`(100,100):PRINTDIM(`())
X=&FEDCBA98:PRINT X,~X,X>>>1,X>>1,X>1
PRINT %1010%1111:REM Prints "10" then "15"
A%=@%:@%="F10.2":PRINT~@%:@%=A%
ELLIPSE FILL 100,100,100,50,45
MOUSEOFF
DIM block% 100
block%!2*4=0
CASE thing OF
WHEN 1:PRINT"one"
OTHERWISE *echo not one
ENDCASE
*Help
ON
ONA%PROCa,PROCb ELSEPROCc
ONERRORONERROROFF:OFF:REPORT:END
IF A% PRINT"Problem"
IF A$ THEN PRINT"Not a problem"
WHILENOTEOF#f PRINTBGET#f:ENDWHILE
REPEATUNTILFALSE
END
DEFPROCa PRINT"Hello world":ENDPROC
DEFFNnumber(x%)=ABS(x%-4)