PJSF Documentation

Not done, or not working right

A.K.A. "Issues"

Well, that about covers what it can't do. I'm pretty sure that I've eradicated all bugs from the main Funge area and only have the fingerprint stuff left.

The output is in HTML format, so it you send a "<", then it will be expecting a tag.

Character #10 will send a <br>, effectively sending a line feed/carriage return. I'm not sure if I will make it print stuff the right way or not, this way it is possible to do Funge web pages... or use a Funge program as a CGI type thing... hmmm the possibilities!

How to Use the Interpreter

There are two main frames. The source frame and then output frame. The output frame just displays the output from the program and debugging output if requested. The rest of this section is about the source frame.


These are the main buttons. I think they are pretty self-explanatory. Run Funge executes the program in the Funge Code text area. Reset Code just reloads the source frame. Clear Output reloads the output frame. Reset All reloads both frames.

Debugging Mode

Prompt every instructions

After that many instructions, you will be prompted to continue. This is to prevent infinite loops. Checking the box to the left will activate this feature.

Debug Mode

Check this if you want any kind of debugging stuff. With this on, the prompt every... will work, and after every instruction the top ten elements of the stack will be printed (as their integer value), and you will be prompted with helpful bit of information about the position, direction and stuff. If you hit the cancel button on this prompt the program will terminate.

Start/End debugging at x= , y=

When the program reaches (x,y), you will be asked if you want to start/end debugging. It simply toggles the Debug Mode if you hit OK. If you hit cancel, the program will continue the execute. Every time the program hits (x,y) it will ask.

FungeCode:

Your Funge code is typed here. I'm still looking for a way to force the font to be what is it called... non-proportional? So that i takes up as much space as m.

Fingerprint Code:

This is optional. Fingerprint code goes here. If you make a fingerprint, e-mail it to me. I plan to make some predefined fingerprints so that the common ones don't have to be retyped all the time.

Non-Standard Implementation

Of course, o is not normal, nor will ( or ) be due to the fact that JavaScript does not do files. ( and ) will works by having a second text area to type in, the mini-Funge source of one fingerprint (or combination) goes there. The use would then change probably so that you would not need the en..e1 n (ex."FRTH"4) since only one fingerprint can be specified. If you have suggestions, e-mail me.

Some of the y parts can't work right, mostly the system information 19 and 20.

There is the HTML issue, but I'm leaving that as it is for now.

Instructions:

! (n -- !n) Logical Negate 
" Toggle string mode 
# Skip next cell 
$ (n -- ) Drop top stack entry 
% (n1 n2 -- n1%n2) Modulo 
& ( -- n) Read number from pop up box 
' ( -- c) Push next cell onto stack 

(n1 n2 -- n1*n2) Multiplication 
+ (n1 n2 -- n1+n2) Addition 
, (n -- ) Print tos as a character 
- (n1 n2 -- n1-n2) Subtraction 
. (n -- ) Print tos as a number 
/ (n1 n2 -- n1/n2) Division 
0 ( -- 0) Push 0 onto stack 
1 ( -- 1) Push 1 onto stack 
2 ( -- 2) Push 2 onto stack 
3 ( -- 3) Push 3 onto stack 
4 ( -- 4) Push 4 onto stack 
5 ( -- 5) Push 5 onto stack 
6 ( -- 6) Push 6 onto stack 
7 ( -- 7) Push 7 onto stack 
8 ( -- 8) Push 8 onto stack 
9 ( -- 9) Push 9 onto stack 
: (n -- n n) Duplicate tos 
; Skip to next ; 
< Set ip delta to -1,0,0 
= (0gnirts -- n) Execute gnirts as Javascript 
> Set ip delta to 1,0,0 
? Set ip delta to random direction 
@ Terminate thread 
A-Z Overloadable functions (fingerprints)
[ Turn ip delta to the left 
\ (n1 n2 -- n2 n1) Swap top two stack elements 
] Turn ip delta to the right 
^ Set ip delta to 0,-1,0 
_ (n -- ) does > if tos is zero, else < 
` (a b -- n) Pushes 1 if a>b else pushes 0 
a ( -- 10) Push 10 onto stack 
b ( -- 11) Push 11 onto stack 
c ( -- 12) Push 12 onto stack 
d ( -- 13) Push 13 onto stack 
e ( -- 14) Push 14 onto stack 
f ( -- 15) Push 15 onto stack 
g (v -- n) Get value stored in funge cell 

j (n -- ) jumps ip delta * tos 
k (n -- ) Execute command in next cell n times 

n Clears stack 
o (vs vo 0gnirts -- ) Write funge space to file (changed!)
p (n v -- ) Put value into funge cell 
q (n -- ) Immedietly quit program, tos is return code 
r Reflect the delta 
s (n -- ) Take tos and store into next cell 

u Transfer entries between soss and toss 
v Set ip delta to 0,1,0 
w (a b -- ) do ] if a>b, else ]
x (x y z -- ) Set ip delta from stack
y (n --) Get System information (changed)
z nop
{ (n -- )  Begin Block
| (n -- ) does v if tos is zero, else ^
} (n -- ) End Block
~ ( -- c) Input character from pop up box

Back Home | Documentation | Examples | PJSF Interpreter