You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+19-7Lines changed: 19 additions & 7 deletions
Original file line number
Diff line number
Diff line change
@@ -2,17 +2,15 @@
2
2
3
3
Modern implementation of the original Dartmouth BASIC compilers from the 1960s in the D programming language.
4
4
5
-
This software is currently under a state of rapid development and should therefore be considered alpha quaality.
6
-
7
-
**Important Note**: The original version targeting 32-bit ARM is being moved to a separate branch (target-arm32), and it is unlikely much further work will be done. The focus of development is currently to support an LLVM target which will ultimately allow for compilation to native code (instead of ARM assembly language), as well as use of the LLVM optimizer.
5
+
**Important Note**: This original version targeting 32-bit ARM is now in a separate branch (target-arm32), and it is unlikely much further work will be done. The focus of development for the main branch is currently to support an LLVM target which will ultimately allow for compilation to native code (instead of ARM assembly language), as well as use of the LLVM optimizer.
8
6
9
7
## Building
10
8
11
9
### Windows
12
10
13
11
**Prerequisites:**
14
12
15
-
* Bison parser generator `win_bison.exe` from https://github.com/lexxmark/winflexbison (to compile `grammar.y`). Note that a patch to the D skeleton file `d.m4` is currently required (see below); if running or patching WinFlexBison is not possible simply copy `Parser.d` out of the `autogen` directory.
13
+
* Bison parser generator `win_bison.exe` from https://github.com/lexxmark/winflexbison (to compile `grammar.y`). Note that a patch to the D skeleton file `d.m4` is currently required (see below); if running or patching WinFlexBison is not possible simply copy `Parser.d` out of the `autogen` directory and remember to time-stamp it.
16
14
17
15
* Recent D compiler `dmd.exe`, tested with Digital Mars D (DMD) v2.098.1 from https://dlang.org/download.html#dmd
18
16
@@ -38,7 +36,7 @@ This software is currently under a state of rapid development and should therefo
38
36
39
37
**Prerequisites:**
40
38
41
-
* Recent `bison` (ideally trunk from https://github.com/akimd/bison), versions available with a "testing" or rolling release distro (3.8.2.x or above) may work. Note that a patch to the D skeleton file `/usr/share/bison/skeletons/d.m4` is currently required (see below); if running or patching `bison` is not possible simply copy `Parser.d` out of the `autogen` directory.
39
+
* Recent `bison` (ideally trunk from https://github.com/akimd/bison), versions available with a "testing" or rolling release distro (3.8.2 or above) may work. Note that a patch to the D skeleton file `/usr/share/bison/skeletons/d.m4` is currently required (see below); if running or patching `bison` is not possible simply copy `Parser.d` out of the `autogen` directory and `touch` it.
42
40
43
41
* Recent D compiler, tested with both GNU `gdc` and LLVM `ldc`
44
42
@@ -90,7 +88,7 @@ The file `data\skeletons\d.m4` (WinFlexBison) or `/usr/share/bison/skeletons/d.m
90
88
91
89
### Windows
92
90
93
-
The executable `dbasic.exe` reads from standard input and writes to standard output, optionally with the required numerical Language Edition (only 1-3 currently supported).
91
+
The executable `dbasic.exe` reads from standard input and writes to standard output, optionally with the required numerical Language Edition (only 1-4 currently supported).
94
92
95
93
The following command will compile the first example program `example-p12.bas` from the `examples` directory with First Edition compatibility, outputting the result to `test.s`:
96
94
@@ -115,7 +113,7 @@ gcc -o test test.s basic_lib.s -lm
115
113
./test
116
114
```
117
115
118
-
### Linux (Debian/Ubuntu)
116
+
### Linux (Debian/Ubuntu etc.)
119
117
120
118
To compile the assembly language output and support library, the ARM cross-compiler toolchain is required, including `arm-linux-gnueabihf-gcc`, from issuing `apt install gcc-arm-linux-gnueabihf libc-dev-armhf-cross`
121
119
@@ -140,6 +138,12 @@ arm-linux-gnueabihf-gcc -o test test.s basic_lib.s -lm
Alternatively use the executable shell script `run-linux.sh` to create and execute `a.out` with`qemu-arm`, eg:
142
+
143
+
```
144
+
./runtime/run-linux.sh examples/example-p12.bas
145
+
```
146
+
143
147
### Linux (Arch-based)
144
148
145
149
To compile the assembly language output and support library, the ARM cross-compiler toolchain is required, including `arm-none-linux-gnueabihf-gcc`, from AUR package `arm-none-linux-gnueabihf-toolchain-bin`
@@ -165,6 +169,12 @@ arm-none-linux-gnueabihf-gcc -o test test.s basic_lib.s -lm
Alternatively use the executable shell script `run-arch.sh` to create and execute `a.out` with`qemu-arm`, eg:
173
+
174
+
```
175
+
./runtime/run-arch.sh examples/example-p12.bas
176
+
```
177
+
168
178
## Resources
169
179
170
180
Manual for the original 1964 Dartmouth BASIC: https://cs.bris.ac.uk/~dave/basic.pdf
@@ -193,6 +203,8 @@ Ultimately support for all of the early Dartmouth BASICs (First thru Sixth) is e
193
203
194
204
* 2023/07/01: Tag 0.40.3 (bug fixes and code improvements) Basic The Fourth update
195
205
206
+
* 2023/07/09: Tag 0.45.0 (bug fixes and code improvements) Basic The Fourth update **likely to be the final ARM release**
207
+
196
208
## Bugs
197
209
198
210
Please do report bugs, together with correct or incorrect BASIC input files. I would recommend testing against the latest release or master branch, even if an earlier BASIC Edition is being used, as bugs will have been fixed while new features are being added.
0 commit comments