User blog:IAmAPersson/PBAL and PBAL+

Hello! If you've decided to learn and code in PBAL (Pointer-Based Abstract Language), then this is where you'll learn and master the language. PBAL is pronounced as follows: [Pee-Bahll]. There are very few commands (only 20), so you should be able to learn the entire language in about 30 minutes. Using it is the hard part. With a 2D coding plane and self-modifying code, this language will be fun and very frustrating at the same time.

This language was based off of Brainf*ck and Befunge.

First, let's talk about the coding plane. You code in a 92x40 plane of commands. The commands tell the interpreter what to do. One character per command. The language can change directions. This means that the code can be read up, down, left, and right. By default at the start of the program, it is set to go right from (0,0). The language is Turing-complete, meaning that it can do ANY programming task if given unlimited memory, so if you think, "This must be impossible in this language," you are wrong. It may be EXTRAORDINARILY complicated, but it is possible. The plane will loop around, meaning that if your direction is right at (91,y), it will loop to (0,y), and same for the y-axis.

Now, let's talk about memory storage. The memory is stored on a 32,768 (15-bit limit) slot long tape. The tape can hold 16-bit numbers (-32,768 to 32,767). If a slot exceeds this number, it loops around (i. e. 32767+1=-32768). You select what cell to edit by a memory pointer. The memory pointer shows what cell is selected in the tape. By default at the start of the program, it is at 0 with the tape cleared. If the pointer exceeds 32767, it loops to 0, and vice versa.

Commands:

+     Increase cell by 1 -     Decrease cell by 1 >     Set read direction to right <     Set read direction to left ^     Set read direction to up v      Set read direction to down {     Decrement pointer }     Increment pointer "     Toggle string mode (Elaborated at [1]) |      If cell is 0, set read direction to down, otherwise set read direction to up (      Move one from cell to the left to selected cell, then decrement pointer )      Move one from cell to the right to selected cell, then increment pointer number Set that number into current cell (read into memory via the read direction) _      Floor current cell to 0 $      Output current cell as its character value (uses ASCII),      Input number '      Input single character (set into memory via its ASCII) ~      Self-modifies next command to its opposite (Elaborated at [2]) @      Terminate program
 * 1)      Output current cell as a number

[1] In string mode, each character read is set to the memory, increments pointer, then reads next character, etc. (i. e.  translates to  ).

[2] Sets (for the rest of runtime) next command to its opposite. Opposites are listed below: + and - > and < ^ and v } and { ) and ( , and '
 * 1) and $

PBAL+ is an extension for PBAL that is built right in to the editor! PBAL+ [Pee-Bahll-Plus] adds four new commands.

PBAL+ Commands ?     Unspecified pointer--set read direction randomly /     Copies selected cell to pointer+1 \     Copies selected cell to pointer-1 =     If cell is 0, set read direction to left, otherwise set read direction to right

I have provided a link to the download for the interpreter (can do ~2,600,000 commands per second) and some sample files. I hope you enjoy programming in PBAL!

Interpreter for PBAL/PBAL+ (Includes some sample programs): http://www.mediafire.com/download/los4ktk11eqgr0l/PBAL+Interpreter.zip