Merge pull request #510 from pcholt/main

Add @jkboyce 's bug discoveries to the super star trek readme
This commit is contained in:
Jeff Atwood
2022-01-15 20:39:44 -08:00
committed by GitHub
5 changed files with 14 additions and 4 deletions

5
.gitignore vendored
View File

@@ -2,9 +2,8 @@
.vscode/
.gradle/
node_modules/
buildJvm/
build.gradle
buildJvm/bin
buildJvm/*/build/
.classpath
.project

View File

@@ -1,7 +1,7 @@
import java.util.Arrays;
import java.util.Scanner;
public class main {
public class Name {
public static void printempty() { System.out.println(" "); }

View File

@@ -88,6 +88,17 @@ The relation between the Historical and Standard nomenclatures is shown in the s
15. This version of Star Trek was created for a Data General Nova 800 system with 32K or core. So that it would fit, the instructions are separated from the main program via a CHAIN. For conversion to DEC BASIC-PLUS, Statement 160 (Randomize) should be moved after the return from the chained instructions, say to Statement 245. For Altair BASIC, Randomize and the chain instructions should be eliminated.
---
#### Bugs
Many of the programs in this book and this collection have bugs in the original code.
@jkboyce has done a great job of discovering and fixing a number of bugs in the [original code](superstartrek.bas), as part of his [python implementation](python/superstartrek.py), which should be noted by other implementers:
- line `4410` : `D(7)` should be `D(6)`
- lines `8310`,`8330`,`8430`,`8450` : Division by zero is possible
- line `440` : `B9` should be initialised to 0, not 2
---
As published in Basic Computer Games (1978):