Befunge-93 compatability tool
(compat.bf, 570 bytes)
This program will perform the following simple tests on your interpreter:
- Get/put address wrapping
This will test whether addresses being fed to get/put are wrapped to lie within befunge space, or if out-of-bounds get's
return a fixed value (such as space) and if puts are ignored. Note that only get is tested; put results are inferred.
Although the specs don't make it all too clear, befunge-93 interpreters should return space for OOB get's and ignore OOB
put's. fbbi 0.98 passes this test.
- Cell size and signedness
This tests if cells are unsigned 8 bit, signed 8 bit, or some value larger than 8 bit. Befunge-93 should be unsigned 8 bit
(Which fbbi 0.98 fails, but befunge-93 compliance wasn't actually listed as a feature).
- Edge jump compliance
This is a bit of a thorny issue. As far as I know 'edge jumps' (i.e. a # right at the edge of befunge space) in befunge-93
should skip the next instruction (i.e. the first one on the other side of space), but with funge-98 it might be a bit
different. Strangely enough, fbbi 0.98 goes into an infinite loop when this test is tried, whether in 93 mode or not.
- Negative remainders
This performs a test on the division code to see if negative remainders are allowed (Which they should be).
- @ in stringmode
This tests whether an @ in a string will cause your interpreter to exit. AFAIK this was a bug in some interpreters,
although I've never seen it happen myself. If your interpreter falls foul of this, then you won't see a message at all -
it'll just exit.
This program has been largely superceded by the Fungus test suite.