Home RISC OS
News News
Befunge Befunge
Doom Doom
Inform Inform
Quake Quake
RISC OS RISC OS
   - BeagleBoard
   - Code
   - Games
   - Utilities
   - Miscellaneous

Misc Misc
Links Links
Contact Contact

1K Befunge interpreter for RISC OS

V1.05 (28/06/2003): bef1k.zip (7,661 bytes). Suitable for RISC OS 3 and above.

This is my 26/32bit neutral Befunge-93 interpreter for RISC OS, written in under 1K of assembler. Usage:

Befunge1K <file>

Source code (in BASIC) is included. There are several configuration options at the top of the source, to enable you to control some of the finer points of the interpreter:

singlestep0 (default): Disable the single-stepping debugger
1: Enable the single-stepping debugger (Takes 28 instructions
dump0: Don't dump fungespace on exit
1 (default): Dump the contents of fungespace to the screen on exit (Takes 18 instructions)
wordspace0 (default): Fungespace is made of unsigned 8 bit cells
1: Fungespace is made of signed 32bit cells
roundcoord0 (default): Attempting to put to a cell outside fungespace will do nothing; get will return character 32.
1: Attempting to put or get cells outside fungespace will cause the address to wrap around back into fungespace. (Takes 10 instructions)
lf_makes_cr0: The , instruction will output LF's normally
1 (default): The , instruction will output a CR before every LF (Needed in most command-line situations in RISC OS). (Takes 2 instructions)
ignore_cr0: The , instruction will output CR's normally
1 (default): The , instruction will do nothing when it attempts to output a CR (Takes 1 instruction)
enter_is_lf0: The Enter key will return a CF character
1 (default): The Enter key will return an LF character, as-per-spec (Takes 2 instructions)
echo_input0: Characters input will not be echoed to the screen
1 (default): Characters input will be echoed to the screen as they are read by the program (Takes 6 instructions)



Page last modified 03/03/2005