aboutsummaryrefslogtreecommitdiffstats
path: root/README
blob: b11ecc447a90fcbe63d4d8185b38b556cd561b47 (plain) (blame)
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485


                              README file for


               Bywater BASIC Interpreter, version 3.20
               ---------------------------------------------

                    Copyright (c) 1993, Ted A. Campbell
                  for bwBASIC version 2.10, 11 October 1993

               Version 2.20 modifications by Jon B. Volkoff,
                             25 November 1995

                  Patch level 1 release by Jon B. Volkoff,
                              15 March 1996

                  Patch level 2 release by Jon B. Volkoff,
                             11 October 1997

               Version 2.30 modifications by Paul Edwards,
                               5 March 2008

               Version 2.40 modifications by Paul Edwards,
                                26 Jan 2009

               Version 2.50 modifications by Paul Edwards,
                                4 June 2009

               Version 2.60 modifications by Paul Edwards,
                              6 November 2012

               Version 2.61 modifications by Paul Edwards,
                              4 August 2014

               Version 3.00 modifications by Howard Wulf, AF5NE
                               12 May 2015

               Version 3.10 modifications by Howard Wulf, AF5NE
                               27 July 2016

               Version 3.20 modifications by Howard Wulf, AF5NE
                                4 June 2017




DESCRIPTION:

   The Bywater BASIC Interpreter (bwBASIC) implements a large
   superset of the ANSI Standard for Minimal BASIC (X3.60-1978),
   a significant subset of the ANSI Standard for Full BASIC
   (X3.113-1987), and many classic BASIC dialects in C.  bwBASIC 
   seeks to be as portable as possible.

   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.



OBTAINING THE SOURCE CODE:

   The source code for bwBASIC is available from
   http://bwbasic.sourceforge.net


COMMUNICATIONS:

   email:  tcamp@delphi.com  (for Ted Campbell)
           eidetics@cerf.net (for Jon Volkoff)
           mutazilah@gmail.com (for Paul Edwards)


A LIST OF BASIC COMMANDS AND FUNCTIONS IMPLEMENTED in bwBASIC:

   The complete list of over 500 commands, functions and operators is 
   in the file "ALL.txt" in the DOCS directory.  Documentation for each 
   dialect is also in the DOCS directory.  Be aware that the commands,
   functions and operators available depend upon the particular BASIC
   dialect selected using the OPTION VERSION command.  


CHANGE HISTORY

CHANGES FROM 3.10 to 3.20

   * Implements most of the following BASIC dialects:
      OPTION VERSION "BYWATER"        ' Bywater BASIC 3
      OPTION VERSION "BYWATER-2"      ' Bywater BASIC 2
      OPTION VERSION "CALL/360"       ' SBC CALL/360 Mainframe BASIC
      OPTION VERSION "CBASIC-II"      ' CBASIC-II for CP/M
      OPTION VERSION "DARTMOUTH"      ' Dartmouth DTSS BASIC
      OPTION VERSION "ECMA-55"        ' ANSI Minimal BASIC
      OPTION VERSION "ECMA-116"       ' ANSI Full BASIC
      OPTION VERSION "GCOS"           ' GE 600 Mainframe BASIC
      OPTION VERSION "HAARDT"         ' bas 2.4 by Michael Haardt
      OPTION VERSION "HANDBOOK1"      ' The BASIC Handbook, 1st Edition
      OPTION VERSION "HANDBOOK2"      ' The BASIC Handbook, 2nd Edition
      OPTION VERSION "HEATH"          ' Heath Benton Harbor BASIC
      OPTION VERSION "MARK-I"         ' GE 265 Mainframe BASIC
      OPTION VERSION "MARK-II"        ' GE 435 Mainframe BASIC
      OPTION VERSION "MBASIC"         ' Microsoft BASIC-80 for Xenix
      OPTION VERSION "PDP-8"          ' DEC PDP-8 BASIC
      OPTION VERSION "PDP-11"         ' DEC PDP-11 BASIC
      OPTION VERSION "RBASIC"         ' Micronics RBASIC for 6809 FLEX
      OPTION VERSION "RSTS-11"        ' DEC RSTS-11 BASIC-PLUS
      OPTION VERSION "SYSTEM/360"     ' IBM System/360 Mainframe BASIC
      OPTION VERSION "SYSTEM/370"     ' IBM System/370 Mainframe BASIC
      OPTION VERSION "TRS-80"         ' TRS-80 Model I/III/4 LBASIC
      OPTION VERSION "VINTAGE"        ' Vintage BASIC 1.0.1
      OPTION VERSION "XBASIC"         ' TSC XBASIC for 6800 FLEX
      
   * CONST variable [, ...] = value
      Assigns the value to variable.  
      Any later assignment to the variable causus a VARIABLE NOT DECLARED error.

   * DIM now supports lower and upper bounds.
      OPTION BASE 1
      DIM X(      9 ) ' lower bound is 1
      DIM Y( 5 TO 9 ) ' lower bound is 5

   * DIM now supports virtual variables.
      OPTION BASE 1
      OPEN "VIRTUAL.DAT" FOR VIRTUAL AS # 3 ' virtual data file 
      DIM # 3, A( 1000 )        ' array is virtual
      LET A( 1000 ) = 0         ' value is written to the file
      LET X = A( 1000 )         ' value is read from the file
      CLOSE # 3                 ' array is no longer valid

   * ERROR 27, "Bad DATA"
      Occurs when the READ command detects garbage in a DATA command.

   * INPUT LINE
      Same as LINE INPUT.

   * MAT now supports lower and upper bounds.
      OPTION BASE 1
      MAT X(      9 ) = ZER ' lower bound is 1
      MAT Y( 5 TO 9 ) = ZER ' lower bound is 5
      MAT X = ZER(      9 ) ' lower bound is 1
      MAT Y - ZER( 5 TO 9 ) ' lower bound is 5

   * MAXLEN()
     Returns the maximum string length.

   * OPTION DIGITS integer
      Sets the number of significant digits for PRINT.  
      Setting the value to zero restores the default.   
      
   * OPTION EDIT string$
      Sets the program name used by the EDIT command.
      Setting this to "" disables EDIT command.

   * OPTION FILES string$
      Sets the program name used by the FILES command.
      Setting this to "" disables FILES command.
      
   * OPTION PROMPT string$
      Sets the prompt.

   * OPTION PUNCT AT char$
      Sets the PRINT AT character, commonly "@".
      Setting this to "" disables PRINT AT.
      Setting this to a non-punctuation character is not supported.

   * OPTION PUNCT BYTE char$
      Sets the BYTE type suffix, commonly "~".
      Setting this to "" disables BYTE suffix.
      Setting this to a non-punctuation character is not supported.

   * OPTION PUNCT COMMENT char$
      Sets the trailing COMMENT character, commonly "'".
      Setting this to "" disables trailing comments.
      Setting this to a non-punctuation character is not supported.

   * OPTION PUNCT CURRENCY char$
      Sets the CURRENCY type suffix, commonly "@".
      Setting this to "" disables CURRENCY suffix.
      Setting this to a non-punctuation character is not supported.

   * OPTION PUNCT DOUBLE char$
      Sets the DOUBLE type suffix, commonly "#".
      Setting this to "" disables DOUBLE suffix.
      Setting this to a non-punctuation character is not supported.

   * OPTION PUNCT FILENUM char$
      Sets the FILE NUMBER prefix, commonly "#".
      Setting this to "" disables the FILE NUMBER prefix.
      Setting this to a non-punctuation character is not supported.

   * OPTION PUNCT IMAGE char$
      Sets the shortcut IMAGE character, commonly ":".
      Setting this to "" disables the shortcut IMAGE character.
      Setting this to a non-punctuation character is not supported.

   * OPTION PUNCT INPUT char$
      Sets the shortcut INPUT character, commonly "!".
      Setting this to "" disables the shortcut INPUT character.
      Setting this to a non-punctuation character is not supported.

   * OPTION PUNCT INTEGER char$
      Sets the INTEGER type suffix, commonly "%".
      Setting this to "" disables INTEGER suffix.
      Setting this to a non-punctuation character is not supported.

   * OPTION PUNCT LONG char$
      Sets the LONG type suffix, commonly "&".
      Setting this to "" disables LONG suffix.
      Setting this to a non-punctuation character is not supported.

   * OPTION PUNCT LPAREN char$
      Sets the LEFT PARENTHESIS character, commonly "(".
      Setting this to a non-punctuation character is not supported.

   * OPTION PUNCT PRINT char$
      Sets the shortcut PRINT character, commonly "?".
      Setting this to "" disables the shortcut PRINT character.
      Setting this to a non-punctuation character is not supported.

   * OPTION PUNCT QUOTE char$
      Sets the QUOTE character, commonly """".
      Setting this to a non-punctuation character is not supported.

   * OPTION PUNCT RPAREN char$
      Sets the RIGHT PARENTHESIS character, commonly ")".
      Setting this to a non-punctuation character is not supported.

   * OPTION PUNCT SINGLE char$
      Sets the SINGLE type suffix, commonly "!".
      Setting this to "" disables SINGLE suffix.
      Setting this to a non-punctuation character is not supported.

   * OPTION PUNCT STATEMENT char$
      Sets the shortcut STATEMENT seperator character, commonly ":".
      Setting this to "" disables the STATEMENT seperator.
      Setting this to a non-punctuation character is not supported.

   * OPTION PUNCT STRING char$
      Sets the STRING type suffix, commonly "$".
      Setting this to "" disables STRING suffix.
      Setting this to a non-punctuation character is not supported.

   * OPTION RECLEN integer
      Sets the default record length for RANDOM files, commonly 128.
      Setting thisto zero means there is no default RANDOM record 
      length, so the record  length must be specified in the OPEN 
      statement.
      With OPTION RECLEN 128:
         OPEN "FILE.DAT" FOR RANDOM AS #3
      is considered to be the same as
         OPEN "FILE.DAT" FOR RANDOM AS #3 LEN 128
      With OPTION RECLEN 0:
         OPEN "FILE.DAT" FOR RANDOM AS #3
      causes an error.
         
   * OPTION RENUM string$
      Sets the program name used by the RENUM command.
      Setting this to "" disables RENUM command.
   
   * OPTION SCALE integer
      Sets the number of digits to round after the decimal point for PRINT.
      Setting the value to zero disables rounding.
      
   * OPTION USING DIGIT
   * OPTION USING COMMA
   * OPTION USING PERIOD
   * OPTION USING PLUS
   * OPTION USING MINUS
   * OPTION USING EXRAD
   * OPTION USING DOLLAR
   * OPTION USING FILLER
   * OPTION USING LITERAL
   * OPTION USING FIRST
   * OPTION USING ALL
   * OPTION USING LENGTH
      Sets the characters recognized by PRINT USING.
      Setting these to a non-punctuation character is not supported.
      
   * OPTION VERSION now requires a string instead of a literal.
      Some version names have changed.

   * OPTION VERSION "PDP-8"
      Added LPT, PTP, PTR, TTY, TTY IN and TTY OUT commands.
      Added GET() and PUT() functions.

   * OPTION VERSION "CALL/360"
   * OPTION VERSION "SYSTEM/360"
   * OPTION VERSION "SYSTEM/370"
      Added alphabet extenders.  $ is a string variable.

   * OPTION ZONE integer
      Sets the PRINT zone width.  
      Setting the value to zero restores the default.
   
   * REPEAT - UNTIL added
      REPEAT
        ...
        EXIT REPEAT
        ...
      UNTIL expression ' exits when expression != 0

   * SPC( X ) and TAB( X )
      No longer use control codes.
   
   * UNTIL - UEND removed (to add REPEAT - UNTIL)
     Here is a work-around for existin code using UNTIL-UEND:
      UNITL expression -->> WHILE NOT expression
        ...                   ...
        EXIT UNTIL     -->>   EXIT WHILE
        ...                   ...
      UEND             -->> WEND
            
   * from Howard Wulf, AF5NE


CHANGES FROM 3.00 to 3.10

   * Implements most of the following BASIC dialects:
      OPTION VERSION DARTMOUTH        ' Dartmouth DTSS BASIC
      OPTION VERSION MARK-I           ' GE 265 Mainframe BASIC
      OPTION VERSION MARK-II          ' GE 435 Mainframe BASIC
      OPTION VERSION SYSTEM-360       ' IBM System/360 BASIC
      OPTION VERSION SYSTEM-370       ' IBM System/370 BASIC
      OPTION VERSION CBASIC-II        ' CBASIC-II for CP/M
      OPTION VERSION ECMA-55          ' ANSI Minimal BASIC
      OPTION VERSION HANDBOOK1        ' The BASIC Handbook, 1st Edition
      OPTION VERSION HANDBOOK2        ' The BASIC Handbook, 2nd Edition
      OPTION VERSION TRS-80           ' TRS-80 Model I/III/4 LBASIC
      OPTION VERSION BASIC-80         ' Microsoft BASIC-80 for Xenix
      OPTION VERSION ECMA-116         ' ANSI Full BASIC
   
   * from Howard Wulf, AF5NE


CHANGES FROM 2.61 to 3.00

   * Code redesign from Howard Wulf, AF5NE


CHANGES FROM 2.60 to 2.61

   * Bug fix from Matthias Rustler


CHANGES FROM 2.50 to 2.60

   * New maths functions and append mode support from Edmond Orignac
   
   * Bug fixes


CHANGES FROM 2.40 to 2.50

   * Bug fixes
   
   * New compilation procedure for MVS and CMS


CHANGES FROM 2.30 to 2.40

   * Bug fixes from Bill Chatfield
   
   * Updated documentation

   * Added support for compiling on CMS (another IBM mainframe OS)


CHANGES FROM 2.20pl2 to 2.30

   * Minor bug fixes, cosmetic improvements and portability improvements

   * Added support for compiling on MVS (IBM mainframe)


CHANGES FROM 2.20pl1 to 2.20pl2

bwb_cmd.c
   Fixed calling stack level logic in RETURN statement to prevent erroneous
   "RETURN without GOSUB" messages.

bwb_cnd.c
bwb_stc.c

   Changed continuation condition for WHILE, ELSEIF, and LOOP UNTIL
   to be != FALSE, not == TRUE.  More in line with common commercial
   BASIC implementations.

bwb_mth.c
   Fixed initialization in VAL function so that old results are not later
   returned as values.

bwb_var.c
   Added parenthesis level checking to dim_getparams. Using multi-level
   expressions as array subscripts was causing the program to bomb.

bwx_iqc.c
bwx_tty.c
bwb_mes.h
   Added second copyright notice.

bwb_dio.c
bwb_str.c
   Added support for strings longer than 255 characters.

bwb_prn.c
   Disabled tab expansion and print width checks when not printing to a file.

bwb_inp.c
   Fixed LINE INPUT file reads to accommodate strings of length MAXSTRINGSIZE.

bwx_ncu.h
bwx_ncu.c
   New files.  Code for UNIX ncurses interface, compliments of L.C. Benschop,
   Eindhoven, The Netherlands.

Makefile.ncu
   New files.  Sample makefile for ncurses implementation.

bwbasic.h
   Revised defines for MININTSIZE and MAXINTSIZE from 16-bit to 32-bit limits.
   Revised define for MAXSTRINGSIZE from 255 to 5000 characters.
   Changed string length from unsigned char to unsigned int to support strings
   longer than 255 characters.
   Added support for new ncurses package.
   Revised VERSION define to reflect above changes.


CHANGES FROM 2.20 to 2.20pl1

bwb_cnd.c

   Moved init routine for bwb_while so that it would be initialized regardless
   of expression value, not just if TRUE.  This was causing some segmentation
   faults in WHILE-WEND loops.

bwb_elx.c

   Plugged gaping memory leak.  Temp variable space for expression evaluation
   was being allocated but not freed when done (oops!).

bwb_fnc.c

   Added check for NULL return from getenv to prevent segmentation faults.

bwbasic.h
   Revised VERSION define to reflect above changes.



CHANGES FROM 2.10 to 2.20:

   * Plugged numerous memory leaks, resolved memory overruns and allocation
     difficulties.

   * General cleanup and bug fixes, too many to list in detail here.
     The major problem areas addressed were:

      - RUN command with file name argument
      - nested and cascaded FOR-NEXT loops
      - PRINT USING
      - EOF, LOF functions
      - string concatenation
      - operator hierarchy
      - multi-level expression evaluation
      - hex constant interpretation
      - hex and octal constants in INPUT and DATA statements

   * Added a CLOSE all files feature (when no argument supplied).

   * Added a unary minus sign operator.

   * Added a MID$ command to complement the MID$ function.

   * Added a RENUM facility in a standalone program.

   * Added checking in configure for unistd.h (important on Sun systems).




Un proyecto texto-plano.xyz