Stackfuck

Stackfuck is a stack-based esoteric language inspired by brainfuck. It is converted to pseudo-code at runtime to speed up the interpreter.

List of instructions
P - Push character onto stack (xxx - Number, xC - Character) T - Set variable to top of stack (xxxxx) V - Push variable value to top of stack (xxxxx) C - Create new buffer S - Select buffer (xxxxx) O - Print current buffer I - Read line and set to buffer G - Goto xxxxx if top is non-zero g - Relative goto N - Goto xxxxx if top is zero n - Relative goto L - Goto label xxxxx if top is non-zero l - Goto label xxxxx if top is zero K - Unconditionally goto label xxxxx X - Exit with signal xxxxx x - Exit with signal s	$ - Create label here xxxxx A - Concatenate buffer with xxxxx a - Put buffer onto stack ? - Copy buffer xxxxx to current ) - Clear stack	( - Pop one from stack ; - Move stack into selected buffer : - Move stack into selected buffer, reversed + - Add s-1 and s	- - Subtract s from s-1 / - Divide s-1 by s	* - Multiply s-1 by s	^ - Xor s-1 with s	| - BOr s-1 with s	& - BAnd s-1 with s	\ - LOr s-1 with s	7 - LAnd s-1 with s	Z - Copy s-xxxxx to the top < - GT s-1 with s	> - LT s-1 with s	. - GE s-1 with s, - LE s-1 with s	= - == s-1 with s	! - != s-1 with s	E - Checks if selected buffer is equal to xxxxx

Standard buffers
These are recommended buffers to use
 * Buffer 0: stdout - Standard buffer for copying to, then printing out
 * Buffer 1: stdin - Standard buffer for reading user input
 * Buffer 2: stdcheck - Standard buffer for checking user input

Examples
This is the hello world application

CS00000PxHPxePxlPxlPxoPx PxwPxoPxrPxlPxdPx!P010;O

Here is a program with input CCCS00000
 * 1) Buffer 0 - Output
 * 2) Buffer 1 - Input
 * 3) Buffer 2 - Check

$00000 PxCPxhPxoPxoPxsPxePx PxaPxnPx PxoPxpPxtPxiPxoPxnPx:P010P010 Px1Px.Px PxEPxxPxaPxmPxpPxlPxeP010 Px2Px.Px PxEPxxPxiPxtP010P010Px>Px ;O
 * 1) Select an option:
 * 2) 1. Example
 * 3) 2. Exit
 * 1) 2. Exit

S00001I
 * 1) Select input buffer

S00000P010;O
 * 1) Add line

S00002
 * 1) Select check buffer

)Px1;E00001l00001 PxHPxePxlPxlPxoPx,Px PxwPxoPxrPxlPxdPx!P010P010;O K00000 $00001
 * 1

)Px2;E00001l00000 X00000
 * 2

Here is a more advanced one that takes the name and age, then summarises it CCCCCC
 * 1) buffer 0 - stdout
 * 2) buffer 1 - stdin
 * 3) buffer 2 - stdcheck
 * 4) buffer 3 - name
 * 5) buffer 4 - age
 * 6) buffer 5 - tempoary buffer

$00000

S00000

PxCPxhPxoPxoPxsPxePx PxaPxnPx PxoPxpPxtPxiPxoPxnPx:P010P010;O
 * 1) Choose an option:

Px1Px.Px PxTPxePxlPxlPx PxnPxaPxmPxeP010 Px2Px.Px PxTPxePxlPxlPx PxaPxgPxeP010 Px3Px.Px PxSPxuPxmPxmPxaPxrPxyP010 Px4Px.Px PxEPxxPxiPxtP010P010 Px>Px
 * O

S00001IS00000P010;O
 * 1) Read input

S00002

)Px1;E00001l00001 S00000 PxNPxaPxmPxePx:Px ;O S00003I O
 * 1) Name

K00000

$00001

)Px2;E00001l00002 S00000 PxAPxgPxePx:Px ;O S00004I
 * 1) Age

K00000

$00002

)Px3;E00001l00003 S00000} PxNPxaPxmPxePx:Px a00003P010 PxAPxgPxePx:Px a00004P010P010B
 * 1) Summary
 * O

K00000

$00003

)Px4;E0000l00004 X00000
 * 1) Exit

$00004

External resources
Stackfuck interpreter (source code)