- Brainf*^!
- 23 Apr 2015 06:41:59 pm
- Last edited by M. I. Wright on 19 May 2015 08:45:07 pm; edited 6 times in total
Download 1
Download 2
Download 3 (most recent)
(sort of still under development, so I'd rather not submit it to the archives just yet.)
Brainf*^!
A brainf*** interpreter in pure TI-BASIC! The interpreter's named after the three commands I added in (they don't affect normal program flow, but could be used to do fun stuff):
^ - shifts everything right of the pointer one cell to the left, removing the tape cell at the pointer
* - makes pointer jump to cell # of the value in the current cell
! - prints both the tape and the pointer's current value.
Some notes:
- The idea of * making the pointer jump comes from this post on the XKCD forums. However, unlike him, I'm not entirely convinced that * can replace < and >, so I left those in.
- As this is in TI-Basic, where there's no concept of ASCII, it only allows you to enter numbers for input (and anything that returns a number works, even decimals, negatives and expressions). As such, any usage 48 +'s or 48 -'s to convert numbers to/from ASCII should be removed from programs.
- Does not allow programs longer than 999 bytes. I'll upload a (slower, unfortunately) version of the program tomorrow that'll be able to handle longer inputs.
- Doesn't use Celtic/hybrid libs; you have to input the string manually.
- Could still be optimized. A lot.
Download 2
Download 3 (most recent)
(sort of still under development, so I'd rather not submit it to the archives just yet.)
Brainf*^!
A brainf*** interpreter in pure TI-BASIC! The interpreter's named after the three commands I added in (they don't affect normal program flow, but could be used to do fun stuff):
^ - shifts everything right of the pointer one cell to the left, removing the tape cell at the pointer
* - makes pointer jump to cell # of the value in the current cell
! - prints both the tape and the pointer's current value.
Some notes:
- The idea of * making the pointer jump comes from this post on the XKCD forums. However, unlike him, I'm not entirely convinced that * can replace < and >, so I left those in.
- As this is in TI-Basic, where there's no concept of ASCII, it only allows you to enter numbers for input (and anything that returns a number works, even decimals, negatives and expressions). As such, any usage 48 +'s or 48 -'s to convert numbers to/from ASCII should be removed from programs.
- Does not allow programs longer than 999 bytes. I'll upload a (slower, unfortunately) version of the program tomorrow that'll be able to handle longer inputs.
- Doesn't use Celtic/hybrid libs; you have to input the string manually.
- Could still be optimized. A lot.