-
Notifications
You must be signed in to change notification settings - Fork 3
rocketsh
The interactive shell used to execute commands and run programs. Launched by init
.
The rocketsh
shell supports two forms of input; firstly any command you type is searched for as a program under the /programs
directory. If it can be found it is executed. The path under which rocketsh
searches for programs to run can be changed, as shown below.
If no matching program can be found, the line is passed to EVAL instead and any changes to the program state will be inherited by rocketsh
, including documented variables below.
The rocketsh
shell has several documented variables, which can be set via the command prompt. These are:
Change PROMPT$
to change the shell prompt from the default of ROCKETSH
to the specified value. ANSI escape sequences are supported. You can use CHR$(27)
to insert the escape chracter:
PROMPT$ = CHR$(27) + "[31mRED PROMPT" + CHR$(27) + "[37m"
and this will set the shell prompt to dark red:
The directory to search in for programs ran at the command prompt. It defaults to /programs
.
PATH$ = "/harddisk/progs"
The GLOBAL
variable LIB$ is the path that programs will use to load libraries from within BASIC. It defaults to /programs/libraries
and is set from within /programs/init
and passed down to rocketsh
.
You must remember the GLOBAL
prefix if you wish for this value to be inherited by BASIC programs.
GLOBAL LIB$ = "/harddisk/progs/lib"
(C) Brainbox.cc 2010-2023
- Home
- Builtin Commands
- Included Programs
-
Creating BASIC programs
- Automatic line numbering
- Variable Naming
- Builtin Variables
- Variable Types
- Builtin Variables
- Parameter types
-
Statements
- BACKGROUND
- CALL
- CHAIN
- CHDIR
- CIRCLE
- CLOSE
- CLS
- COLOUR/COLOR
- CONNECT
- CURSOR
- DEF
- DIM
- ELSE
- END
- ENDIF
- EVAL
- FN
- FOR
- GCOL
- GLOBAL
- GOSUB
- GOTO
- IF
- INPUT
- LET
- LIBRARY
- LINE
- LOCAL
- NEXT
- PLOT
- POINT
- POP
- PROC
- PUSH
- RECTANGLE
- REDIM
- REM
- REPEAT
- RETURN
- SETVARI
- SETVARR
- SETVARS
- SPRITELOAD
- SPRITEFREE
- SOCKCLOSE
- SOCKREAD
- SOCKWRITE
- TRIANGLE
- UNTIL
- WRITE
- YIELD
-
Builtin Functions
-
Integer Functions
- ABS
- ASC
- CHR
- CPUID
- CURRENTX
- CURRENTY
- EOF
- EXISTSVARI
- EXISTSVARR
- EXISTSVARS
- GETNAMECOUNT
- GETPROCCOUNT
- GETPROCCPUID
- GETPROCID
- GETPROCPARENT
- GETSIZE
- GETVARI
- HEXVAL
- INSTR
- LCPUID
- LGETLASTCPUID
- LEN
- MEMFREE
- MEMORY
- MEMUSED
- OCTVAL
- OPENIN
- OPENOUT
- OPENUP
- RADIX
- RGB
- RND
- SHL
- SHR
- SOCKCLOSE
- SOCKREAD
- SOCKSTATUS
- TERMHEIGHT
- TERMWIDTH
- VAL
- String Functions
- Real Functions
-
Integer Functions
- System Libraries