Skip to content

Commit a6ac228

Browse files
committed
Cleaning up before release
1 parent 9405a7d commit a6ac228

File tree

6 files changed

+82799
-7
lines changed

6 files changed

+82799
-7
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,4 @@ wip/
44
/How to Improve FBF.txt
55
/~$benchmarks.xlsx
66
/~$opcodes.xlsx
7+
/TODO.txt

archive/MultiThreadDemo.bf

Lines changed: 82740 additions & 0 deletions
Large diffs are not rendered by default.

archive/MultiThreadDemo.java

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
/**
2+
*
3+
*/
4+
import java.util.Random;
5+
6+
/**
7+
* Shows an example of multi-threading.
8+
*
9+
* @author Massimiliano "Maxi" Zattera
10+
*
11+
*/
12+
public class MultiThreadDemo extends Thread {
13+
14+
private final static Random rnd = new Random(666);
15+
16+
private final String name;
17+
18+
// must do this as strings are not garbage collected and wil cause out of memory
19+
private final String sleepMsg;
20+
private final String wakeUpMsg;
21+
22+
private MultiThreadDemo(String name) {
23+
this.name = name;
24+
sleepMsg = name + " is going to sleep...";
25+
wakeUpMsg = name + " wakes up and says hello! :-)";
26+
System.out.println(name + " created.");
27+
}
28+
29+
@Override
30+
public void run() {
31+
while (true) {
32+
int sleepTime = rnd.nextInt(3) + 1;
33+
System.out.println(sleepMsg);
34+
try {
35+
Thread.sleep(sleepTime*1000);
36+
} catch (InterruptedException e) {
37+
break;
38+
}
39+
System.out.println(wakeUpMsg);
40+
}
41+
}
42+
43+
public static void main(String[] args) throws Exception {
44+
String[] names = {"Inky", "Blinky", "Pinky", "Clyde"};
45+
MultiThreadDemo[] t = new MultiThreadDemo[names.length];
46+
47+
for (int i = 0; i < names.length; ++i) {
48+
t[i] = new MultiThreadDemo(names[i]);
49+
}
50+
for (int i = 0; i < t.length; ++i) {
51+
t[i].start();
52+
}
53+
while (true) {}
54+
}
55+
}

cc65/README.md

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,2 @@
11
This folder contains files used for integration with cc65 cross-compiler
2-
(new target definition, libraries, etc.).
3-
4-
Use `bin\FB_build_lib.bat` to re-build the library file.
5-
As a starting point for the new library file `none.lib` from
6-
cc65 installation will be used.
2+
(new target definition, libraries, etc.).

test/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
This folder contains a set of tests, also used for regression tests at each release.
1+
This folder contains a set of examples/tests, also used as regression tests at each release.
22

33
Each different source file type is kept in a separate folder, to avoid confusion between
44
original (that is test written by developers) and files generated during compilation process

test/ca65/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ edited to build correctly using cc65's assembler and linker for Windows.
33

44
These are funtional tests to ensure the 6502bf emulator is working properly.
55

6-
`bin\FB_build_6502test.bat` can be used to (re)build the tests.
6+
`bin\FB_build_6502test.bat` can be used to (re)build and execute the tests.

0 commit comments

Comments
 (0)