BWBASIC(1)
๐ BWBASIC(1) โ Bywater BASIC interpreter/shell ๐
okay so bestie, welcome to the manual for bwbasic ๐
this is part 1 of 6, so we're just getting started. no cap, this is the Bywater BASIC interpreter/shell and it's giving vintage but make it shell-scripting. let's get into it.
โจ NAME โจ
bwbasic โ Bywater BASIC interpreter/shell
so like, the name is literally bwbasic and it's the Bywater BASIC interpreter/shell. iconic.
Bywater BASIC Interpreter/Shell, version 2.10
Copyright (c) 1993, Ted A. Campbell for bwBASIC version 2.10, 11 October 1993
๐ CONTENTS ๐
- DESCRIPTION โ what even is this
- TERMS OF USE โ the legal tea
- QUICK REFERENCE LIST OF COMMANDS AND FUNCTIONS โ the cheat sheet
- GENERAL NOTES ON USAGE โ how to actually use it
- EXPANDED REFERENCE FOR COMMANDS AND FUNCTIONS โ the deep dive
- PREDEFINED VARIABLES โ the built-in ones
- UNIMPLEMENTED COMMANDS AND FUNCTIONS and AGENDA FOR DEVELOPMENT โ the to-do list
- THE STORY OF BYWATER BASIC โ lore
- COMMUNICATIONS โ how to reach out
also the author wants to say thanks to Mr. David MacKenzie, who helped with the Unix installation and configuration for this version. we love a supportive bestie ๐ซถ
1. โจ DESCRIPTION โจ
so the Bywater BASIC Interpreter (bwBASIC) is literally a large superset of the ANSI Standard for Minimal BASIC (X3.60-1978) and a significant subset of the ANSI Standard for Full BASIC (X3.113-1987) written in C. it also offers shell programming facilities as an extension of BASIC. bwBASIC seeks to be as portable as possible. no cap.
bwBASIC can be configured to emulate features, commands, and functions available on different types of BASIC interpreters; see the file INSTALL for further installation information. ๐
the interpreter is fairly slow. whenever faced with a choice between conceptual clarity and speed, I have consistently chosen the former. the interpreter is the simplest design available, and utilizes no system of intermediate code, which would speed up considerably its operation. as it is, each line is interpreted afresh as the interpreter comes to it. so it's not fast, but it's clear. periodt.
bwBASIC implements one feature not available in previous BASIC interpreters: a shell command can be entered interactively at the bwBASIC prompt, and the interpreter will execute it under a command shell. for instance, the command "dir *.bas" can be entered in bwBASIC (under DOS, or "ls -l *.bas" under UNIX) and it will be executed as from the operating system command line. shell commands can also be given on numbered lines in a bwBASIC program, so that bwBASIC can be used as a shell programming language. bwBASIC's implementation of the RMDIR, CHDIR, MKDIR, NAME, KILL, ENVIRON, and ENVIRON$() commands and functions offer further shell-processing capabilities. slay.
2. ๐ TERMS OF USE ๐
this version of Bywater BASIC is released under the terms of the GNU General Public License (GPL), which is distributed with this software in the file "COPYING". the GPL specifies the terms under which users may copy and use the software in this distribution.
a separate license is available for commercial distribution, for information on which you should contact the author. so if you wanna make money off it, hit him up.
3. โก QUICK REFERENCE LIST OF COMMANDS AND FUNCTIONS โก
be aware that many of these commands and functions will not be available unless you have set certain flags in the header files (see the expanded reference section below for dependencies). so don't come for me if something doesn't work.
here's the whole list, copied exactly so you don't miss a single one:
ABS( number )
ASC( string$ )
ATN( number )
CALL subroutine-name
CASE ELSE | IF partial-expression | constant
CHAIN [MERGE] file-name [, line-number] [, ALL]
CHDIR pathname
CHR$( number )
CINT( number )
CLEAR
CLOSE [[#]file-number]...
CLS
COMMON variable [, variable...]
COS( number )
CSNG( number )
CVD( string$ )
CVI( string$ )
CVS( string$ )
DATA constant[,constant]...
DATE$
DEF FNname(arg...)] = expression
DEFDBL letter[-letter](, letter[-letter])...
DEFINT letter[-letter](, letter[-letter])...
DEFSNG letter[-letter](, letter[-letter])...
DEFSTR letter[-letter](, letter[-letter])...
DELETE line[-line]
DIM variable(elements...)[variable(elements...)]...
DO NUM|UNNUM
DO [WHILE expression]
EDIT
ELSE
ELSEIF
END IF | FUNCTION | SELECT | SUB
ENVIRON variable-string = string
ENVIRON$( variable-string )
EOF( device-number )
ERASE variable[, variable]...
ERL
ERR
ERROR number
EXP( number )
FIELD [#] device-number, number AS string-variable [, number AS string-variable...]
FILES filespec$
FUNCTION
FOR counter = start TO finish [STEP increment]
GET [#] device-number [, record-number]
GOSUB line | label
GOTO line | label
HEX$( number )
IF expression THEN [statement [ELSE statement]]
INKEY$
INPUT [# device-number]|[;]["prompt string";]list of variables
INSTR( [start-position,] string-searched$, string-pattern$ )
INT( number )
KILL file-name
LEFT$( string$, number-of-spaces )
LEN( string$ )
LET variable = expression
LINE INPUT [[#] device-number,]["prompt string";] string-variable$
LIST line[-line]
LOAD file-name
LOC( device-number )
LOCATE line, column
LOF( device-number )
LOG( number )
LOOP [UNTIL expression]
LSET string-variable$ = expression
MERGE file-name
MID$( string$, start-position-in-string[, number-of-spaces ] )
MKD$( number )
MKDIR pathname
MKI$( number )
MKS$( number )
NAME old-file-name AS new-file-name
NEW
NEXT [counter]
OCT$( number )
ON variable GOTO|GOSUB line[,line,line,...]
ON ERROR GOSUB line
OPEN "O"|"I"|"R", [#]device-number, file-name [,record length]
file-name FOR INPUT|OUTPUT|APPEND AS [#]device-number [LEN = record-length]
OPTION BASE number
POS
PRINT [# device-number,][USING format-string$;] expressions...
PUT [#] device-number [, record-number]
QUIT
RANDOMIZE number
READ variable[, variable]...
REM string
RESTORE line
RETURN
RIGHT$( string$, number-of-spaces )
RMDIR pathname
RND( number )
RSET string-variable$ = expression
RUN [line][file-name]
SAVE file-name
SELECT CASE expression
SGN( number )
SIN( number )
SPACE$( number )
SPC( number )
SQR( number )
STOP
STR$( number )
STRING$( number, ascii-value|string$ )
SUB subroutine-name
SWAP variable, variable
SYSTEM
TAB( number )
TAN( number )
TIME$
TIMER
TROFF
TRON
VAL( string$ )
WEND
WHILE expression
WIDTH [# device-number,] number
WRITE [# device-number,] element [, element ]....
that's a lot of commands, bestie. take a screenshot. ๐ธ
4. ๐ GENERAL NOTES ON USAGE ๐
4.a. Interactive Environment
an interactive environment is provided if the flag INTERACTIVE is defined as TRUE in bwbasic.h, so that a line with a line number can be entered at the bwBASIC prompt and it will be added to the program in memory.
line numbers are not strictly required, but are useful if the interactive environment is used for programming. for longer program entry one might prefer to use an ASCII text editor, and in this case lines can be entered without numbers. one can use DO NUM and DO UNNUM to number or unnumber lines. see also the documentation below for the pseudo-command EDIT. so you do you.
4.b. Naming Conventions
command names and function names are not case sensitive, so that "Run" and "RUN" and "run" are equivalent and "abs()" and "ABS()" and "Abs()" are equivalent. HOWEVER, variable names ARE case sensitive in bwbASIC, so that "d$" and "D$" are different variables. this differs from some BASIC implementations where variable names are not case sensitive. so watch out.
variable names can use any alphabetic characters, the period and underscore characters and decimal digits (but not in the first position). they can be terminated with '#' or '!' to allow Microsoft-type names, even though the precision is irrelevant to bwBASIC. iykyk.
4.c. Numerical Constants
numerical constants may begin with a digit 0-9 (decimal), with the "&H" or "&h" (hexadecimal) or the "&o" or "&O" (octal). decimal numbers may terminated with 'E', 'e', 'D', or 'd' followed by an exponent number to denote exponential notation. decimal constants may also be terminated by the '#' or '!' to comply with Microsoft-style precision terminators, although the precision specified will be irrelevant to bwBASIC. so many ways to write a number, it's giving versatile.
4.d. Command-Line Execution
a filename can be specified on the command line and will be LOADed and RUN immediately, so that the command line
bwbasic prog.bas
will load and execute "prog.bas". easy.
4.e. Program Storage
all programs are stored as ASCII text files. no binary nonsense here.
4.f. TRUE and FALSE
TRUE is defined as -1 and FALSE is defined as 0 in the default distribution of bwBASIC. these definitions can be changed by those compiling bwBASIC (see file BWBASIC.H). so if you're compiling it yourself, you can change the vibe.
4.g. Assignments
assignment must be made to variables. this differs from some implementations of BASIC where assignment can be made to a function. implication: "INSTR( 3, x$, y$ ) = z$" will not work under bwBASIC. so don't try it. periodt.
4.h. Operators and Precedence
bwBASIC recognizes the following operators, with their level of precedence given (1 = highest):
^ 1 exponentiation
* 2 multiplication
/ 2 division
3 integer division
+ 5 addition
- 5 subtraction
= 6 equality or assignment
MOD 4 modulus (remainder) arithmetic
<> 7 inequality
< 8 less than
> 9 greater than
<= 10 less than or equal to
=< 10 less than or equal to
>= 11 greater than or equal to
=> 11 greater than or equal to
NOT 12 negation
AND 13 conjunction
OR 14 disjunction
XOR 15 exclusive or
IMP 16 implication
EQV 17 equivalence
note the missing operator on the integer division line? yeah, that's exactly how it is in the original. we keep it real. ๐
4.h. Numerical Precision (NOT)
bwBASIC is out here working with numbers that have literally one level of precision, bestie. If the flag NUMBER_DOUBLE is set to TRUE in bwbasic.h, then the precision you get is whatever the C "double" data type gives you; otherwise (and this is the default, so like, assume this unless told otherwise) the precision is that of the C float type. And yeah, there are a bunch of points where commands (or pseudo-commands, the little posers ๐
) seem to recognize Microsoft-style precision distinctions โ but for the most part those are just work-around aliases so Microsoft-style programs can actually run. It's giving translator energy. ๐
โจ 5. EXPANDED REFERENCE FOR COMMANDS AND FUNCTIONS โจ
Okay so the "Dependencies" you're gonna see listed in all the reference material below? Those are the flags that have to be set to TRUE in bwbasic.h for that specific command or function to even get implemented. Here's the whole flag family, no cap:
(core)โ Commands and Functions in any implementation of bwBASIC; these are the ANSI Minimal BASIC coreINTERACTIVEโ Commands supporting the interactive programming environmentCOMMON_CMDSโ Commands beyond ANSI Minimal BASIC which are common to Full ANSI BASIC and Microsoft BASICsCOMMON_FUNCSโ Functions beyond the ANSI Minimal BASIC core, but common to both ANSI Full BASIC and Microsoft-style BASIC varietiesUNIX_CMDSโ Commands which require Unix-style directory and environment routines not specified in CSTRUCT_CMDSโ Commands related to structured programming; all of these are part of the Full ANSI BASIC standardANSI_FUNCSโ Functions unique to ANSI Full BASICMS_CMDSโ Commands unique to Microsoft BASICsMS_FUNCSโ Functions unique to Microsoft BASICs
Function: ABS( number )
- Description:
ABSreturns the absolute value of the argumentnumber. Slay, negativity removed. ๐ - Dependencies:
(core)
Function: ASC( string$ )
- Description:
ASCreturns the ASCII code for the first letter in the argumentstring$. Just the first one, bestie โ it's not reading the whole thing. ๐ - Dependencies:
MS_FUNCS
Function: ATN( number )
- Description:
ATNreturns the arctangent value of the argumentnumberin radians. Math girlies rise up. ๐โจ - Dependencies:
(core)
Command: CALL subroutine-name
- Description:
CALLcalls a named subroutine โ go peek atSUBandEND SUBfor the full lore. ๐ - Dependencies:
STRUCT_CMDS
Command: CASE ELSE | IF partial-expression | constant
- Description:
CASEintroduces an element of aSELECT CASEstatement (seeSELECT CASE).CASE IFintroduces a conditionalSELECT CASEelement, andCASE ELSEintroduces a defaultSELECT CASEelement. It's the choose-your-own-adventure of BASIC. ๐ฆ - Dependencies:
STRUCT_CMDS
Command: CHAIN [MERGE] file-name [, line-number] [, ALL]
- Description:
CHAINpasses control to another BASIC program. Variables declaredCOMMON(q.v.) will be passed to the new program. Handing off the aux like a relay race. ๐โโ๏ธ๐จ - Dependencies:
COMMON_CMDS
Command: CHDIR pathname$
- Description:
CHDIRchanges the current directory to that indicated by the argumentpathname$. Moving out, fr fr. ๐ชโจ - Dependencies:
UNIX_CMDS
Function: CHR$( number )
- Description:
CHR$returns a one-character string with the character corresponding to the ASCII code indicated by argumentnumber. The glow-up twin ofASC. ๐ซ - Dependencies:
COMMON_FUNCS
Function: CINT( number )
- Description:
CINTreturns the truncated integer for the argumentnumber. All the decimals get politely escorted out. ๐ - Dependencies:
MS_FUNCS
Command: CLEAR
- Description:
CLEARsets all numerical variables to0, and all string variables to null. Fresh start, clean slate, main character reset arc. ๐ธ - Dependencies:
COMMON_CMDS
Command: CLOSE [[#]file-number]...
- Description:
CLOSEcloses the file indicated byfile-number(seeOPEN). Say bye bestie ๐ - Dependencies:
COMMON_CMDS
Command: CLS
- Description:
CLSclears the display screen (IBM and compatibles only as of version 2.10). Not everyone gets this privilege, sorry. ๐ - Dependencies:
IMP_IQCandIMP_CMDLOC
Command: CMDS
- Description:
CMDSis a debugging command that prints a list of all implemented bwBASIC commands. It's the receipts printer. ๐งพ - Dependencies:
DEBUG
Command: COMMON variable [, variable...]
- Description:
COMMONdesignates variables to be passed to aCHAINed program (seeCHAIN). Gotta tag your friends before the switch-up. ๐ซถ - Dependencies:
COMMON_CMDS
Function: COS( number )
- Description:
COSreturns the cosine of the argumentnumberin radians. Trigonometry stays undefeated. ๐ - Dependencies:
(core)
Function: CSNG( number )
- Description:
CSNGis a pseudo-function that has no effect under bwBASIC. It replicates a Microsoft-type command that would convert thenumberto single-precision. It's cosplaying as a real function, and we let it. ๐ - Dependencies:
MS_FUNCS
Function: CVD( string$ )
- Description:
CVDconverts the argumentstring$into a bwBASIC number (precision is irrelevant in bwBASIC since bwBASIC numbers have only one precision). โจ
Implementation-Specific Notes:
CVD(), CVI(), CVS(), MKI$(), MKD$(), MKS$(): These functions are implemented, but they are dependent on a) the sizes for integer, float, and double values on particular systems, and b) how particular versions of C store these numerical values. The implication is that data files created using these functions on a DOS-based microcomputer may not be translated correctly by bwBASIC running on a Unix-based computer. Similarly, data files created by bwBASIC compiled by one version of C may not be readable by bwBASIC compiled by another version of C (even under the same operating system). So be careful with these.
๐จ Okay this one is the real warning, bestie. This is not a vibe โ this is a portability landmine. Files made on one system/compiler might just not read right on another. Be careful, fr fr.
- Dependencies:
MS_FUNCS
Function: CVI( string$ )
- Description:
CVIconverts the argumentstring$into a bwBASIC number (precision is irrelevant in bwBASIC since bwBASIC numbers have only one precision; see also the note onCVD). ๐ - Dependencies:
MS_FUNCS
Function: CVS( string$ )
- Description:
CVIconverts the argumentstring$into a bwBASIC number (precision is irrelevant in bwBASIC since bwBASIC numbers have only one precision; see also the note onCVD). ๐ - Dependencies:
MS_FUNCS
Command: DATA constant[,constant]...
- Description:
DATAstores numerical and string constants to be accessed byREAD(q.v.). It's the little stash you come back for later. ๐ - Dependencies:
(core)
Function: DATE$
- Description:
DATE$returns the current date based on the computer's internal clock as a string in the form"YYYY-MM-DD". As implemented under bwBASIC,DATE$cannot be used for assignment (i.e., to set the system date). Read-only, bestie. You can look, you cannot touch. ๐ - Note: bwBASIC presently (v2.10) does not allow assignment to a function.
- Dependencies:
COMMON_FUNCS
Command: DEF FNname(arg...)] = expression
- Description:
DEFdefines a user-written function. This function corresponds to Microsoft-type implementation, although in bwBASICDEFis a working equivalent ofFUNCTION. DIY queen behavior. ๐ - Dependencies:
(core)
Command: DEFDBL letter[-letter](, letter[-letter])...
- Description:
DEFDBLdeclares variables with single-letter names as numerical variables (precision is irrelevant in bwBASIC). ๐ - Dependencies:
MS_CMDS
Command: DEFINT letter[-letter](, letter[-letter])...
- Description:
DEFINTdeclares variables with single-letter names as numerical variables (precision is irrelevant in bwBASIC). ๐ - Dependencies:
MS_CMDS
Command: DEFSNG letter[-letter](, letter[-letter])...
- Description:
DEFSNGdeclares variables with single-letter names as numerical variables (precision is irrelevant in bwBASIC). ๐ - Dependencies:
MS_CMDS
Command: DEFSTR letter[-letter](, letter[-letter])...
- Description:
DEFSTRdeclares variables with single-letter names as string variables. String girlies, this one's for you. ๐ - Dependencies:
MS_CMDS
Command: DELETE line[-line]
- Description:
DELETEdeletes program lines indicated by the argument(s). If you want to useDELETEfor non-numbered programs, first useDO NUM, thenDELETE, thenDO UNNUM. It's a whole ritual, but it works. โจ - Dependencies:
INTERACTIVE
Command: DIM variable(elements...)[variable(elements...)]...
- Description:
DIMspecifies variables that have more than one element in a single dimension, i.e., arrayed variables. โจ - Note: As implemented under bwBASIC,
DIMaccepts only parentheses as delimiters for variable fields. (Some BASICs allow the use of square brackets.) - Dependencies:
(core)
Command: DO NUM|UNNUM
Description time, bestie ๐ so DO NUM numbers all the lines in a program. The first line gets the number 10, and then every line after it gets numbered consecutively in multiples of 10 โจ. And DO UNNUM? That one strips all the line numbers right back out of a program. Iconic little duo tbh.
NOTE, and this part matters: these functions do nothing to line numbers, like, for example, following aGOSUBorGOTOstatement. So no, they are not a replacement forRENUM(which exists in some systems, but not in bwBASIC ๐). What they are good for: you can develop unnumbered programs by entering new lines with numbers, then runningDO UNNUMto remove the line numbers. And together withLOADandSAVE(q.v.) you can legitimately use bwBASIC as a primitive text editor. slay ๐
Dependencies: INTERACTIVE
Command: DO [WHILE expression]
DO implements a whole bunch of forms of program loops ๐. DO...LOOP just loops, periodt โ the only way out is via EXIT. DO WHILE...LOOP loops while expression is true (this is equivalent to the older WHILE-WEND loop, which bwBASIC also implements, iykyk). And DO...LOOP UNTIL loops until the expression following UNTIL is true โจ.
Dependencies: STRUCT_CMDS
Command: EDIT
EDIT is a pseudo-command ๐ซถ โ it calls the text editor specified in the variable BWB.EDITOR$ so you can edit the program that's in memory. After the call to the text editor, the (edited) program gets reloaded into memory. Heads up: you normally have to specify a valid path and filename in BWB.EDITOR$ before this command is even useful. No path, no vibes ๐.
Dependencies: COMMON_CMDS
Command: ELSE
ELSE introduces a default condition in a multi-line IF statement. That's the whole job ๐ธ.
Dependencies: STRUCT_CMDS
Command: ELSEIF
ELSEIF introduces a secondary condition in a multi-line IF statement. Main character energy, second-place position ๐.
Dependencies: STRUCT_CMDS
Command: END IF | FUNCTION | SELECT | SUB
Okay so this one's a four-for-one deal โจ:
END IFends a multi-lineIFstatement.END FUNCTIONends a multi-line function definition.END SELECTends aSELECT CASEstatement.END SUBends a multi-line subroutine definition.
Dependencies: STRUCT_CMDS
Command: ENVIRON variable-string$ = string$
ENVIRON sets the environment variable identified by variable-string$ to string$ ๐.
Little note, bestie: this differs from the implementation of ENVIRON in some versions of BASIC, but bwBASIC's ENVIRON lets BASIC variables be used on either side of the equals sign. Also, the function ENVIRON$() is a different thing from this command, don't mix them up ๐. And be aware that in some operating systems, an environment variable set within a program will not be passed to its parent shell. So don't come crying to me when your shell can't see it ๐.
Dependencies: UNIX_CMDS
Function: ENVIRON$( variable-string$ )
ENVIRON$ returns the environment variable associated with the name variable-string$. It's the getter to ENVIRON's setter, we love a matching set ๐.
Dependencies: MS_FUNCS
Function: EOF( device-number )
EOF returns TRUE (-1) if the device associated with device-number is at the end-of-file, otherwise it returns FALSE (0) ๐ฆ.
Dependencies: MS_FUNCS
Command: ERASE variable[, variable]...
ERASE eliminates arrayed variables from a program. bye bye arrays ๐โจ.
Dependencies: COMMON_CMDS
Function: ERL
ERL returns the line number of the most recent error ๐.
Dependencies: MS_FUNCS
Function: ERR
ERR returns the error number of the most recent error ๐ฅ.
Careful though: ifPROG_ERRORShas been defined when bwBASIC is compiled, theERRvariable will not be set correctly upon errors. It only works when standard error messages are used. So like, it works, but only in that one situation, fr fr.
Dependencies: MS_FUNCS
Command: ERROR number
ERROR simulates an error โ as in, it displays the message appropriate for that error ๐
. This command is helpful in writing ON ERROR GOSUB routines that can identify a few errors for special treatment and then ERROR ERR (i.e., default handling) for all the others. Chef's kiss error handling honestly ๐.
Dependencies: COMMON_CMDS
Command: EXIT [FOR]
EXIT by itself exits from a DO...LOOP loop; EXIT FOR exits from a FOR...NEXT loop. The escape hatch of your dreams ๐ชโจ.
Dependencies: STRUCT_CMDS
Function: EXP( number )
EXP returns the exponential value of number. Math girlies rise ๐ธ.
Dependencies: (core)
Command: FIELD [#] device-number, number AS string-variable$ [, number AS string-variable$...]
FIELD allocates space in a random file buffer for the device indicated by device-number, allocating number bytes and assigning the bytes at this position to the variable string-variable$ ๐ง.
Dependencies: COMMON_CMDS
Command: FILES filespec$
FILES is a pseudocommand that invokes the directory program specified in the variable BWB.FILES$ with the argument filespec$ ๐. Normally, you gotta set this variable before FILES can be used. For example, for PC-type computers:
BWB.FILES$ = "DIR"
will work. And for Unix machines:
BWB.FILES$ = "ls -l"
etc. Set your variable, get your listing, live your best life ๐ซถ.
Dependencies: COMMON_CMDS
Command: FNCS
Okay ngl, the page literally says: CMDS is a debugging command that prints a list of all pre-defined bwBASIC functions ๐. That's what it says, I'm just the messenger. It's a debugging command that prints a list of all pre-defined bwBASIC functions โจ.
Dependencies: DEBUG
Command: FUNCTION
FUNCTION introduces a function definition, normally ending with END FUNCTION ๐. In bwBASIC, FUNCTION and DEF are working equivalents, so either one can be used with single-line function definitions or with multi-line definitions terminated by END FUNCTION. Two names, one vibe, we love efficiency ๐.
Dependencies: STRUCT_CMDS
Command: FOR counter = start TO finish [STEP increment]
FOR initiates a FOR-NEXT loop with the variable counter initially set to start and incrementing in increment steps (default is 1) until counter equals finish ๐. Classic. Timeless. Iconic.
Dependencies: (core)
Command: GET [#] device-number [, record-number]
GET reads the next record from a random-access file or device into the buffer associated with that file ๐ฅ. If record-number is specified, the GET command reads the specified record instead. Your choice, bestie.
Dependencies: COMMON_CMDS
Command: GOSUB line | label
GOSUB initiates a subroutine call to the line (or label) specified โจ. The subroutine must end with RETURN. No RETURN, no coming back, and that's on periodt ๐
.
Dependencies: (core), but STRUCT_CMDS for labels
Command: GOTO line | label
GOTO branches program execution to the specified line (or label). Teleportation but make it BASIC ๐.
Dependencies: (core), but STRUCT_CMDS for labels
Function: HEX$( number )
HEX$ returns a string giving the hexadecimal (base 16) value for the number ๐ขโจ.
Dependencies: MS_FUNCS
Command: IF expression THEN [statement [ELSE statement]]
IF evaluates expression and performs the THEN statement if it is true, or (optionally) the ELSE statement if it is FALSE ๐ฆ. And if STRUCT_CMDS is set to TRUE, bwBASIC allows multi-line IF statements with ELSE and ELSEIF cases, ending with END IF. So you can go as multi-line as your heart desires ๐.
Dependencies: (core), STRUCT_CMDS for multi-line IF statements
Function: INKEY$
INKEY$ reads the status of the keyboard, and a single keypress, if available โจ๏ธ. If a keypress is not available, then INKEY$ immediately returns a null string ("") โ it does not wait around for you, it has places to be ๐
. Currently (v2.10) implemented in bwx_iqc.c only. So, like, very specific situation, iykyk.
Dependencies: IMP_IQC and IMP_CMDLOC
Command: INPUT [# device-number]|[;]["prompt string";]list of variables
INPUT allows input from the terminal or a device specified by device-number ๐. If it's the terminal, the "prompt string" is output, and input is assigned to the appropriate variables specified. Cute, right?
But heads up: bwBASIC does not support the optional feature of INPUT that suppresses the carriage-return and line-feed at the end of the input. Why? Because C alone does not provide for any means of input other than CR-LF-terminated strings. That's just the situation, bestie, we don't make the rules ๐ญ.
Dependencies: (core)
Function: INSTR( [start-position,] string-searched$, string-pattern$ )
INSTR hands you back the exact position where string-pattern$ shows up inside string-searched$, and it starts its little scavenger hunt from start-position. ๐
As implemented in bwBASIC, INSTR cannot be used for assignments.
Note: bwBASIC presently (v2.10) does not allow assignment to a function. bestie you literally cannot do it, don't try ๐
- Dependencies:
MS_FUNCS
โจ Function: INT( number )
INT gives you the largest integer that's less than or equal to the argument number. So it rounds down, floor-style, no cap. ๐ง
NOTE this is not a "truncated" integer function โ if that's the vibe you want, go look at CINT instead. They are not the same girl, do not confuse them.
- Dependencies:
(core)
๐ Command: KILL file-name$
KILL deletes the file you name in file-name$. It's giving ruthless. Gone. Deleted. No recycle bin. ๐๏ธ
- Dependencies:
UNIX_CMDS
๐ Function: LEFT$( string$, number-of-spaces )
LEFT$ returns a substring of string$ that's number-of-spaces long, taken from the left (aka the beginning) of the string. So you're grabbing the front bit. โ๏ธ
As implemented under bwBASIC, it cannot be used for assignment.
- Dependencies:
MS_FUNCS
๐ธ Function: LEN( string$ )
LEN returns the length of string$ โ in bytes, bestie, bytes specifically. ๐
- Dependencies:
COMMON_FUNCS
๐ Command: LET variable = expression
LET variable = expression
LET assigns the value of expression to the variable. Simple, iconic, foundational. โจ
As currently implemented, bwBASIC supports implied LET statements โ like X = 4.5678 right at the start of a line or line segment โ but it does not support assignment to multiple variables. So x, y, z = 3.141596 is a no. Sorry to that one. ๐ญ
- Dependencies:
(core)
๐ฆ Command: LINE INPUT [[#] device-number,]["prompt string";] string-variable$
LINE INPUT [[#] device-number,]["prompt string";] string-variable$
LINE INPUT reads an entire line from the keyboard, a file, or a device, and drops it into string-variable$. โจ๏ธ
If the input is coming from the keyboard (stdin), then "prompt string" gets printed first so you know what you're being asked for. ๐ซถ
And here's the difference from INPUT, which matters: LINE INPUT reads a whole line โ it does not stop early for comma-delimited data items. The line is the line, periodt. ๐ซ
- Dependencies:
COMMON_CMDS
โญ Command: LIST line[-line]
LIST lists program lines exactly as specified in its argument. Give it a range, get a range. ๐
- Dependencies:
INTERACTIVE
๐ Command: LOAD file-name
LOAD loads an ASCII BASIC program into memory. ๐ง โจ
- Dependencies:
INTERACTIVE
๐ฅ Function: LOC( device-number )
LOC returns the next record that the GET or PUT statements are gonna use. It's the little peek at "where are we now." ๐
- Dependencies:
MS_FUNCS
๐ง Command: LOCATE line, column
LOCATE moves the cursor to a specified line and column. ๐
Currently (v2.10) implemented in bwx_iqc.c only.
- Dependencies:
IMP_IQCandIMP_CMDLOC
๐ Function: LOF( device-number )
LOF returns the length of a file in bytes โ the file being the one specified by device-number. ๐
- Dependencies:
MS_FUNCS
๐ Function: LOG( number )
LOG returns the natural logarithm of the argument number. Math girlies rise ๐งฎ๐
- Dependencies:
(core)
๐ซ Command: LOOP [UNTIL expression]
LOOP terminates a program loop โ go see DO for the whole situation. ๐
- Dependencies:
STRUCT_CMDS
๐ Command: LSET string-variable$ = expression
LSET string-variable$ = expression
LSET transfers data from expression over to the left-hand side of a string variable, or to a random access buffer field. ๐ฅ
- Dependencies:
COMMON_CMDS
๐ซถ Command: MERGE file-name
MERGE adds program lines from file-name to the program already sitting in memory. ๐งฉ
Here's the tea: unlike LOAD, it does not clear the program currently in memory. Your existing code stays. That's the whole point.
- Dependencies:
COMMON_CMDS
๐ Function: MID$( string$, start-position-in-string[, number-of-spaces ] )
MID$ returns a substring of string$, starting at start-position-in-string and continuing for number-of-spaces bytes. โ๏ธโจ
- Dependencies:
MS_FUNCS
๐ Command: MKDIR pathname$
MKDIR creates a new directory path, exactly as specified by pathname$. New folder unlocked ๐๐
- Dependencies:
UNIX_CMDS
๐
Function: MKD$( number )
Okay so MKD$, MKI$, and MKS$ are all equivalent in bwBASIC โ they're literally the same girl in three outfits. ๐ฏ
They convert the numerical value number into a string that can be stored in a more compressed form in a file (especially for random file access, iykyk).
And since bwBASIC does not recognize differences in precision, these commands are effectively equivalent. So don't stress about which one you pick. ๐
- Dependencies:
MS_FUNCS
๐ธ Function: MKI$( number )
Equivalent to MKD$ (q.v.). Same thing, different name. ๐ช
- Dependencies:
MS_FUNCS
๐ฆ Function: MKS$( number )
Equivalent to MKD$ (q.v.). Yes, also the same. ๐ซ
- Dependencies:
MS_FUNCS
๐ฅ Command: NAME old-file-name AS new-file-name
NAME old-file-name AS new-file-name
NAME renames an existing file โ old-file-name becomes new-file-name. Glow-up complete. ๐ซ
- Dependencies:
UNIX_CMDS
๐ Command: NEW
NEW deletes the program in memory and clears all the variables. Total reset. Everything gone. It's giving scorched earth. ๐ฅ๐ซ
- Dependencies:
INTERACTIVE
โญ Command: NEXT [counter-variable]
NEXT comes at the end of a FOR-NEXT loop โ go check FOR for the full picture. ๐
- Dependencies:
(core)
๐ Function: OCT$( number )
OCT$ returns a string giving the octal (base 8) representation of number. Eight fingers energy. ๐
- Dependencies:
MS_FUNCS
๐ง Command: ON variable GOTO|GOSUB line[,line,line,...]
ON variable GOTO|GOSUB line[,line,line,...]
ON either branches (GOTO) or calls a subroutine (GOSUB) based on the rounded value of variable. ๐ฏ
So: if it's 1, the first line is called; if it's 2, the second line is called; etc. Pick-a-path but make it BASIC.
- Dependencies:
(core)
๐ Command: ON ERROR GOSUB line|label
ON ERROR sets up an error handling subroutine. When things go sideways, you've got a plan. ๐จ
See also ERROR.
- Dependencies:
COMMON_CMDS,STRUCT_CMDSfor labels
๐ Command: OPEN
OPEN "O"|"I"|"R", [#]device-number, file-name [,record length]
file-name FOR INPUT|OUTPUT|APPEND AS [#]device-number [LEN = record-length]
OPEN allocates random access memory so you can access a disk file or other device. ๐พโจ
Important: two quite different forms of the OPEN statement are supported. Don't mix them up bestie.
In the first form:
"O"denotes sequential output"I"denotes sequential input"R"denotes random-access input and output
Note: those letters must be encased in quotation marks. Like, actually."O"notO. ๐
Once OPEN, any number of operations can be performed on a device โ go see WRITE #, INPUT #, PRINT #, etc.
- Dependencies:
COMMON_CMDS
๐ Command: OPTION BASE number
OPTION BASE sets the lowest value for array subscripts โ either 0 or 1. Pick your lane. ๐ฃ๏ธ
- Dependencies:
(core)
๐ Function: POS
POS returns the current cursor position in the line. ๐
- Dependencies:
COMMON_FUNCS
โจ Command: PRINT [# device-number,][USING format-string$;] expressions...
PRINT [# device-number,][USING format-string$;] expressions...
PRINT outputs text to the screen, or to a file/device specified by device-number. ๐จ๏ธ
In the current implementation of bwBASIC, expressions to be printed must be separated by:
- the comma โ tabbed output
- the semicolon โ immediate sequential output
- the plus sign โ immediate sequential output by string concatenation
Heads up: expressions separated by blanks or tabs are not supported. Sorry, no vibe-spacing your way through this one. ๐ญ
If USING is specified, a bunch of formatting marks may appear in the format string: ๐จ
!โ prints the first character of a string\โ prints2+xcharacters of a string, where x = the number of spaces between the backslashes&โ variable-length string field#โ represents a single digit in output format for a number.โ decimal point in a number+โ sign of a number (will output+or-)-โ trailing minus after a number**โ fill leading spaces with asterisks$$โ output dollar sign in front of a number^^โ output number in exponential format_โ output next character literally
As currently implemented, the exponential format will be that used by the C compiler. ๐ ฒ
- Dependencies:
(core),COMMON_FUNCSforUSING
๐ Command: PUT [#] device-number [, record-number]
PUT [#] device-number [, record-number]
PUT outputs either the next available record or the record specified by record-number, to the file or device denoted by device-number. ๐ค
- Dependencies:
COMMON_CMDS
๐
Command: QUIT
(hold that thought bestie, the tea on QUIT is coming right upโฆ)
โจ Command: QUIT
okay so QUIT is literally just a synonym for SYSTEM โ same girl, different name ๐
when you're in the INTERACTIVE environment, she dips out of the program and hands you back to the operating system (or to whatever program called her in the first place).
- Dependencies:
INTERACTIVE
๐ฒ Command: RANDOMIZE number
RANDOMIZE seeds the random number generator (peep RND for the whole vibe ๐). Under bwBASIC you can hand her a 'number' seed straight from the TIMER function (q.v.) and she'll take it, no questions asked.
- Dependencies: (core)
๐ Command: READ variable[, variable]...
READ pulls values out of DATA statements and drops them into the named variables, one by one, slay โจ and here's the thing bestie โ the variable types in a READ statement must match the data types in the DATA statements as they are occurred. No mismatches, fr fr. See also DATA and RESTORE.
- Dependencies: (core)
๐ฌ Command: REM string
REM is how you leave little notes to yourself inside a program ๐ the way it's currently implemented, the entire line following REM gets ignored by the interpreter. So even if MULTISEG_LINES is set, a REM line will not be able to find a segment delimiter (":") followed by another line segment with a command. And heads up: bwBASIC does not currently implement the Microsoft-style use of the single quotation mark to denote remarks. not me hoping for it tho ๐ญ
- Dependencies: (core)
โช Command: RESTORE line
RESTORE resets the line and position counters for DATA and READ statements back to the top of the program file โ or to the beginning of the line you specified. (Currently this must be a line number.)
- Dependencies: (core)
โฉ๏ธ Command: RETURN
RETURN wraps up a subroutine that got called by GOSUB. cute and simple, we love her ๐ซถ
- Dependencies: (core)
โ๏ธ Function: RIGHT$( string$, number-of-spaces )
RIGHT$ returns a substring of string$ with number-of-spaces taken from the right (the end) of the string. As implemented under bwBASIC, it cannot be used for assignment โ read only, bestie, no take-backs ๐
- Dependencies:
MS_FUNCS
๐๏ธ Command: RMDIR pathname
RMDIR deletes the directory path indicated by pathname. gone, bye, no notes โจ
- Dependencies:
UNIX_CMDS
๐ฐ Function: RND( number )
RND returns a pseudo-random number. The 'number' value is ignored by bwBASIC if you supply one (so don't stress about it, she does her own thing). The RANDOMIZE command (q.v.) reseeds the random-number generator.
- Dependencies: (core)
โก๏ธ Command: RSET string-variable$ = expression
RSET transfers data from expression over to the right-hand side of a string variable or a random access buffer field. right-aligning, main character energy ๐
- Dependencies:
COMMON_CMDS
๐ Command: RUN [line][file-name$]
RUN executes the program in memory. If you supply a file-name$, that specified file gets loaded into memory and executed instead. And if you supply a line number, execution begins at that line. chef's kiss, let's gooo ๐ฅ
- Dependencies:
INTERACTIVE
๐พ Command: SAVE file-name$
SAVE writes the program in memory out to file-name$. Heads up: bwBASIC only saves files in ASCII format โ that's the only flavor on the menu ๐
- Dependencies:
INTERACTIVE
๐ฏ Command: SELECT CASE expression
SELECT CASE kicks off a multi-line conditional selection statement. The expression you hand to SELECT CASE gets evaluated by the CASE statements that follow, and the whole thing wraps up with an END SELECT statement.
As currently implemented, CASE statements may be followed by string values, but in this case only simple comparisons (equals, not equals) can be performed. so keep it basic, bestie ๐
- Dependencies:
STRUCT_CMDS
โ Function: SGN( number )
SGN returns the sign of the argument number: +1 for positive numbers, 0 for 0, and -1 for negative numbers. she's just out here judging numbers, respectfully ๐
- Dependencies: (core)
๐ Function: SIN( number )
SIN returns the sine of the argument number, in radians. trig girlies rise ๐
- Dependencies: (core)
โฃ Function: SPACE$( number )
SPACE$ returns a string of blank spaces number bytes long. silence, but make it intentional โจ
- Dependencies:
MS_FUNCS
โฃ Function: SPC( number )
SPC returns a string of blank spaces number bytes long. yes she's basically SPACE$'s twin, they're both iconic ๐
- Dependencies:
MS_FUNCS
๐งฎ Function: SQR( number )
SQR returns the square root of the argument number. math ate, no cap ๐
- Dependencies: (core)
๐ Command: STOP
STOP interrupts program execution. As implemented under bwBASIC, STOP issues a SIGINT signal โ so yeah, she's serious about it ๐ญ
- Dependencies: (core)
๐ข Function: STR$( number )
STR$ returns a string giving the decimal (base 10) representation of the argument number. numbers to letters, the transformation we deserve ๐
- Dependencies:
COMMON_FUNCS
๐ Function: STRING$( number, ascii-value|string$ )
STRING$ returns a string number bytes long, consisting of either the first character of string$ or the character answering to the ASCII value ascii-value. pick your fighter, both valid ๐
- Dependencies:
MS_FUNCS
๐งฉ Command: SUB subroutine-name
SUB introduces a named, multi-line subroutine. You call it with a CALL statement, and it wraps up with an END SUB statement. organized queen behavior ๐
- Dependencies:
STRUCT_CMDS
๐ Command: SWAP variable, variable
SWAP swaps the values of two variables. The two variables must be of the same type (either numerical or string) โ no mixing, bestie, that's the rule ๐ซ
- Dependencies:
COMMON_CMDS
๐ช Command: SYSTEM
SYSTEM exits from bwBASIC to the calling program or (more usually) straight to the operating system. she's leaving, and honestly, she earned it ๐ฆ
- Dependencies:
INTERACTIVE
๐ Function: TAB( number )
TAB outputs spaces until the column indicated by number has been reached. lining things up like the perfectionist she is โจ
- Dependencies: (core)
๐ Function: TAN( number )
TAN returns the tangent of the argument number, in radians. more trig, we stay fed ๐ธ
- Dependencies: (core)
๐ Function: TIME$
TIME$ returns the current time based on the computer's internal clock, as a string in the form "HH-MM-SS". As implemented under bwBASIC, TIME$ cannot be used for assignment (i.e., to set the system time) โ she tells time, she doesn't take orders ๐
Note: bwBASIC presently (v2.10) does not allow assignment to a function.
- Dependencies:
COMMON_FUNCS
โฑ๏ธ Function: TIMER
TIMER returns the time in the system clock in seconds elapsed since midnight. perfect for seeding stuff, iykyk ๐ฐ
- Dependencies:
MS_FUNCS
๐ Command: TROFF
TROFF turns off the trace facility; see TRON. we're done snooping, periodt ๐
- Dependencies:
COMMON_CMDS
๐ Command: TRON
TRON turns on the trace facility. This facility prints each line number in square brackets as the program is executed, which is genuinely so useful in debugging programs with line numbers ๐ To debug an unnumbered program with TRON, call DO NUM first โ but remember to call DO UNNUM before you save the program later. don't forget bestie, I'm begging ๐
- Dependencies:
COMMON_CMDS
๐ค Function: VAL( string$ )
VAL returns the numerical value of string$. string to number pipeline, immaculate ๐
- Dependencies:
COMMON_FUNCS
๐ Command: VARS
VARS is a debugging command which prints a list of all variables defined that have global scope. peek behind the curtain, queen ๐
- Dependencies:
DEBUG
๐ Command: WEND
WEND concludes a WHILE-WEND loop; see WHILE. the end, literally ๐
- Dependencies:
COMMON_CMDS
๐ Command: WHILE expression
WHILE initiates a WHILE-WEND loop. The loop ends with WEND, and execution reiterates through the loop as long as the expression is TRUE (-1). keep going until it's not, that's the whole vibe โจ
- Dependencies:
COMMON_CMDS
๐ Command: WIDTH [# device-number,] number
WIDTH sets screen or device output to number columns. device-number specifies the device or file for output. formatting her own little world ๐
- Dependencies:
COMMON_CMDS
โ๏ธ Command: WRITE [# device-number,] element [, element ]....
WRITE outputs variables to the screen, or to a file or device specified by device-number. Commas are inserted between the expressions output, and strings are enclosed in quotation marks. tidy, predictable, iconic ๐
- Dependencies:
COMMON_CMDS
๐ 6. PREDEFINED VARIABLES ๐
okay so bwBASIC comes with four preset variables already in the bag, no setup needed:
BWB.EDITOR$BWB.FILES$BWB.PROMPT$BWB.IMPLEMENTATION$
The commands EDIT and FILES are pseudo-commands โ they literally just launch shell programs whose names live inside BWB.EDITOR$ and BWB.FILES$. The default values for these two can be changed in bwbasic.h (look for DEF_EDITOR and DEF_FILES), or you can change them on the fly yourself. cute idea the page suggests: initialize them in "profile.bas" for specific implementations. like, BWB.FILES$ could be defined as "ls -l" on Unix systems, or "dir" on DOS systems. โจ
The preset variable BWB.PROMPT$ sets the prompt string for bwBASIC. again, the suggestion is that you set up your own prompt in a "profile.bas" so it gets initialized every single time bwBASIC starts. and note โ you can add special characters to the prompt string, like this:
BWB.PROMPT$ = "Ok"+CHR$(10)
that gives you an "Ok" prompt followed by a linefeed. iconic. ๐
The preset variable BWB.IMPLEMENTATION$ returns "TTY" for the bwx_tty implementation, and returns "IQC" for the IBM PC or Compatibles with QuickC (bwx_iqc) implementation. this is lowkey useful for figuring out which commands and functions โ specifically CLS, LOCATE, and INKEY$ โ might actually be available to you. ๐
๐ฆ 7. UNIMPLEMENTED COMMANDS AND FUNCTIONS, and AGENDA FOR DEVELOPMENT ๐ฆ
ngl, there are some things that aren't implemented that have been part of standard BASICs for SO long that their absence is gonna seem surprising. but in every single case, implementing them would require operating-system-specific functions or terminal-specific functions that just can't be universally provided. some specific examples:
CLOADโ relies on CP/M or MSDOS conventions for binary executable files. ๐CONTโ seeRESUMEbelow (programmer ignorance?).DEF USRโ relies on CP/M or MSDOS conventions for binary executable files.FRE()โ the ability to report how much free memory is remaining is system-specific, because memory allocation and access patterns vary. so that ability isn't present in ANSI or earlier versions of C, and this function is not available in bwBASIC.INPUT$()โ C by itself is not able to read unechoed keyboard input, and can read keyboard input only after a Carriage-Return has been entered.INPโ calls to hardware ports, like machine-language routines, are highly system-specific and cannot be implemented in C alone.LLISTโ seeLPRINTbelow.LPOSโ seeLPRINTbelow.LPRINTโ andLLIST, etc., require access to a printer device, and that varies from one system to another. users might try OPENing the printer device on their own operating system (e.g.,"/dev/lp"on Unix systems, or"PRN"under DOS) and see if printing can be done from bwBASIC in this way.NULLโ in this case the author is convinced thatNULLis no longer necessary, since very few printers now require NULLs at the end of lines.OUTโ seeINPabove (calls to hardware ports).PEEK()โPEEKandPOKEenabled earlier BASICs to address particular memory locations. although bwBASIC could possibly implement this command (POKE) and this function (PEEK()), the limitation would be highly limited by the different systems for memory access in different systems.POKEโ seePEEK()above.RENUMโ since unnumbered lines can be entered and executed under bwBASIC, it would not be possible to implement aRENUMroutine. instead, bwBASIC usesDO NUMandDO UNNUM.RESUMEโ is this possible under C? if so, the author simply has failed to figure it out yet. Mea culpa (but not maxima). ๐ญUSRโ seeCALLandDEF USRabove (machine language subroutines).VARPTRโ seePEEKandPOKEabove.WAITโ seeINPandOUTabove.
There are other commands, functions, and implementation details that the author is working on, and which are on the agenda list for future versions of bwBASIC. these agenda include:
PARACTโ i.e., the ability to execute PARallel ACTions. this is described in ANSI BASIC, although the author has not seen it implemented before. it will offer a rough, non-preemptive form of multitasking within the scope of a BASIC program. programmers will note points at which there are already hooks forPARACTin bwBASIC.XMEMโ PC-type computers need to be able to use extended memory. if we could use extended memory for program lines, variables, and function definitions, we could write much longer programs. this would entail, however, a fairly serious rewriting of the program to utilize memory handles for these storage features instead of direct memory pointers.Windowsโ the addition of memory handles in addition to the non-preemptive execution of program lines (in a crude form, already present) will make it possible to develop implementations for Windows and perhaps for other graphical user interfaces. but what form should this take? the author presently has in mind a BASIC that would run in the background, appearing only as an icon in the GUI space, with pop-up editors and output windows. thus, the interpreted language would serve a purpose something like'cron'(a task scheduler) under Unix systems. you may have some reflections that would help with this. ๐ซถGraphicsโ here we face fairly critical differences in different styles and implementations of graphics, e.g., between GWBASIC, ANSI BASIC, VisualBASIC, etc. but it's possible that Graphics commands and functions could be added. these would all be implementation-specific.
The ANSI Standard for full BASIC does not specify which particular commands or functions must be implemented, and in fact the standard is very robust. perhaps no implementation of BASIC would ever include all of the items, but some ANSI commands and functions which remain unimplemented are:
ACCESSANGLEAREAARITHMETICARRAYASKBSTRBVALCEILCELLSCLIPCOLLATECONNECTCOSHDATUMDEBUGDECIMALDECLAREDEGREESDEVICEDISCONNECTDISPLAYDOTDRAWERASEEVENTEXCEPTIONGRAPHHANDLERIMAGEKEYLCASELINESLOG10LOG2MATMIXMULTIPOINTOUTINOUTPUTPARACTPICTUREPIXELPLOTPOINTSRADIANSRECEIVERENUMBERREWRITEROTATEROUNDSEIZESENDSHIFTSINHTANHTIMEOUTTRACETRANSFORMTRUNCATEUBOUNDUCASEVIEWPORTWAITVIEWPORTZONEWIDTH
(yes, VIEWPORT is in there twice. we don't make the rules bestie, we just keep the list exactly as it is ๐)
๐ธ 8. THE STORY OF BYWATER BASIC ๐ธ
okay this part is genuinely the most main character backstory ever and you're not ready. this program was originally begun in 1982 by the author's grandmother, Mrs. Verda Spell of Beaumont, TX. she was writing the program using an ANSI C compiler on an Osborne I CP/M computer. and even though the author's grandfather (Lockwood Spell) had bought an IBM PC with 256k of RAM, grandmother would not use it โ paraphrasing George Herbert to the effect that "He who cannot in 64k program, cannot in 512k." ๐ค absolute icon behavior.
she had used Microsoft BASIC, and although she had nothing against it, she said repeatedly that she didn't understand why Digital Research didn't "sue the socks off of Microsoft" for version 1.0 of MSDOS. so, the author reckons, she hoped to undercut Microsoft's entire market and eventually build a new software empire on the North End of Beaumont. her programming efforts were cut tragically short when she was thrown from a Beaumont to Port Arthur commuter train in the summer of 1986. ๐ญ
the author found the source code to bwBASIC on a single-density Osborne diskette in her knitting bag, and eventually managed to have it all copied over to a PC diskette. it has been revised slightly prior to this release. and you should know, though โ as the author says it โ that "I myself am an historian, not a programmer." periodt. ๐
๐ 9. COMMUNICATIONS ๐
wanna slide into the inbox? here's the deets:
- email:
tcamp@delphi.com
and that's the whole page bestie, you made it to the end ๐ฅณ this was BWBASIC(1), dated October 11, 1993 โ so go forth, write some BASIC, set your BWB.PROMPT$ to something cute, and remember: she who cannot in 64k program, cannot in 512k. ๐
โจ๐ฆ
๐ฆ where this page comes from
- debian bookworm: bwbasic 2.20pl2-13
- debian trixie: bwbasic 2.20pl2-14
- ubuntu jammy: bwbasic 2.20pl2-13
- ubuntu noble: bwbasic 2.20pl2-13
- ubuntu questing: bwbasic 2.20pl2-15
- ubuntu resolute: bwbasic 2.20pl2-16
- ubuntu stonking: bwbasic 2.20pl2-17
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms