1. Cat's Eye Technologies
  2. Funge-98

Commits

catseye  committed 884a4cf

Convert fingerprint library to Markdown.

  • Participants
  • Parent commits 6fe69aa
  • Branches default
  • Tags rel_1_0_2013_0224

Comments (0)

Files changed (20)

File library/HRTI.html

  • Ignore whitespace
-<html>
-<head>
-<title>Funge-98 Documentation: HRTI fingerprint</title>
-</head>
-<body bgcolor="#FFFFC0">
-<center><h1>High-Resolution Timer Interface</h1>
-<h3>Fingerprint 0x48525449 ('HRTI')</h3>
-</center>
-
-<p>Under development.
-
-<p>The HRTI fingerprint allows a Funge program to
-measure elapsed time much more finely than the
-clock values returned by <tt>y</tt>.
-
-<p>After successfully loading HRTI, the instructions
-<tt>E</tt>, <tt>G</tt>, <tt>M</tt>, <tt>S</tt>, and <tt>T</tt>
-take on new semantics.
-
-<p><tt>G</tt> 'Granularity' pushes the smallest clock
-tick the underlying system can reliably handle, measured
-in microseconds.
-
-<p><tt>M</tt> 'Mark' designates the timer as having
-been read by the IP with this ID at this instance in time.
-
-<p><tt>T</tt> 'Timer' pushes the number of microseconds
-elapsed since the last time an IP with this ID marked the
-timer.  If there is no previous mark, acts like <tt>r</tt>.
-
-<p><tt>E</tt> 'Erase mark' erases the last timer mark by this IP
-(such that <tt>T</tt> above will act like <tt>r</tt>)
-
-<p><tt>S</tt> 'Second' pushes the number of microseconds
-elapsed since the last whole second.
-
-<p>The timer and mark-list are considered global and static,
-shared amongst all IP's, in order to retain tame behaviour.
-
-<p>This timer is not affected by 'time travel' contrivances.
-
-</body>
-</html>

File library/HRTI.markdown

View file
  • Ignore whitespace
+High-Resolution Timer Interface
+===============================
+
+### Fingerprint 0x48525449 ('HRTI')
+
+Under development.
+
+The HRTI fingerprint allows a Funge program to measure elapsed time much
+more finely than the clock values returned by `y`.
+
+After successfully loading HRTI, the instructions `E`, `G`, `M`, `S`,
+and `T` take on new semantics.
+
+`G` 'Granularity' pushes the smallest clock tick the underlying system
+can reliably handle, measured in microseconds.
+
+`M` 'Mark' designates the timer as having been read by the IP with this
+ID at this instance in time.
+
+`T` 'Timer' pushes the number of microseconds elapsed since the last
+time an IP with this ID marked the timer. If there is no previous mark,
+acts like `r`.
+
+`E` 'Erase mark' erases the last timer mark by this IP (such that `T`
+above will act like `r`)
+
+`S` 'Second' pushes the number of microseconds elapsed since the last
+whole second.
+
+The timer and mark-list are considered global and static, shared amongst
+all IP's, in order to retain tame behaviour.
+
+This timer is not affected by 'time travel' contrivances.

File library/MODE.html

  • Ignore whitespace
-<html>
-<head>
-<title>Funge-98 Documentation: MODE fingerprint</title>
-</head>
-<body bgcolor="#FFFFC0">
-<center><h1>Funge-98 Standard Modes</h1>
-<h3>Fingerprint 0x4d4f4445 ('MODE')</h3>
-</center>
-
-Currently under development.<P>
-
-After successfully loading MODE, the instructions
-<tt>H</tt>, <tt>I</tt>, <tt>Q</tt>, and <tt>S</tt>
-take on new semantics, which alter four new states or
-'modes' of the current IP.<P>
-
-<tt>H</tt> toggles an internal flag called hovermode on and off.  In hovermode, the 
-instructions <tt>&gt;</tt>, <tt>&lt;</tt>, <tt>^</tt>,
-<tt>v</tt>, <tt>|</tt>, and <tt>_</tt> treat the IP's delta
-relatively - instead of setting the dx to 0 and dy to -1,
-<tt>^</tt> would instead simply subtract 1 from dy.<p>
-
-The <tt>I</tt> "Toggle Invertmode" instruction toggles an internal flag called
-<i>invertmode</i>.  When invertmode is active, cells are <b>pushed</b> on the
-stack onto the <b>bottom</b> instead of the top.<p>
-
-The <tt>Q</tt> "Toggle Queuemode" instruction toggles an internal flag called
-<i>queuemode</i>.  When queuemode is active, cells are <b>popped</b> off the
-stack from the <b>bottom</b> instead of the top.<p>
-
-<tt>S</tt> toggles switchmode on and off.  In switchmode, the pairs of
-instructions <tt>[</tt> and <tt>]</tt>, <tt>{</tt> and <tt>}</tt>,
-and <tt>(</tt> and <tt>)</tt> are treated as switches.  When one is
-executed, the cell it is located in is immediately overwritten with
-the other instruction of the pair, providing a switching mechanism
-and a way to seperate coincident IP's.<p>
-
-</body>
-</html>

File library/MODE.markdown

View file
  • Ignore whitespace
+Funge-98 Standard Modes
+=======================
+
+### Fingerprint 0x4d4f4445 ('MODE')
+
+Currently under development.
+
+After successfully loading MODE, the instructions `H`, `I`, `Q`, and `S`
+take on new semantics, which alter four new states or 'modes' of the
+current IP.
+
+`H` toggles an internal flag called hovermode on and off. In hovermode,
+the instructions `>`, `<`, `^`, `v`, `|`, and `_` treat the IP's delta
+relatively - instead of setting the dx to 0 and dy to -1, `^` would
+instead simply subtract 1 from dy.
+
+The `I` "Toggle Invertmode" instruction toggles an internal flag called
+*invertmode*. When invertmode is active, cells are **pushed** on the
+stack onto the **bottom** instead of the top.
+
+The `Q` "Toggle Queuemode" instruction toggles an internal flag called
+*queuemode*. When queuemode is active, cells are **popped** off the
+stack from the **bottom** instead of the top.
+
+`S` toggles switchmode on and off. In switchmode, the pairs of
+instructions `[` and `]`, `{` and `}`, and `(` and `)` are treated as
+switches. When one is executed, the cell it is located in is immediately
+overwritten with the other instruction of the pair, providing a
+switching mechanism and a way to seperate coincident IP's.

File library/MODU.html

  • Ignore whitespace
-<html>
-<head>
-<title>Funge-98 Documentation: MODU fingerprint</title>
-</head>
-<body bgcolor="#FFFFC0">
-<center><h1>Modulo Arithmetic Extension</h1>
-<h3>Fingerprint 0x4d4f4455 ('MODU')</h3>
-</center>
-
-<p>Under development.
-
-<p>The MODU fingerprint implements some of the finer,
-less-well-agreed-upon points of modulo arithmetic.  With
-positive arguments, these instructions work exactly the
-same as <tt>%</tt> does.  However, when negative values
-are involved, they all work differently:
-
-<p><tt>M</tt>: signed-result modulo:
-<ul>x MOD y = x - FLOOR(x / y) * y</ul>
-<p><tt>U</tt>: Sam Holden's unsigned-result modulo
-<p><tt>R</tt>: C-language integer remainder
-
-</body>
-</html>

File library/MODU.markdown

View file
  • Ignore whitespace
+Modulo Arithmetic Extension
+===========================
+
+### Fingerprint 0x4d4f4455 ('MODU')
+
+Under development.
+
+The MODU fingerprint implements some of the finer, less-well-agreed-upon
+points of modulo arithmetic. With positive arguments, these instructions
+work exactly the same as `%` does. However, when negative values are
+involved, they all work differently:
+
+`M`: signed-result modulo:
+
+`U`: Sam Holden's unsigned-result modulo
+
+`R`: C-language integer remainder

File library/NULL.html

  • Ignore whitespace
-<html>
-<head>
-<title>Funge-98 Documentation: Null Fingerprint</title>
-</head>
-<body bgcolor="#FFFFC0">
-<center><h1>Funge-98 Null Fingerprint</h1>
-<h3>Fingerprint 0x4e554c4c (Null)</h3>
-</center>
-
-After successfully loading fingerprint 0x4e554c4c,
-all 26 instructions <tt>A</tt> to <tt>Z</tt>
-take on the semantics of <tt>r</tt>.<P>
-
-This can be loaded before loading a regular
-transparent fingerprint to make it act opaquely.<p>
-
-</body>
-</html>

File library/NULL.markdown

View file
  • Ignore whitespace
+Funge-98 Null Fingerprint
+=========================
+
+### Fingerprint 0x4e554c4c (Null)
+
+After successfully loading fingerprint 0x4e554c4c, all 26 instructions
+`A` to `Z` take on the semantics of `r`.
+
+This can be loaded before loading a regular transparent fingerprint to
+make it act opaquely.

File library/ORTH.html

  • Ignore whitespace
-<html>
-<head>
-<title>Funge-98 Documentation: ORTH fingerprint</title>
-</head>
-<body bgcolor="#FFFFC0">
-<center><h1>Orthogonal Easement Library</h1>
-<h3>Fingerprint 0x4f525448 ('ORTH')</h3>
-</center>
-
-Under development.<p>
-
-The ORTH fingerprint is designed to ease transition
-between the Orthogonal programming language and
-Befunge-98 (or higher dimension Funges.)  Even if
-transition from Orthogonal is not an issue, the ORTH
-library contains some potentially interesting
-instructions not in standard Funge-98.<P>
-
-After successfully loading ORTH, the instructions
-<tt>A</tt>, <tt>E</tt>, <tt>G</tt>,
-<tt>O</tt>, <tt>P</tt>, <tt>S</tt>,
-<tt>V</tt>, <tt>W</tt>, <tt>X</tt>, <tt>Y</tt>, and <tt>Z</tt>
-take on new semantics.  The following table, which
-can be used to translate Orthogonal to Funge-98 and
-back, includes which Orthogonal instructions they
-emulate:<p>
-
-<pre>
-	Funge		Orthogonal	Semantic
-
-	+		+		add
-	*		*		multiply
-	-		-		subtract
-	/		/		divide
-	%		%		modulo (positive values only)
->>>	A		&		bitwise AND
->>>	O		|		bitwise OR
->>>	E		^		bitwise EXOR
-	!		!		logical negate
-	\		~		swap
-	:		@		duplicate
-	$		$		pop
-	<		L		go west
-	>		H		go east
-	^		K		go north
-	v		J		go south
-	]		cw		rotate right
-	[		ccw		rotate left
-	r		rev		reverse
->>>	X		x		change x
->>>	Y		y		change y
->>>	V		dx		change dx
->>>	W		dy		change dy
->>>	G		=		ortho get
->>>	P		#		ortho put
->>>	Z		?		ramp if zero
-	,		c		output character
->>>	S		s		output string
-	.		d		output decimal
-	z		nop		no operation
-	q		ret		quit
-</pre>
-
-</body>
-</html>

File library/ORTH.markdown

View file
  • Ignore whitespace
+Orthogonal Easement Library
+===========================
+
+### Fingerprint 0x4f525448 ('ORTH')
+
+Under development.
+
+The ORTH fingerprint is designed to ease transition between the
+Orthogonal programming language and Befunge-98 (or higher dimension
+Funges.) Even if transition from Orthogonal is not an issue, the ORTH
+library contains some potentially interesting instructions not in
+standard Funge-98.
+
+After successfully loading ORTH, the instructions `A`, `E`, `G`, `O`,
+`P`, `S`, `V`, `W`, `X`, `Y`, and `Z` take on new semantics. The
+following table, which can be used to translate Orthogonal to Funge-98
+and back, includes which Orthogonal instructions they emulate:
+
+        Funge       Orthogonal  Semantic
+
+        +       +       add
+        *       *       multiply
+        -       -       subtract
+        /       /       divide
+        %       %       modulo (positive values only)
+    >>> A       &       bitwise AND
+    >>> O       |       bitwise OR
+    >>> E       ^       bitwise EXOR
+        !       !       logical negate
+        \       ~       swap
+        :       @       duplicate
+        $       $       pop
+        <       L       go west
+        >       H       go east
+        ^       K       go north
+        v       J       go south
+        ]       cw      rotate right
+        [       ccw     rotate left
+        r       rev     reverse
+    >>> X       x       change x
+    >>> Y       y       change y
+    >>> V       dx      change dx
+    >>> W       dy      change dy
+    >>> G       =       ortho get
+    >>> P       #       ortho put
+    >>> Z       ?       ramp if zero
+        ,       c       output character
+    >>> S       s       output string
+        .       d       output decimal
+        z       nop     no operation
+        q       ret     quit

File library/PERL.html

  • Ignore whitespace
-<html>
-<head>
-<title>Funge-98 Documentation: PERL fingerprint</title>
-</head>
-<body bgcolor="#FFFFC0">
-<center><h1>Generic Interface to the Perl Language</h1>
-<h3>Fingerprint 0x5045524c ('PERL')</h3>
-</center>
-
-<p>Under development.
-
-<p>The PERL fingerprint is designed to provide a basic,
-no-frills interface to the Perl language.
-
-<p>After successfully loading PERL, the instructions
-<tt>E</tt>, <tt>I</tt>, and <tt>S</tt>
-take on new semantics.
-
-<p><tt>S</tt> ('Shelled')
-pushes a 0 on the stack if the Perl language
-is already loaded (e.g. the interpreter is written in Perl).
-It pushes a 1 on the stack otherwise, indicating that the
-Perl language will be shelled when needed.
-
-<p><tt>E</tt> ('Eval') pops a 0gnirts string and
-performs a Perl <code>eval()</code> on it, possibly (or
-not) shelling Perl as indicated by S above.
-The result of the call is pushed as a 0gnirts string
-back onto the stack.
-
-<P><tt>I</tt> ('Int Eval') acts the same as <tt>E</tt>, except that
-the result of the call is converted to an integer and
-pushed as a single cell onto the stack.
-
-</body>
-</html>

File library/PERL.markdown

View file
  • Ignore whitespace
+Generic Interface to the Perl Language
+======================================
+
+### Fingerprint 0x5045524c ('PERL')
+
+Under development.
+
+The PERL fingerprint is designed to provide a basic, no-frills interface
+to the Perl language.
+
+After successfully loading PERL, the instructions `E`, `I`, and `S` take
+on new semantics.
+
+`S` ('Shelled') pushes a 0 on the stack if the Perl language is already
+loaded (e.g. the interpreter is written in Perl). It pushes a 1 on the
+stack otherwise, indicating that the Perl language will be shelled when
+needed.
+
+`E` ('Eval') pops a 0gnirts string and performs a Perl `eval()` on it,
+possibly (or not) shelling Perl as indicated by S above. The result of
+the call is pushed as a 0gnirts string back onto the stack.
+
+`I` ('Int Eval') acts the same as `E`, except that the result of the
+call is converted to an integer and pushed as a single cell onto the
+stack.

File library/REFC.html

  • Ignore whitespace
-<html>
-<head>
-<title>Funge-98 Documentation: REFC fingerprint</title>
-</head>
-<body bgcolor="#FFFFC0">
-<center><h1>Referenced Cells Extension</h1>
-<h3>Fingerprint 0x52454643 ('REFC')</h3>
-</center>
-
-<p>Under development.
-
-<p>The REFC fingerprint allows vectors to be encoded into
-and decoded from single scalar cell values.
-
-<p>After successfully loading REFC, the instructions
-<tt>D</tt> and <tt>R</tt>
-take on new semantics.
-
-<p><tt>R</tt> 'Reference' pops a vector off the stack,
-and pushes a scalar value back onto the stack, unique
-within an internal list of references, which refers
-to that vector.
-
-<p><tt>D</tt> 'Dereference' pops a scalar value off the
-stack, and pushes the vector back onto the stack which
-corresponds to that unique reference value.
-
-<p>The internal list of references is considered
-shared among all IP's, so a global static can be used
-to store this list, so that this extension remains tame.
-
-</body>
-</html>

File library/REFC.markdown

View file
  • Ignore whitespace
+Referenced Cells Extension
+==========================
+
+### Fingerprint 0x52454643 ('REFC')
+
+Under development.
+
+The REFC fingerprint allows vectors to be encoded into and decoded from
+single scalar cell values.
+
+After successfully loading REFC, the instructions `D` and `R` take on
+new semantics.
+
+`R` 'Reference' pops a vector off the stack, and pushes a scalar value
+back onto the stack, unique within an internal list of references, which
+refers to that vector.
+
+`D` 'Dereference' pops a scalar value off the stack, and pushes the
+vector back onto the stack which corresponds to that unique reference
+value.
+
+The internal list of references is considered shared among all IP's, so
+a global static can be used to store this list, so that this extension
+remains tame.

File library/ROMA.html

  • Ignore whitespace
-<html>
-<head>
-<title>Funge-98 Documentation: ROMA fingerprint</title>
-</head>
-<body bgcolor="#FFFFC0">
-<center><h1>Funge-98 Roman Numerals</h1>
-<h3>Fingerprint 0x524f4d41 ('ROMA')</h3>
-</center>
-
-After successfully loading ROMA, the instructions
-<tt>C</tt>, <tt>D</tt>, <tt>I</tt>, <tt>L</tt>,
-<tt>M</tt>, <tt>V</tt>, and <tt>X</tt>
-take on new semantics.<P>
-
-<ul>
-<li><tt>C</tt> pushes 100 onto the stack.
-<li><tt>D</tt> pushes 500 onto the stack.
-<li><tt>I</tt> pushes 1 onto the stack.
-<li><tt>L</tt> pushes 50 onto the stack.
-<li><tt>M</tt> pushes 1000 onto the stack.
-<li><tt>V</tt> pushes 5 onto the stack.
-<li><tt>X</tt> pushes 10 onto the stack.
-</ul>
-
-Note that these are just digits, you still have
-to do the arithmetic yourself.
-Executing <tt>MCMLXXXIV</tt> will not leave
-1984 on the stack.  But executing
-<tt>MCM\-+LXXX+++IV\-++</tt> should.<p>
-
-</body>
-</html>

File library/ROMA.markdown

View file
  • Ignore whitespace
+Funge-98 Roman Numerals
+=======================
+
+### Fingerprint 0x524f4d41 ('ROMA')
+
+After successfully loading ROMA, the instructions `C`, `D`, `I`, `L`,
+`M`, `V`, and `X` take on new semantics.
+
+-   `C` pushes 100 onto the stack.
+-   `D` pushes 500 onto the stack.
+-   `I` pushes 1 onto the stack.
+-   `L` pushes 50 onto the stack.
+-   `M` pushes 1000 onto the stack.
+-   `V` pushes 5 onto the stack.
+-   `X` pushes 10 onto the stack.
+
+Note that these are just digits, you still have to do the arithmetic
+yourself. Executing `MCMLXXXIV` will not leave 1984 on the stack. But
+executing `MCM\-+LXXX+++IV\-++` should.

File library/TOYS.html

  • Ignore whitespace
-<html>
-<head>
-<title>Funge-98 Documentation: TOYS fingerprint</title>
-</head>
-<body bgcolor="#FFFFC0">
-<center><h1>Funge-98 Standard Toys</h1>
-<h3>Fingerprint 0x544f5953 ('TOYS')</h3>
-</center>
-
-<p>Under development.
-
-<p>After successfully loading TOYS, the instructions
-<tt>A</tt>, <tt>B</tt>, <tt>C</tt>, <tt>D</tt>,
-<tt>E</tt>, <tt>F</tt>, <tt>G</tt>, 
-<tt>H</tt>, <tt>I</tt>, <tt>J</tt>, <tt>K</tt>,
-<tt>L</tt>, <tt>M</tt>, <tt>N</tt>, <tt>O</tt>,
-<tt>P</tt>, <tt>Q</tt>, 
-<tt>R</tt>, <tt>S</tt>, <tt>T</tt>, <tt>U</tt>, <tt>V</tt>, <tt>W</tt>,
-<tt>X</tt>, <tt>Y</tt>, and <tt>Z</tt>
-take on new semantics (and INTERCAL-esque names).
-
-<P><tt>C</tt> ('bracelet')
-pops three vectors off the stack and performs
-a low-order copy of Funge-Space.
-
-<p><tt>K</tt> ('scissors')
-pops three vectors off the stack and performs
-a high-order copy of Funge-Space.
-
-<p><tt>M</tt> ('kittycat')
-pops three vectors off the stack and performs
-a low-order move (copy & erase original) of Funge-Space.
-
-<p><tt>V</tt> ('dixiecup')
-pops three vectors off the stack and performs
-a high-order move of Funge-Space.
-
-<p><tt>S</tt> ('chicane')
-pops two vectors off the stack, then a cell,
-then fills that area of Funge-Space homogenously with that cell's
-value.
-
-<p>Which order a copy or move takes is important if you copy
-or move to an overlapping area.  Ensure when implementing these
-that the order is preserved in all dimensions.
-
-<p>The first two vectors are like the arguments to <tt>o</tt>.
-In all except <tt>S</tt>, the third is the destination, relative
-to the origin.
-
-<p><tt>J</tt> ('fishhook')
-pops a value off the stack, and causes the current
-column (y coordinate) of Funge-space
-to be translated north (if value is negative) or south (if positive)
-that many rows.
-
-<p><tt>O</tt> ('boulder')
-pops a value off the stack, and causes the current
-row (x coordinate) of Funge-space
-to be translated west (if value is negative) or east (if positive)
-that many columns.
-
-<p><tt>L</tt> ('corner')
-works like <tt>'</tt> except it picks up the cell
-to the "left" of the IP's line and does not skip over anything.
-(Historians may note that this works like "Get Left Hand" did
-in Befunge-97.)  The cell to the "left" of the IP is the IP's
-position, plus its delta rotated -90 degrees about the Z axis
-(a la <tt>[</tt>)
-
-<p><tt>R</tt> ('can opener')
-is a corresponding instruction that mirrors <tt>L</tt>
-and works to the right, rotated 90 degrees about the Z axis
-("Get Right Hand" from Befunge-97)
-
-<p><tt>I</tt> ('doric column')
-pops a value off the stack, increments it,
-and pushes it back onto the stack.
-
-<p><tt>D</tt> ('toilet seat')
-pops a value off the stack, decrements it,
-and pushes it back onto the stack.
-
-<p><tt>N</tt> ('lightning bolt')
-pops a value off the stack, negates it,
-and pushes it back onto the stack.
-
-<p><tt>H</tt> ('pair of stilts')
-pops a value <i>b</i> off the stack, then a value
-<i>a</i>, then binary-shifts <i>a</i> <i>b</i> places left if <i>b</i>
-is positive, or |<i>b</i>| places right if <i>b</i> is negative.
-
-<p><tt>A</tt> ('gable')
-pops a cell <i>n</i> off the stack, then another cell,
-then pushes <i>n</i> copies of that cell onto the stack.
-
-<p><tt>B</tt> ('pair of shoes')
-pops two cells off the stack and pushes the result
-of a "butterfly" bit operation.
-
-<p><tt>E</tt> ('pitchfork head')
-pops all values off the stack and pushes their sum
-back onto it.
-
-<p><tt>P</tt> ('mailbox')
-pops all values off the stack and pushes their product
-back onto it.
-
-<p><tt>F</tt> ('calipers')
-pops a vector, then a value <i>i</i>.  Treating
-the rest of the
-stack as <i>j</i> groups of <i>i</i> cells each, it writes this
-2D matrix into Funge-space in row-major order,
-with it's least point as the given vector.
-
-<p><tt>G</tt> ('counterclockwise')
-pops a vector, then a value <i>i</i>.  It then
-pushes onto the stack <i>j</i> groups of <i>i</i> cells each
-which it retrieves as a 2D matrix in Funge-space in row-major
-order, the least point of which being the vector supplied to it.
-
-<p><tt>Q</tt> ('necklace')
-pops a value off the stack and places it into the cell
-directly behind the IP (kind of like <tt>s</tt>, except behind, and
-no cell is skipped over.)
-
-<p><tt>T</tt> ('barstool')
-pops a dimension number off the stack; if it's
-a 0, acts like <tt>_</tt>; if it's 1, acts like <tt>|</tt>;
-if it's 2, acts like <tt>m</tt>; etc. depending on
-the number of available dimensions as appropriate of course.
-
-<p><tt>U</tt> ('tumbler')
-is like <tt>?</tt> but one-shot.  When executed, it
-randomly transmutes into one of <tt>&lt;</tt>, <tt>&gt;</tt>,
-<tt>^</tt>, <tt>v</tt>, <tt>h</tt>, or <tt>l</tt>, depending on
-the number of available dimensions as appropriate of course.
-
-<p><tt>W</tt> ('television antenna')
-pops a vector off the stack, then a value.
-If the cell at that vector (plus the storage offset)
-in Funge-Space (a la <tt>g</tt>)
-is equal to that value, nothing happens.  If the cell in space
-is less than the value, it pushes the value and the vector (inverted)
-back onto the stack, and backs up the IP (subtracts the IP's
-delta from it's position, sort of a 'wait to try again'
-condition, useful mainly in Concurrent Funge.)  If
-the cell in space is greater than that value, acts like <tt>r</tt>.
-
-<p><tt>X</tt> ('buried treasure')
-increments the IP's x coordinate.
-
-<p><tt>Y</tt> ('slingshot')
-increments the IP's y coordinate.
-
-<p><tt>Z</tt> ('barn door')
-increments the IP's z coordinate.
-
-<p>These three instructions are useful at the end of a line, to
-indicate "proceed to next line then wrap".  Note the IP's delta
-motion is still fully in effect.
-</body>
-</html>

File library/TOYS.markdown

View file
  • Ignore whitespace
+Funge-98 Standard Toys
+======================
+
+### Fingerprint 0x544f5953 ('TOYS')
+
+Under development.
+
+After successfully loading TOYS, the instructions `A`, `B`, `C`, `D`,
+`E`, `F`, `G`, `H`, `I`, `J`, `K`, `L`, `M`, `N`, `O`, `P`, `Q`, `R`,
+`S`, `T`, `U`, `V`, `W`, `X`, `Y`, and `Z` take on new semantics (and
+INTERCAL-esque names).
+
+`C` ('bracelet') pops three vectors off the stack and performs a
+low-order copy of Funge-Space.
+
+`K` ('scissors') pops three vectors off the stack and performs a
+high-order copy of Funge-Space.
+
+`M` ('kittycat') pops three vectors off the stack and performs a
+low-order move (copy & erase original) of Funge-Space.
+
+`V` ('dixiecup') pops three vectors off the stack and performs a
+high-order move of Funge-Space.
+
+`S` ('chicane') pops two vectors off the stack, then a cell, then fills
+that area of Funge-Space homogenously with that cell's value.
+
+Which order a copy or move takes is important if you copy or move to an
+overlapping area. Ensure when implementing these that the order is
+preserved in all dimensions.
+
+The first two vectors are like the arguments to `o`. In all except `S`,
+the third is the destination, relative to the origin.
+
+`J` ('fishhook') pops a value off the stack, and causes the current
+column (y coordinate) of Funge-space to be translated north (if value is
+negative) or south (if positive) that many rows.
+
+`O` ('boulder') pops a value off the stack, and causes the current row
+(x coordinate) of Funge-space to be translated west (if value is
+negative) or east (if positive) that many columns.
+
+`L` ('corner') works like `'` except it picks up the cell to the "left"
+of the IP's line and does not skip over anything. (Historians may note
+that this works like "Get Left Hand" did in Befunge-97.) The cell to the
+"left" of the IP is the IP's position, plus its delta rotated -90
+degrees about the Z axis (a la `[`)
+
+`R` ('can opener') is a corresponding instruction that mirrors `L` and
+works to the right, rotated 90 degrees about the Z axis ("Get Right
+Hand" from Befunge-97)
+
+`I` ('doric column') pops a value off the stack, increments it, and
+pushes it back onto the stack.
+
+`D` ('toilet seat') pops a value off the stack, decrements it, and
+pushes it back onto the stack.
+
+`N` ('lightning bolt') pops a value off the stack, negates it, and
+pushes it back onto the stack.
+
+`H` ('pair of stilts') pops a value *b* off the stack, then a value *a*,
+then binary-shifts *a* *b* places left if *b* is positive, or |*b*|
+places right if *b* is negative.
+
+`A` ('gable') pops a cell *n* off the stack, then another cell, then
+pushes *n* copies of that cell onto the stack.
+
+`B` ('pair of shoes') pops two cells off the stack and pushes the result
+of a "butterfly" bit operation.
+
+`E` ('pitchfork head') pops all values off the stack and pushes their
+sum back onto it.
+
+`P` ('mailbox') pops all values off the stack and pushes their product
+back onto it.
+
+`F` ('calipers') pops a vector, then a value *i*. Treating the rest of
+the stack as *j* groups of *i* cells each, it writes this 2D matrix into
+Funge-space in row-major order, with it's least point as the given
+vector.
+
+`G` ('counterclockwise') pops a vector, then a value *i*. It then pushes
+onto the stack *j* groups of *i* cells each which it retrieves as a 2D
+matrix in Funge-space in row-major order, the least point of which being
+the vector supplied to it.
+
+`Q` ('necklace') pops a value off the stack and places it into the cell
+directly behind the IP (kind of like `s`, except behind, and no cell is
+skipped over.)
+
+`T` ('barstool') pops a dimension number off the stack; if it's a 0,
+acts like `_`; if it's 1, acts like `|`; if it's 2, acts like `m`; etc.
+depending on the number of available dimensions as appropriate of
+course.
+
+`U` ('tumbler') is like `?` but one-shot. When executed, it randomly
+transmutes into one of `<`, `>`, `^`, `v`, `h`, or `l`, depending on the
+number of available dimensions as appropriate of course.
+
+`W` ('television antenna') pops a vector off the stack, then a value. If
+the cell at that vector (plus the storage offset) in Funge-Space (a la
+`g`) is equal to that value, nothing happens. If the cell in space is
+less than the value, it pushes the value and the vector (inverted) back
+onto the stack, and backs up the IP (subtracts the IP's delta from it's
+position, sort of a 'wait to try again' condition, useful mainly in
+Concurrent Funge.) If the cell in space is greater than that value, acts
+like `r`.
+
+`X` ('buried treasure') increments the IP's x coordinate.
+
+`Y` ('slingshot') increments the IP's y coordinate.
+
+`Z` ('barn door') increments the IP's z coordinate.
+
+These three instructions are useful at the end of a line, to indicate
+"proceed to next line then wrap". Note the IP's delta motion is still
+fully in effect.

File library/TURT.html

  • Ignore whitespace
-<html>
-<head>
-<title>Funge-98 Documentation: TURT fingerprint</title>
-</head>
-<body bgcolor="#FFFFC0">
-<center><h1>Simple Turtle Graphics Library</h1>
-<h3>Fingerprint 0x54555254 ('TURT')</h3>
-</center>
-
-<p>Under development.
-
-<p>The TURT fingerprint provides a simple interface to a simple
-"drawing turtle-robot simulator".
-
-<p>After successfully loading TURT, several instructions
-take on new semantics.
-
-<p>These instructions pop one value off the stack:
-
-<ul>
-<li><tt>L</tt> 'Turn Left' (angle in degrees)
-<li><tt>R</tt> 'Turn Right' (angle in degrees)
-<li><tt>H</tt> 'Set Heading' (angle in degrees, relative to 0deg, east)
-<li><tt>F</tt> 'Forward' (distance in pixels)
-<li><tt>B</tt> 'Back' (distance in pixels)
-<li><tt>P</tt> 'Pen Position' (0 = up, 1 = down)
-<li><tt>C</tt> 'Pen Colour' (24-bit RGB)
-<li><tt>N</tt> 'Clear Paper with Colour' (24-bit RGB)
-<li><tt>D</tt> 'Show Display' (0 = no, 1 = yes)
-</ul>
-
-<p>These pop two values each:
-<ul>
-<li><tt>T</tt> 'Teleport' (x, y coords relative to origin; 00T = home)
-</ul>
-
-<p>These push one value each:
-<ul>
-<li><tt>E</tt> 'Query Pen' (0 = up, 1 = down)
-<li><tt>A</tt> 'Query Heading' (positive angle relative to east)
-</ul>
-
-<p>These push two values each:
-<ul>
-<li><tt>Q</tt> 'Query Position' (x, y coordinates)
-</ul>
-
-<p>These push four values each:
-<ul>
-<li><tt>U</tt> 'Query Bounds' (two pairs of x, y coordinates)
-</ul>
-
-<p>And these don't even use the stack:
-<ul>
-<li><tt>I</tt> 'Print current Drawing' (if possible)
-</ul>
-
-<p>To keep this fingerprint tame, a single Turtle and display
-is defined to be shared amongst all IP's.  The turtle is not
-defined to wrap if it goes out of bounds (after all this interface
-might just as well be used to drive a <b>real</b> turtle robot.)
-
-</body>
-</html>

File library/TURT.markdown

View file
  • Ignore whitespace
+Simple Turtle Graphics Library
+==============================
+
+### Fingerprint 0x54555254 ('TURT')
+
+Under development.
+
+The TURT fingerprint provides a simple interface to a simple "drawing
+turtle-robot simulator".
+
+After successfully loading TURT, several instructions take on new
+semantics.
+
+These instructions pop one value off the stack:
+
+-   `L` 'Turn Left' (angle in degrees)
+-   `R` 'Turn Right' (angle in degrees)
+-   `H` 'Set Heading' (angle in degrees, relative to 0deg, east)
+-   `F` 'Forward' (distance in pixels)
+-   `B` 'Back' (distance in pixels)
+-   `P` 'Pen Position' (0 = up, 1 = down)
+-   `C` 'Pen Colour' (24-bit RGB)
+-   `N` 'Clear Paper with Colour' (24-bit RGB)
+-   `D` 'Show Display' (0 = no, 1 = yes)
+
+These pop two values each:
+
+-   `T` 'Teleport' (x, y coords relative to origin; 00T = home)
+
+These push one value each:
+
+-   `E` 'Query Pen' (0 = up, 1 = down)
+-   `A` 'Query Heading' (positive angle relative to east)
+
+These push two values each:
+
+-   `Q` 'Query Position' (x, y coordinates)
+
+These push four values each:
+
+-   `U` 'Query Bounds' (two pairs of x, y coordinates)
+
+And these don't even use the stack:
+
+-   `I` 'Print current Drawing' (if possible)
+
+To keep this fingerprint tame, a single Turtle and display is defined to
+be shared amongst all IP's. The turtle is not defined to wrap if it goes
+out of bounds (after all this interface might just as well be used to
+drive a **real** turtle robot.)