About

Archives

01 Jul - 31 Jul 2006
01 Aug - 31 Aug 2006
01 Sep - 30 Sep 2006
01 Oct - 31 Oct 2006
01 Nov - 30 Nov 2006
01 Dec - 31 Dec 2006
01 Jan - 31 Jan 2007
01 Feb - 28 Feb 2007
01 Mar - 31 Mar 2007
01 Apr - 30 Apr 2007
01 May - 31 May 2007
01 Jun - 30 Jun 2007
01 Jul - 31 Jul 2007
01 Aug - 31 Aug 2007
01 Oct - 31 Oct 2007
01 Nov - 30 Nov 2007
01 Dec - 31 Dec 2007
01 Jan - 31 Jan 2008
01 Feb - 28 Feb 2008
01 Mar - 31 Mar 2008
01 Aug - 31 Aug 2009
01 Sep - 30 Sep 2009
01 Jan - 31 Jan 2010
01 May - 31 May 2010
01 Jun - 30 Jun 2010
01 Aug - 31 Aug 2010
01 Sep - 30 Sep 2010

Links

Search!

Last Comments

Alvaro Oliver (StackBook Part 4 …): Hey! nice post. I just bo…
Tiago Gomes (Let's start again…): ok, now feel happy, you a…
Tiago Gomes (Let's start again…): ok, now feel happy, you a…
ir0nhide (StackBook Part 4.…): Very cool, nice work
Toby (Gigabyte, LCDs, a…): Good stuff, although now …
luke (StackBook part 3 …): what are you planing to u…
Toby (A quick rant...): Bastards
Hugh (StackBook Part 2 …): Nicely done, but you now …
gm (StackBook Part 2 …): Hmm, I plan to go a littl…
luke (StackBook Part 2 …): i cant help but wonder if…

Stuff

Powered by Pivot - 1.40.4: 'Dreadwind' 
XML: RSS Feed 
XML: Atom Feed 

« BrainF**k+++ reasons … | Home | SSD install in MacBoo… »

BF+++ code release and spec.

12 05 10 - 22:33 It's up in SVN now: bfint.py

Known bugs:
Only one TCP socket can be open, and they are all treated the same
Parsing will return uncaught errors if invalid code is used
Memory space is still fixed...
File handles are not implemented well yet
... and many others.

I'll post example code soon with comments.




This file is accessible as spec.rtf.
-------------------------------

+ add to current cell
+(n) add n to current cell
+(*n) add value of cell n
+(&n) add value of cell relative n
+(s) add value of cell named s

- subtract from current cell
-(n) subtract n from current cell
-(*n) subtract value of cell n
-(&n) subtract value of cell relative n
-(s) subtract value of cell named s

< go left one cell
<(n) go left n cells
<(*n) go left value of cell n
<(s) go left value of cell named s

> go right one cell
>(n) go right n cells
>(*n) go right value of cell n
>(s) go right value of cell named s


^ go to cell of current address
^(n) go to cell n
^(*n) go to value of cell n
^(s) go to cell named s

v(*n) copy current mem address into cell
v(s) name current cell

c set current cell to 0
c(n) set current cell to n
c(*n) set cell n to 0
c(s) write string to cell (not cell name!)

[ jump past ] if the value under the current cell is 0
] jump back to ] if the current cell value is nonzero

. output current cell under pointer
.(*n) output current cell to file handle in cell n
! output current cell as number
!(n) output current cell as number
, read in current cell to pointer
,(*n) read in from file handle in cell n


'(*n) open file handle at string starting at s
"(*n) open file handle to hostname and port in string at n

{ define procedure numbered with current cell value
} return to program

: jump to procedure numbered in current cell
:(s) jump to procedure numbered in named cell

j jump to pointer in current cell
j(n) jump n instructions

@ exit with current cell as exit value
No comments

Trackback link: http://gm.stackunderflow.com/blog/pivot/tb.php?tb_id=149

  
Remember personal info?

Emoticons / Textile

To prevent automated comment spam, the answer to this rather simple question is required...

 

  (Register your username / Log in)

Notify:
Hide email:

Small print: All html tags except <b> and <i> will be removed from your comment. You can make links by just typing the url or mail-address.

 

Linkdump