Browse Source

v3.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
tags/v3.10
Jon Foster 3 years ago
parent
commit
5a220d5b6b
100 changed files with 234 additions and 33 deletions
  1. +0
    -31
      .cextrc
  2. +1
    -1
      00INDENT.BAT
  3. +1
    -1
      01INDENT.BAT
  4. +0
    -0
      B15A/00readme.txt
  5. +86
    -0
      B15A/00test.sh
  6. +20
    -0
      B15A/01test.sh
  7. +0
    -0
      B15A/02ok.sh
  8. +17
    -0
      B15A/99test.sh
  9. +0
    -0
      B15A/BW.PRO
  10. +0
    -0
      B15A/BYWATER.PRO
  11. +0
    -0
      B15A/PAD80.BAS
  12. +0
    -0
      B15A/PAD80.INP
  13. +0
    -0
      B15A/abs.bas
  14. +0
    -0
      B15A/abs.run
  15. +0
    -0
      B15A/assign.bas
  16. +0
    -0
      B15A/assign.run
  17. +1
    -0
      B15A/bwbasic.pro
  18. +39
    -0
      B15A/callfunc.bas
  19. +0
    -0
      B15A/callfunc.run
  20. +0
    -0
      B15A/callsub.bas
  21. +0
    -0
      B15A/callsub.run
  22. +0
    -0
      B15A/chain1.bas
  23. +0
    -0
      B15A/chain1.run
  24. +0
    -0
      B15A/chain2.bas
  25. +0
    -0
      B15A/chain2.run
  26. +0
    -0
      B15A/data.tmp
  27. +0
    -0
      B15A/dataread.bas
  28. +0
    -0
      B15A/dataread.run
  29. +0
    -0
      B15A/deffn.bas
  30. +0
    -0
      B15A/deffn.run
  31. +0
    -0
      B15A/dim.bas
  32. +0
    -0
      B15A/dim.run
  33. +0
    -0
      B15A/doloop.bas
  34. +0
    -0
      B15A/doloop.run
  35. +0
    -0
      B15A/dowhile.bas
  36. +0
    -0
      B15A/dowhile.run
  37. +0
    -0
      B15A/elseif.INP
  38. +0
    -0
      B15A/elseif.bas
  39. +0
    -0
      B15A/elseif.run
  40. +0
    -0
      B15A/end.bas
  41. +0
    -0
      B15A/end.run
  42. +0
    -0
      B15A/err.bas
  43. +5
    -0
      B15A/err.run
  44. +0
    -0
      B15A/fncallfn.bas
  45. +0
    -0
      B15A/fncallfn.run
  46. +0
    -0
      B15A/fornext.bas
  47. +0
    -0
      B15A/fornext.run
  48. +3
    -0
      B15A/function.INP
  49. +0
    -0
      B15A/function.bas
  50. +47
    -0
      B15A/function.run
  51. +0
    -0
      B15A/gosub.INP
  52. +0
    -0
      B15A/gosub.bas
  53. +0
    -0
      B15A/gosub.run
  54. +0
    -0
      B15A/gotolabl.bas
  55. +0
    -0
      B15A/gotolabl.run
  56. +0
    -0
      B15A/ifline.bas
  57. +0
    -0
      B15A/ifline.run
  58. +0
    -0
      B15A/index.txt
  59. +0
    -0
      B15A/input.INP
  60. +0
    -0
      B15A/input.bas
  61. +0
    -0
      B15A/input.run
  62. +0
    -0
      B15A/lof.INP
  63. +0
    -0
      B15A/lof.bas
  64. +0
    -0
      B15A/lof.run
  65. +0
    -0
      B15A/loopuntl.bas
  66. +0
    -0
      B15A/loopuntl.run
  67. +0
    -0
      B15A/main.bas
  68. +2
    -0
      B15A/main.run
  69. +0
    -0
      B15A/mlifthen.bas
  70. +0
    -0
      B15A/mlifthen.run
  71. +0
    -0
      B15A/on.INP
  72. +0
    -0
      B15A/on.bas
  73. +0
    -0
      B15A/on.run
  74. +0
    -0
      B15A/onerr.bas
  75. +0
    -0
      B15A/onerr.run
  76. +0
    -0
      B15A/onerrlbl.bas
  77. +0
    -0
      B15A/onerrlbl.run
  78. +0
    -0
      B15A/ongosub.INP
  79. +0
    -0
      B15A/ongosub.bas
  80. +0
    -0
      B15A/ongosub.run
  81. +0
    -0
      B15A/opentest.bas
  82. +0
    -0
      B15A/opentest.run
  83. +0
    -0
      B15A/option.bas
  84. +0
    -0
      B15A/option.run
  85. +0
    -0
      B15A/pascaltr.bas
  86. +0
    -0
      B15A/pascaltr.run
  87. +2
    -0
      B15A/profile.bas
  88. +0
    -0
      B15A/putget.INP
  89. +0
    -0
      B15A/putget.bas
  90. +0
    -0
      B15A/putget.run
  91. +0
    -0
      B15A/random.bas
  92. +10
    -0
      B15A/random.run
  93. +0
    -0
      B15A/selcase.bas
  94. +0
    -0
      B15A/selcase.run
  95. +0
    -0
      B15A/snglfunc.bas
  96. +0
    -0
      B15A/snglfunc.run
  97. +0
    -0
      B15A/stop.bas
  98. +0
    -0
      B15A/stop.run
  99. +0
    -0
      B15A/term.INP
  100. +0
    -0
      B15A/term.bas

+ 0
- 31
.cextrc View File

@@ -1,31 +0,0 @@
#
# File: .cextrc
#
# This config file was generated by version 1.7 of cextract.
# Edit carefully.
#
# Created: Sun Jan 4 17:13:28 2015
#
cpp-program: /lib/cpp -C
!merge-output
dual-output
extract-only !ansi-code
doc-only ansi-code
show-anyway
extract-only !sort
doc-only sort-by-files
wrap-parameters: 0
tab-width: 8
!break-after-types
!first-comments
!prepend-filename
extract-only !yank-comments
doc-only yank-comments
extract-only statics: none
doc-only statics: any
extract-only externs
doc-only !externs
single-comments
define: __CEXTRACT__
doc-only define: __CEXTDOC__
#

+ 1
- 1
00INDENT.BAT View File

@@ -4,7 +4,7 @@ REM Author: Howard Wulf, AF5NE
REM Date: 2015-01-29
REM Uasage: implementation defined
REM Example:
REM CD \sdcard\Download\BASIC\bwbasic-2.62\
REM CD \sdcard\Download\BASIC\bwbasic\
REM 00INDENT.BAT
REM
call 01indent.bat BWBASIC.C


+ 1
- 1
01INDENT.BAT View File

@@ -4,7 +4,7 @@ REM Author: Howard Wulf, AF5NE
REM Date: 2015-01-29
REM Uasage: implementation defined
REM Example:
REM CD \sdcard\Download\BASIC\bwbasic-2.62\
REM CD \sdcard\Download\BASIC\bwbasic\
REM 01INDENT.BAT bwbasic.c
REM
indent.exe %1 -bl -ncdb -nfc1 -nce -ei


bwbtest/00readme.txt → B15A/00readme.txt View File


+ 86
- 0
B15A/00test.sh View File

@@ -0,0 +1,86 @@
# Puropose: Verify existing BWBASIC behavior
# Author: Howard Wulf, AF5NE
# Date: 2014-02-28
# Usage: implementatino defined
# Example:
# cd /sdcard/Download/BASIC/bwbasic3/bwbtest
# ash ./00test.sh
#

rm *.80
rm *.OUT
rm *.LPT
rm *.dif

# ----------------------------------------------
# Regression Tests
# ----------------------------------------------
testcase()
{
TESTCASE=${1}
echo "TESTCASE=${TESTCASE}"
~/bwbasic --tape ${TESTCASE}.INP --profile BW.PRO --profile ${TESTCASE}.PRO ${TESTCASE}.BAS 1> ${TESTCASE}.OUT 2> ${TESTCASE}.LPT
echo "500 DATA ${TESTCASE}.OUT, ${TESTCASE}.80" > PAD80.INP
~/bwbasic --profile BYWATER.PRO PAD80.BAS


diff ${TESTCASE}.run ${TESTCASE}.80 > ${TESTCASE}.dif
if test -s ${TESTCASE}.dif
then
echo less ${TESTCASE}.dif
fi
}

# ---------------------------------------------
echo "OPTION VERSION BYWATER" > BW.PRO


echo "OPTION VERSION BYWATER" > BYWATER.PRO
echo "OPTION LABELS OFF" >> BYWATER.PRO

testcase abs
testcase assign
testcase callfunc
testcase callsub
testcase chain1
testcase chain2
testcase dataread
testcase deffn
testcase dim
testcase doloop
testcase dowhile
testcase elseif
testcase end
testcase err
testcase fncallfn
testcase fornext
testcase function
testcase gosub
testcase gotolabl
testcase ifline
testcase input
testcase lof
testcase loopuntl
testcase main
testcase mlifthen
testcase on
testcase onerr
testcase onerrlbl
testcase ongosub
testcase opentest
testcase option
testcase pascaltr
testcase putget
testcase random
testcase selcase
testcase snglfunc
testcase stop
testcase term
testcase whilwend
testcase width
testcase writeinp
# ----------------------------------------------
# EOF
# ----------------------------------------------

+ 20
- 0
B15A/01test.sh View File

@@ -0,0 +1,20 @@
# Filename: 01test.sh
# Purpose: automted regression review
# Author: Howard Wulf, AF5NE
# Date: 2015-01-29
# Uasage: implementation defined
# Example:
# cd /sdcard/Download/BASIC/bwbasic/NBS2
# ash ./01test.sh
#
#

# review ERRORS
cat *.dif > dif.OUT
if test -s dif.OUT
then
less dif.OUT
fi
# ----------------------------------------------
# EOF
# ----------------------------------------------

SKYTEL/01ok.sh → B15A/02ok.sh View File


+ 17
- 0
B15A/99test.sh View File

@@ -0,0 +1,17 @@
# Puropose: Cleanup after tests have passed
# Author: Howard Wulf, AF5NE
# Date: 2014-03-28
# Usage: implementatino defined
# Example:
# cd /sdcard/Download/BASIC/bwbasic3/BP100
# ash ./99test.sh
#

rm *.80
rm *.OUT
rm *.LPT
rm *.dif

# ----------------------------------------------
# EOF
# ----------------------------------------------

bwbtest/profile.bas → B15A/BW.PRO View File


SKYTEL/profile.bas → B15A/BYWATER.PRO View File


bwbtest/PAD80.BAS → B15A/PAD80.BAS View File


bwbtest/PAD80.INP → B15A/PAD80.INP View File


bwbtest/abs.bas → B15A/abs.bas View File


bwbtest/abs.run → B15A/abs.run View File


bwbtest/assign.bas → B15A/assign.bas View File


bwbtest/assign.run → B15A/assign.run View File


+ 1
- 0
B15A/bwbasic.pro View File

@@ -0,0 +1 @@
OPTION VERSION BYWATER

+ 39
- 0
B15A/callfunc.bas View File

@@ -0,0 +1,39 @@

rem ----------------------------------------------------
rem CallFunc.BAS
rem ----------------------------------------------------

Print "CallFunc.BAS -- Test BASIC User-defined Function Statements"
Print "The next printed line should be from the Function."
Print
testvar = 17

x = TestFnc( 5, "Hello", testvar )

Print
Print "This is back at the main program. "
Print "The value of variable <testvar> is now "; testvar
Print "The returned value from the function is "; x

Print "Did it work?"
End

rem ----------------------------------------------------
rem Subroutine TestFnc
rem ----------------------------------------------------

Function TestFnc( xarg, yarg$, tvar )
Print "This is written from the Function."
Print "The value of variable <xarg> is"; xarg
Print "The value of variable <yarg$> is "; yarg$
Print "The value of variable <tvar> is "; tvar
tvar = 99
Print "The value of variable <tvar> is reset to "; tvar
TestFnc = xarg + tvar
rem
rem The following is considered a recursive call:
rem Print "The Function should return "; TestFnc
rem Instead of using the above, use the following:
Result = xarg + tvar
Print "The Function should return "; Result
End Function

bwbtest/callfunc.run → B15A/callfunc.run View File


bwbtest/callsub.bas → B15A/callsub.bas View File


bwbtest/callsub.run → B15A/callsub.run View File


bwbtest/chain1.bas → B15A/chain1.bas View File


bwbtest/chain1.run → B15A/chain1.run View File


bwbtest/chain2.bas → B15A/chain2.bas View File


bwbtest/chain2.run → B15A/chain2.run View File


bwbtest/data.tmp → B15A/data.tmp View File


bwbtest/dataread.bas → B15A/dataread.bas View File


bwbtest/dataread.run → B15A/dataread.run View File


bwbtest/deffn.bas → B15A/deffn.bas View File


bwbtest/deffn.run → B15A/deffn.run View File


bwbtest/dim.bas → B15A/dim.bas View File


bwbtest/dim.run → B15A/dim.run View File


bwbtest/doloop.bas → B15A/doloop.bas View File


bwbtest/doloop.run → B15A/doloop.run View File


bwbtest/dowhile.bas → B15A/dowhile.bas View File


bwbtest/dowhile.run → B15A/dowhile.run View File


bwbtest/elseif.INP → B15A/elseif.INP View File


bwbtest/elseif.bas → B15A/elseif.bas View File


bwbtest/elseif.run → B15A/elseif.run View File


bwbtest/end.bas → B15A/end.bas View File


bwbtest/end.run → B15A/end.run View File


bwbtest/err.bas → B15A/err.bas View File


+ 5
- 0
B15A/err.run View File

@@ -0,0 +1,5 @@
ERROR in line 20: Subscript out of range
STACK TRACE:
20:print n(7)

bwbtest/fncallfn.bas → B15A/fncallfn.bas View File


bwbtest/fncallfn.run → B15A/fncallfn.run View File


bwbtest/fornext.bas → B15A/fornext.bas View File


bwbtest/fornext.run → B15A/fornext.run View File


+ 3
- 0
B15A/function.INP View File

@@ -0,0 +1,3 @@
c
A
B

bwbtest/function.bas → B15A/function.bas View File


+ 47
- 0
B15A/function.run View File

@@ -0,0 +1,47 @@
ABS(-2.2): 2.2
DATE$: <01/21/2016>
TIME$: <20:51:36>
ATN(-2.2): -1.14417
COS(-2.2): -.588501
LOG(2.2): .788457
SIN(-2.2): -.808496
SQR(2.2): 1.48324
TAN(-2.2): 1.37382
SGN(-2.2): -1
INT(-2.2): -3
Paused? c
RND(-2.2): .396465
CHR$(&h60): `
TAB(52): < >
SPC(5): < >
SPACE$(5): < >
STRING$(5,X): <XXXXX>
MID$(0123456789, 5, 4): <4567>
LEFT$(0123456789, 5): <01234>
RIGHT$(0123456789, 5): <56789>
TIMER: 75096
Paused? A
VAL(X): 0
ERR: 0
ERL: 0
LEN(0123456789): 10
CSNG(-2.2): -2.2
EXP(-2.2): .110803
INSTR(0123456789, 234): 3
STR$(-2.2): <-2.2>
HEX$(27): <1B>
Paused? B
OCT$(27): <33>
CINT(-2.2): -2
ASC(0123456789): 48
ENVIRON$(PATH): <
/data/data/com.pdaxrom.cctools/root/cctools/sbin:/data/data/com.pdaxrom.cctools/
root/cctools/bin:/system/xbin:/system/bin:/data/data/com.pdaxrom.cctools/root/cc
tools/bin:/data/data/com.pdaxrom.cctools/root/cctools/sbin:/sbin:/vendor/bin:/sy
stem/sbin:/system/bin:/system/xbin>
MKD$(17): <>
MKI$(17): < >
MKS$(17): <>
CVD(MKD$(17)): 17
CVS(MKS$(17)): 17
CVI(MKI$(17)): 17

bwbtest/gosub.INP → B15A/gosub.INP View File


bwbtest/gosub.bas → B15A/gosub.bas View File


bwbtest/gosub.run → B15A/gosub.run View File


bwbtest/gotolabl.bas → B15A/gotolabl.bas View File


bwbtest/gotolabl.run → B15A/gotolabl.run View File


bwbtest/ifline.bas → B15A/ifline.bas View File


bwbtest/ifline.run → B15A/ifline.run View File


bwbtest/index.txt → B15A/index.txt View File


bwbtest/input.INP → B15A/input.INP View File


bwbtest/input.bas → B15A/input.bas View File


bwbtest/input.run → B15A/input.run View File


bwbtest/lof.INP → B15A/lof.INP View File


bwbtest/lof.bas → B15A/lof.bas View File


bwbtest/lof.run → B15A/lof.run View File


bwbtest/loopuntl.bas → B15A/loopuntl.bas View File


bwbtest/loopuntl.run → B15A/loopuntl.run View File


bwbtest/main.bas → B15A/main.bas View File


+ 2
- 0
B15A/main.run View File

@@ -0,0 +1,2 @@
This is the MAIN subroutine.
This should print.

bwbtest/mlifthen.bas → B15A/mlifthen.bas View File


bwbtest/mlifthen.run → B15A/mlifthen.run View File


bwbtest/on.INP → B15A/on.INP View File


bwbtest/on.bas → B15A/on.bas View File


bwbtest/on.run → B15A/on.run View File


bwbtest/onerr.bas → B15A/onerr.bas View File


bwbtest/onerr.run → B15A/onerr.run View File


bwbtest/onerrlbl.bas → B15A/onerrlbl.bas View File


bwbtest/onerrlbl.run → B15A/onerrlbl.run View File


bwbtest/ongosub.INP → B15A/ongosub.INP View File


bwbtest/ongosub.bas → B15A/ongosub.bas View File


bwbtest/ongosub.run → B15A/ongosub.run View File


bwbtest/opentest.bas → B15A/opentest.bas View File


bwbtest/opentest.run → B15A/opentest.run View File


bwbtest/option.bas → B15A/option.bas View File


bwbtest/option.run → B15A/option.run View File


bwbtest/pascaltr.bas → B15A/pascaltr.bas View File


bwbtest/pascaltr.run → B15A/pascaltr.run View File


+ 2
- 0
B15A/profile.bas View File

@@ -0,0 +1,2 @@
OPTION VERSION BYWATER
REM OPTION LABELS OFF

bwbtest/putget.INP → B15A/putget.INP View File


bwbtest/putget.bas → B15A/putget.bas View File


bwbtest/putget.run → B15A/putget.run View File


bwbtest/random.bas → B15A/random.bas View File


+ 10
- 0
B15A/random.run View File

@@ -0,0 +1,10 @@
This is a first sequence of three RND numbers:
4.08989E-2
.63474
.63595
This is a second sequence of three RND numbers:
.71534
.317369
.92797
The second sequence should have been differrent
from the first.

bwbtest/selcase.bas → B15A/selcase.bas View File


bwbtest/selcase.run → B15A/selcase.run View File


bwbtest/snglfunc.bas → B15A/snglfunc.bas View File


bwbtest/snglfunc.run → B15A/snglfunc.run View File


bwbtest/stop.bas → B15A/stop.bas View File


bwbtest/stop.run → B15A/stop.run View File


bwbtest/term.INP → B15A/term.INP View File


bwbtest/term.bas → B15A/term.bas View File


Some files were not shown because too many files changed in this diff

Loading…
Cancel
Save