Befunge-93 interpreter

Posted By: txesmi

Befunge-93 interpreter - 05/07/18 14:31

Hi!
I have been working on a Befunge-93 interpreter in liteC: The absurd in its maximum power.



DOWNLOAD (Source and examples)

Enjoy!
Posted By: Kartoffel

Re: Befunge-93 interpreter - 05/07/18 15:13

I have no idea what's going on but it looks cool.

Probably took a good amount of effort, so good job smile
Posted By: txesmi

Re: Befunge-93 interpreter - 05/08/18 08:30

Thank you! It tooks me most of my spare time of the last weeks, true.

As background, Funge family of programming languages was born to be more complex than necessary. In other words: functional but impractical, like Brainkfuck or Whitespace.

Befunge states a toroid shaped execution space where the instruction pointer can only be moved to one of its neighbors in a direction defined on the run. So it can not jump to an arbitrary position on the program as most of programming laguages do, f.e, when calling a function. It has some special instructions to modify the program's execution direction, so the same instruction may be executed in any of the four available directions. Each cell into the execution space is a signed integer and can only be initially filled with ascii characters (from 32 to 126 inclusive), some of them been the actual instruction set.

As the second complexity layer, the memory is available in two forms only: a FILO type stack memory and the execution space itself. Instructions only work with the stack but the two instructions that serve as intercharger between both memory types.

The I/O interface is a console and manages integers and single characters only.

That's briefly all. Just a toy for masochists. I thought it has a certain parallelism with a behavior of a strategy game, but it gets too complex for people not initiated into programming. I have some ideas around anyway.

Salud!
Posted By: Kartoffel

Re: Befunge-93 interpreter - 05/08/18 12:57

Interesting, tanks for the explanation.

I know Brainfuck but I had never heard of Befunge/Funge before.
Posted By: FBL

Re: Befunge-93 interpreter - 08/08/18 06:25

I know I'm being nitpicky now... but it's "subtract"
Interesting project nonetheless.
Posted By: txesmi

Re: Befunge-93 interpreter - 08/08/18 08:18

Thank you, it has been fixed. I have to admit that this thing I use to write can hardly be called english and I do not put a penny to remedy it laugh
© 2024 lite-C Forums