Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cell signedness examples #24

Merged
merged 7 commits into from
Oct 10, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions eg/README.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -61,11 +61,11 @@ information.
| [pascserp.bf](pascserp.bf) | CC0 | Chris Pressey | 7/12/97 | Generates a gasket (Serpinsky triangle) using Pascal's Triangle.
| [pi.bf](pi.bf) | | Ben Olmstead | 6/25/97 | Produces the first hundred digits of pi in under one hundred characters of Befunge, but cheats in that it simply decompresses the digits encoded in the source code.
| [pi2.bf](pi2.bf) | | Kevin Vigor | 7/2/97 | Generates the first hundred digits of Pi. It does this not by cheating, but actually calculating Pi; unfortunately it far exceeds 100 characters of Befunge code.
| [prime.bf](prime.bf) | | Kalyna Zazelenchuk | 9/5/93 | Lists the counting numbers incrementally from one and checks if each is prime.
| [prime.bf](prime.bf) | | Kalyna Zazelenchuk | 9/5/93 | Lists the integers between 2 and 127 (inclusive), and reports whether each one is prime. Also reports that -128 is not prime.
| [rand.bf](rand.bf) | | Chris Pressey | 9/5/93 | Generates random numbers between 1 and 9 as statistically evenly distributed as the computer's random number generator.
| [rand10.bf](rand10.bf) | | Ken Bateman | 4/12/97 | A 3x10 random number generator.
| [rand11.bf](rand11.bf) | | Ken Bateman | 4/12/97 | A 5x7 flexible random number generator. The number of bits is set with the 88+ at the top left. As shown this program will generate a random number from 0 to 32767.
| [rand12.bf](rand12.bf) | | Ben Olmstead | 4/24/97 | A 2x13, 0..255 random number generator.
| [rand12.bf](rand12.bf) | | Ben Olmstead | 4/24/97 | A 2x13 random number generator that generates numbers from -128 to 127. (On an interpreter with unsigned char cells, such as the one on which this example was originally developed, it will produce values from 0..255.)
| [rand13.bf](rand13.bf) | | Ben Olmstead | 4/24/97 | A 2x12, infinitely looping 0..31 random number generator.
| [rand14.bf](rand14.bf) | | Greg Wright | 5/18/97 | 4x7 random number generator.
| [rand15.bf](rand15.bf) | | Artyom Baranov | 4/5/96 | THE smallest Befunge RNG-16. (16x1)
Expand Down Expand Up @@ -94,5 +94,6 @@ information.
| [switchbx.bf](switchbx.bf) | | Zach Baker | 7/10/97 | A real purty 'switch' statement.
| [testbrdg.bf](testbrdg.bf) | CC0 | Chris Pressey | 10/27/111| Tests whether the \# instruction interacts properly with wrapping.
| [testmodu.bf](testmodu.bf) | CC0 | Chris Pressey | 8/23/111 | Tests how your implementation of Befunge-93 calculates modulus (there is no right way.)
| [testpfcl.bf](testpfcl.bf) | CC0 | Chris Pressey | 10/5/118 | Prints out the largest and smallest values that can be stored in a playfield cell in your implementation of Befunge-93. A very large number of C compilers interpret `char` to mean a signed 8-bit value, so a very common result of running this is "127 -128".
| [toupper.bf](toupper.bf) | CC0 | Chris Pressey | 9/5/93 | Converts letters to upper-case. An example of the \` (greater) statement.
| [wumpus.bf](wumpus.bf) | CC0 | Wim Rijnders | 8/15/97 | The classic game of Hunt the Wumpus!
2 changes: 1 addition & 1 deletion eg/prime.bf
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
222p35*89+*11p>133p >33g1+33p 22g33g- v>22g33g%#v_v
222p882**1+11p>133p >33g1+33p 22g33g- v>22g33g%#v_v
o >|
2 v,,,,, ,,,,,.g22"is prime."<
1 > v^ <
Expand Down
2 changes: 2 additions & 0 deletions eg/testpfcl.bf
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
000p>00g1+01p01g00g`#v_00g.000p>00g1-01p00g01g`#v_00g.@
^p00+1g00 < ^p00-1g00 <