Author Topic: Enhanced BF  (Read 8468 times)

0 Members and 1 Guest are viewing this topic.

Offline Scipi

  • Omni Kitten Meow~ =^ω^=
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1547
  • Rating: +192/-3
  • Meow :3
    • View Profile
    • ScipiSoftware
Re: Enhanced BF
« Reply #15 on: September 19, 2012, 11:25:48 pm »
Ok, so after nearly a year, I actually have something to show for this (Holy crap!)

Introducing Mindf*ck:

A dialect of BF that on top of the original BF command set and principles, adds functionality for using addresses, splitting threads, moving throughout the code (read: subroutines), and the ability to insert values in the code itself easier.

The command list is as follows:
//////////////////////
//BrainF*ck Commands
//////////////////////
>   Shift right
<   Shift left
+   Inc
-   Dec
[   Start while if nonzero
]   End while - break if zero (Jump to address if nonzero)
.   Get char
,   read char
/////////////////////
//MindF*ck Commands
/////////////////////
#   Get Int
$   Read Int
(   Store address
)   Pop address
{   Copy value to address
}   Retrieve value at address
""   Insert string - overwrites its length
::   Insert binary num   
^   Jump to address
|   Split thread at code address
!   Ends process

The main difference is the addition of a stack used for addresses as well as storing values. Think like what Z80 has. You are also able to move around the code itself to execute sections of code.

"<string>" allows for strings of chars to be inserted into the value array, it will overwrite its length in chars.
:<Number>: this will insert an int expressed in binary at this point in the value array

Another difference is that instead of chars, the array is composed of ints. I did this in order to support jumps using values in the value array.

Things to do:

Fix the split thread command. Weird stuff is happening and I'm not sure why.

More bug testing

Source:

https://sourceforge.net/projects/mindfck/

Edit: I forgot to mention, I still need to write up the full documentation for how each command works and what exactly they read from/effect. Some of the address commands either affect the value array iterator or code iterator, for instance.
« Last Edit: September 19, 2012, 11:37:56 pm by HOMER-16 »

Imma Cat! =^_^= :3 (It's an emoticon now!)
Spoiler For Things I find interesting:
Spoiler For AI Programming:
Spoiler For Shameless advertising:

Spoiler For OldSig:





Spoiler For IMPORTANT NEWS!:
Late last night, Quebec was invaded by a group calling themselves, "Omnimaga". Not much is known about these mysterious people except that they all carried calculators of some kind and they all seemed to converge on one house in particular. Experts estimate that the combined power of their fabled calculators is greater than all the worlds super computers put together. The group seems to be holding out in the home of a certain DJ_O, who the Omnimagians claim to be their founder. Such power has put the world at a standstill with everyone waiting to see what the Omnimagians will do...

Wait... This just in, the Omnimagians have sent the UN a list of demands that must be met or else the world will be "submitted to the wrath of Netham45's Lobster Army". Such demands include >9001 crates of peanuts, sacrificial blue lobsters, and a wide assortment of cherry flavored items. With such computing power stored in the hands of such people, we can only hope these demands are met.

In the wake of these events, we can only ask, Why? Why do these people make these demands, what caused them to gather, and what are their future plans...