"IMAP" 0x494D4150
| C | ( -- ) | Clear all instruction remaps |
| M | (new old -- ) | Remap an instruction |
| O | (n -- ) | Return instruction n to its old function |
- This extension is intended to map instructions in the 0-255 range
- Attempting to map instructions outside of the 0-255 range reflect
- Chained remaps are not supported by this extension. Only a single level
of mapping is supported
"INDV" 0x494E4456
| G | (Vp - n) | Pointer get number |
| P | (n Vp -- ) | Pointer put number |
| V | (Va -- V) | Pointer get vector |
| W | (V Va --) | Pointer put vector |
- Pointer functions pop a vector off the stack which points to another
vector in memory which is the pointer to the target cell.
- Vectors are stored in memory with a delta of 1,0,0 with Z being first
in trefunge, and Y first in befunge.
"JSTR" 0x4a535452
| G | (Vd Va n - ) | pop n cells off of the stack and write at Va with delta Vd |
| P | (Vd Va n - 0gnirts) | read n cells from position Va and delta Vd, push on stack as a string |
"LONG" 0x4c4f4e47
| A | (ah al bh bl -- rh rl) | Addition |
| B | (ah al -- rh rl) | Absolute value |
| D | (ah al bh bl -- rh rl) | Division |
| E | (n -- rh rl) | Sign extend single to long |
| L | (ah al n -- rh rl) | Shift left n times |
| M | (ah al bh bl -- rh rl) | Multiplication |
| N | (ah al -- rh rl) | Negate |
| O | (ah al bh bl -- rh rl) | Modulo |
| P | (ah al -- ) | Print |
| R | (ah al n -- rh rl) | Shift right n times |
| S | (ah al bh bl -- rh rl) | Subraction |
| Z | (0gnirts -- rh rl) | Ascii to long |
- long integers are 2 cell integers, if the interpreter's cell size is
32, then long integers are 64-bits.
- Division by zero results in zero, not error
"MACR" 0x4d414352
| A-Y | ( -- ) | Execute specified macro |
| Z | (V -- ) | Specify where macro block is located |
- Macros are simple mini-funge like Befunge-like subroutines that execute
in a single tick
- The Macro block may be located anywhere in Funge-Space. Each macro runs
with a delta of 1,0,0 (Befunge like macros) macro A is located at the
macro block vector, Macro B is one line below at the same starting X, C
below that, etc
- Macros execute with the IP where it is! not in the macro space
- Instructions affect the IP that called the Macro
- A macro teminates when either a @ is found or an invalid instruction is
found
- Most standard Funge-98 instructions can be used within macro blocks, but
keep in mind they affect the IP where it is and not inside the macro
block
- A-Z generally are not allowed within macros, however some A-Z commands
perform special functions when executed inside of a macro:
| A | - | like _ but affects the macro pointer instead of the IP |
| B | - | Move IP backwards |
| E | - | Change macro delta to 1,0,0 |
| F | - | Move IP forwards |
| G | - | Get next macro cell onto stack |
| I | - | like | but affects the macro pointer instead of the IP |
| J | - | like j but affects the macro pointer instead of the IP |
| L | - | like [ but affects the macro pointer instead of the IP |
| N | - | Change macro delta to 0,-1,0 |
| R | - | like ] but affects the macro pointer instead of the IP |
| S | - | Change macro delta to 0,1,0 |
| T | - | like # but affects the macro pointer instead of the IP |
| W | - | Change macro delta to -1,0,0 |
"MODE" 0x4D4F4445
| H | ( -- ) | Toggles hover mode (relative vs absolute delta changes) |
| I | ( -- ) | Toggles invert mode (push to bottom of stack) |
| Q | ( -- ) | Toggles queue mode (pop from bottom of stack) |
| S | ( -- ) | Toggles switch mode (alters [,].{.}.(.) commands) |
"MODU" 0x4D4F4455
| M | (a b -- a mod b) | x-floor(x/y)*y |
| U | (a b -- a mod b) | Unsigned result |
| R | (a b -- a mod b) | C-language remainder |
- MODU was defined before C99, therefore command R is implementation
dependant
"MSGQ" 0x4d534751
| G | (key flags -- id) | Get message queue identifier |
| K | (id -- ) | Kill message queue |
| R | (n mtyp id flags -- .. n t) | Receive message to stack |
| S | (.. n mtyp id flags -- ) | Send bytes on stack as message |
| T | (id -- nmsg maxsize) | Get message system info |
- G Flags:
| 4096 | - IPC_CREAT | - Create if id does not exist |
| 8192 | - IPC_EXCL | - Open in exclusive mode |
| 16384 | - IPC_PRIVATE | - Create private |
| low 9 bits are Unix standard access permissions |
- R Flags:
| 1 | - IPC_NOWAIT | - Do not block if no messages available |
| 2 | - MSG_NOERROR | - Truncate too-long message instead of error |
- S Flags:
| 1 | - IPC_NOWAIT | - Do not block if message queue full |
- All functions reflect on error with the error code on the stack
| 1 | - EACCESS | - A message queue exists for key, but no permission to access |
| 2 | - EEXIST | - Message queue exist when IPC_CREAT and IPC_EXCL are both specified |
| 3 | - ENOENT | - No mesage queue exists for key and IPC_CREAT was not specified |
| 4 | - ENOMEM | - Not enough memory |
| 5 | - ENOSPC | - Message queue needs to be create but no more message queues allowed |
| 6 | - EFAULT | - Address for IPC_SET or IPC_STAT not accessable |
| 7 | - EINVAL | - Invalid value for cmd or id |
| 8 | - EPERM | - No permissions to perform action |
| 9 | - EAGAIN | - A blocking condition was created and IPC_NOWAIT was specified |
| 10 | - EIDRM | - Message queue was removed |
| 11 | - EINTR | - Sleeping on a full message queue, the process caught a signal |
| 12 | - E2BIG | - Message size greater than specified maximum |
| 13 | - ENOMSG | - IPC_NOWAIT was specifed and no message of the required type was available |
- Maximum message size MAY BE limited to a set size. Rc/Funge-98 allows
for messages up to 4096 bytes
"NULL" 0x4E554C4C
| A-Z | ( -- ) | All set to reflect |
"ORTH" 0x4F525448
| A | (a b -- a and b) | And |
| E | (a b -- a exor b) | exor |
| G | (y x -- v) | Get value stored at x,y |
| O | (a b -- a or b) | Or |
| P | (v y x -- ) | Store value in funge space x,y |
| S | (0gnirts -- ) | Print string located on stack |
| V | (n --) | Change IP Delta X to tos |
| W | (n --) | Change IP Delta Y to tos |
| X | (n -- ) | Change IP x coordinate to tos |
| Y | (n -- ) | Change IP y coordinate to tos |
| Z | (n -- ) | If zero, act like # |
"PERL" 0x5045524C
| E | (0gnirts -- 0gnirts) | Evaluate a string in perl |
| I | (0gnirts -- n) | Evaluate a string in perl, returning integer |
| S | ( -- n) | Pushes 0 if underlying system is perl, else 1 |
"REFC" 0x52454643
| R | (Va -- r) | Produce a single cell reference to a vector |
| D | (r -- Va) | Return the vector referenced by r |
- The table used by REFC is global to all fingerprints
"REXP" 0x52455850
| C | (0gnirts flags -- ) | Compile a regular expression |
| E | (0gnirts flags -- results) | Execute regular expression on string |
| F | ( -- ) | Free compiled regex buffer |
- Flags for C command:
| 1 | - REG_EXTENDED | - use posix extended regular expressions |
| 2 | - REG_ICASE | - ignore case |
| 4 | - REG_NOSUB | - Do not retrieve submatches |
| 8 | - REG_NEWLINE | - match any characters do not match newlines |
- Flags for E command:
| 1 | - REG_NOTBOL | - beginning of line always fails |
| 2 | - REG_NOTEOL | - end of line always fails |
- C Reflects on error with error number on stack:
| 1 | - REG_BADBR | - Invalid use of back reference |
| 2 | - REG_BADPAT | - Invalid use of pattern operators |
| 3 | - REG_BADRPT | - Invalid use of repitition operators |
| 4 | - REG_EBRACE | - Unmatched brace |
| 5 | - REG_EBRACK | - Unmatched bracket |
| 6 | - REG_ECOLLATE | - Invalid collating element |
| 7 | - REG_ECTYPE | - Invalid character class name |
| 8 | - REG_EEND | - Non-specific error |
| 9 | - REG_EESCAPE | - Trailing backslash |
| 10 | - REG_EPAREN | - Unmatched parenthesis |
| 11 | - REG_ERANGE | - Invalid use of range operator |
| 12 | - REG_ESIZE | - Compiled pattern too large |
| 13 | - REG_ESPACE | - Regex routines ran out of memory |
| 14 | - REG_ESUBREG | - Invalid backreference to subexpression |
- E leaves the results of the match as a series of 0gnirts strings. Each
string representing the matched portion of a substring. Top of stack
will have the count of these 0gnirts strings.
- E Reflects if no match
- If REG_EXTENDED is not specified, then the base level of regular
expressions is what is supported, similar to grep or sed. The commands
. * [ ] ^ $ \( \) should all be supported
"ROMA" 0x524F4D41
| C | ( -- 100) | Pushes 100 on stack |
| D | ( -- 500) | Pushes 500 on stack |
| I | ( -- 1) | Pushes 1 on stack |
| L | ( -- 50) | Pushes 50 on stack |
| M | ( -- 1000) | Pushes 1000 on stack |
| V | ( -- 5) | Pushes 5 on stack |
| X | ( -- 10) | Pushes 10 on stack |
"SETS" 0x53455453
| A | (set v -- set) | Add value to set |
| C | (set -- set n) | Get count of items in set |
| D | (set -- set set) | Duplicate set on stack |
| G | (Vdlt Vsrc -- set) | Get set from Funge-space |
| I | (seta setb -- seta setb setr) | Instersection of sets |
| M | (set v -- set r) | r=0 if v is not member of set, else r=1 |
| P | (set -- set) | Print a set |
| R | (set v -- set) | Remove value from set |
| S | (seta setb -- seta setb setr) | Subtract setb from seta |
| U | (seta setb -- seta setb setr) | Union of sets |
| W | (set Vdlt Vdst -- set) | Write set to Funge-space |
| X | (seta setb -- setb seta) | Swap two sets |
| Z | (set -- ) | Drop set from stack |
- all reflect if stack does not appear to have a proper set
- Sets are in the form (v1 v2 v3 .. vn ) n, n being closes to top of stack
denotes how many items are in the set
- Nearly all instructions leave the work sets on the stack at the
completion of the instruction
- Order within the sets need not be maintained. These are sets and not
arrays
"SMEM" 0x534d454d
| G | (key size flags -- id) | Get shared memory segment |
| K | (id -- ) | Remove shared memory segment |
| R | (n addr id flags -- ..) | Read bytes from shared memory |
| T | (id -- size) | Get shared memory info |
| W | (.. n addr id flags -- ) | Write bytes to shared memory |
- G Flags:
| 4096 | - IPC_CREATE | - Create segment if it does not exist |
| 8192 | - IPC_EXCL | - Open for exclusive use |
| 16384 | - IPC_PRIVATE | - Create private |
| Low 9 bits are Unix pattern permisssions |
- R Flags:
| 1 | - SHM_RDONLY | - Attach segment readonly |
- W Flags:
| 1 | - SHM_RDONLY | - Attach segment readonly |
- All commands reflect on error with the error code on the stack:
| 1 | - EACCES | - User does not have permission to access |
| 2 | - EEXIST | - IPC_CREAT|IPC_EXCL was specified and sement exists |
| 3 | - EFAULT | - Address is not accessable |
| 4 | - EIDRM | - Shared memory segment was removed |
| 5 | - EINVAL | - id is not a valid id |
| 6 | - ENFILE | - System limit on open files has been reached |
| 7 | - EOVERFLOW | - |
| 8 | - ENOENT | - No segment exists for key and IPC_CREAT was not specified |
| 9 | - ENOMEM | - No memory could be allocated |
| 10 | - ENOSPC | - All possible shared memory IDs have been taken |
| 11 | - EPERM | - No permissions |
"SMPH" 0x534d5048
| A | (sem id flags -- id) | Allocate semaphore |
| D | (sem id flags -- id) | De-allocate semaphore |
| G | (key nsems flags -- id) | Get a semaphore set |
| K | (id -- ) | Remove a semaphore set |
| M | (op sem id n -- ) | Multiple semaphore operations |
| N | (sem id -- z n) | Get number of processes waiting on semaphore |
| R | (sem id -- n) | Read semaphore value |
| W | (v sem id -- ) | Write semaphore value |
| Z | (sem id -- ) | Wait for zero semaphore |
- A,D,Z Flags:
| 1 | - IPC_NOWAIT | - Do not block |
| 2 | - SEM_UNDO | - Undo operation on program exit |
- G Flags:
| 4096 | - IPC_CREATE | - Create if it does not exist |
| 8192 | - IPC_EXCL | - Open for exclusive use |
| 16384 | - IPC_PRIVATE | - Create a private semaphore set |
| Low 9 bits are Unix pattern permisssions |
- M (op sem id) is repeated on the stack n times, one set for each semaphore
to be changed.
- N result z is the number of processes waiting for semaphore to be zero, n
is the number of processes waiting for a positive value
- All commands reflect on error with the error code on the stack:
| 1 | - E2BIG | - Value was too large |
| 2 | - EACCESS | - Semaphore exists but no access allowed |
| 3 | - EAGAIN | - Operation could not go through with IPC_NOWAIT specified |
| 4 | - EEXIST | - IPC_CREAT|IPC_EXCL were specified and semaphore exists |
| 5 | - EFAULT | - Address isn't accessible |
| 6 | - EFBIG | - Invalid semaphore number |
| 7 | - EIDRM | - Semaphore set was removed |
| 8 | - EINTR | - Sleeping on a wait queue and process receives a signal |
| 9 | - EINVAL | - Semaphore set does not exist |
| 10 | - ENOENT | - No semaphore set exists and IPC_CREAT was not specified |
| 11 | - ENOMEM | - Not enough memory to create new semaphore set |
| 12 | - ENOSPC | - Maximum semaphore limit has been reached |
| 13 | - EPERM | - Insuficient privileges to execute command |
| 14 | - ERANGE | - Semaphore value exceeded allowed count |
"SOCK" 0x534F434B
| A | (s -- prt addr s) | Accept a connection |
| B | (s ct prt addr -- ) | Bind a socket |
| C | (s ct prt addr -- ) | Open a connection |
| I | (0gnirts -- addr) | Convert an ascii ip address to a 32 bit address |
| K | (s -- ) | Kill a connection |
| L | (n s -- ) | Set a socket to listening mode (n=backlog size) |
| O | (n o s -- ) | Set socket option |
| R | (V l s -- bytes) | Receive from a socket, |
| S | (pf typ pro -- s) | Create a socket |
| W | (V l s -- retcode) | Write to a socket |
| note: All functions act as r on failure |
| addr: | 32 bit destination address |
| ct: | 1=AF_UNIX 2=AF_INET |
| o: | 1=SO_DEBUG 2=SO_REUSEADDR 3=SO_KEEPALIVE 4=SO_DONTROUTE
5=SO_BROADCAST 6=OOBINLINE |
| pf: | 1=PF_UNIX 2=PF_INET |
| prt: | Port to connect to |
| s: | Socket identifier |
| typ: | 1=SOCK_DGRAM 2=SOCK_STREAM |
| pro: | 1=tcp 2=udp |
| V: | Vector to io buffer |
"STCK" 0x5354434b
| B | (v n -- v ..) | Bury v value n deep into the stack |
| C | (.. -- cnt) | Get count of items on stack |
| D | (.. n -- ..) | Duplicate top n stack items |
| G | (n Vdlt Vsrc -- ..) | Read n stack entires from Funge-Space |
| K | (st en -- ..) | Push block of stack cells on top |
| N | (.. n -- ..) | Reverse n items on stack |
| P | (.. -- ..) | Print contents of stack, non-destructive |
| R | (.. -- ..) | Reverse all items on stack |
| S | (a b -- a a b) | Duplicate second on stack |
| T | (a b c -- b a c) | Swap second and third items on stack |
| U | (n -- n r) | Drop items from stack until n is found |
| W | (n Vdlt Vsrc -- ) | Write n stack entires to Funge-Space |
| Z | (0string -- 0gnirts) | Reverse 0 terminated string on stack |
- B if stack is not as deep as specified will reflect
- B if n is negative, push n zeroes above v
- K moves the block
- K if end is deeper than start, reflect
- K if end or start is negative, reflect
- K with start or end deeper than stack is NOT an error
- D works like ( a b c 3 -- a a b b c c )
- U reflects if the item is not found. r is the number of dropped items,
next on stack will be the found value
- S with stack size <= 1 is NOT an error
- T with stack size <3 is NOT an error
- Both W and G will reflect on a negative count
- G must reproduce the stack written by W
"STRN" 0x5354524E
| A | (0gnirts 0gnirts -- 0gnirts) | Append bottom string to upper string |
| C | (0gnirts 0gnirts -- n) | Compare strings |
| D | (0gnirts --) | Display a string |
| F | (0gnirts 0gnirts -- 0gnirts) | Search for bottom string in upper string |
| G | (Va -- 0gnirts) | Get string from specified position |
| I | ( -- 0gnirts) | Input a string |
| L | (0gnirts n -- 0gnirts) | Leftmost n characters of string |
| M | (0gnirts s n -- 0gnirts) | n characters starting at position s |
| N | (0gnirts -- 0gnirts n) | Get length of string |
| P | (0gnirts Va -- ) | Put string at specified position |
| R | (0gnirts n -- 0gnirts) | Rightmost n characters of string |
| S | (n -- 0gnirts) | String representation of a number |
| V | (0gnirts -- n) | Retreive value from string |
- functions G and P use deltas of 1,0,0
- Specifiying a negative size for R,L,M is an error and will reflect
- For R,L requesting more characters than the length of the string will return the whole string
- For R,L,M Requesting 0 or more characters from an empty string
returns an empty string
- For M, specifying a negative start or a start beyond the end of the string is an error and will reflect
- For M, specifying a length that would go beyond the end of the string is legal and will return from the start til the end of the string
- For M, requesting zero characters from the string will return
an empty string
"SUBR" 0x53554252
| A | ( -- ) | Set absolute mode |
| C | (Va n -- Va Vd .. ) | Call a subroutine |
| J | (Va -- ) | Jump to another location |
| O | ( -- ) | Set Relative mode |
| R | (Va Vd .. n -- ..) | Return from subroutine |
- Default mode when SUBR is loaded is absolute mode.
- Mode setting is individual per IP
- Relative mode only affects the vectors from J and C. R should always return
to the point of the original Call
- J and C each set delta to 1,0,0 at target, R restores the delta before
the call.
- When C is executed, the tos specifies how many stack entries to retrieive
from the stack and then place back onto the stack after the retrurn
address and delta vectors are pushed on the stack.
- When R is executed, the tos specifies how many stack entries to retrieve
from the stack before retrieving the delta and address vectors.
The popped entries will be restored to the stack after the vectors
are popped.
- Vectors in this function work directly on the IP and not through
funge-space, therefore the IP storage offset does not apply to these
vectors.
"TIME" 0x54494D45
| D | ( -- n) | Day of Month |
| F | ( -- n) | Day since First of year |
| G | ( -- ) | Set time functions to GMT |
| H | ( -- n) | Hours |
| L | ( -- ) | Set time functions to local time (default) |
| M | ( -- n) | Minutes |
| O | ( -- n) | Month (1=January) |
| S | ( -- n) | Seconds |
| W | ( -- n) | Day of Week (1=Sunday) |
| Y | ( -- n) | Year |
"TERM" 0x5445524D
| C | ( -- ) | Clear the screen |
| D | ( n -- ) | Move cursor down n lines |
| G | (x y -- ) | Put cursor at position x,y (home is 0,0) |
| H | ( -- ) | Move cursor to home |
| L | ( -- ) | Clear to end of line |
| S | ( -- ) | Clear to end of screen |
| U | ( n -- ) | Move cursor up n lines |
"TOYS" 0x544F5953
| A | (a n -- a(n)) | Pushes n copies of a on stack |
| B | (a b -- a+b a-b) | Butterfly bit operation |
| C | (Vsrc Vsz Vdst -- ) | Low order copy of funge space |
| D | (n -- n-1) | Decrement tos |
| E | (.. -- n) | Pops all stack values and pushes back the sum |
| F | (.. x y V -- n) | Take values from the stack to place into Funge-Space creating a 2d-vector of size x,y and stored at V |
| G | (x y V -- ..) | Take 2d matrix from Funge-space at V and size x,y and push onto stack |
| H | (a b -- v) | Shift a left on +b, right on -b |
| I | (n -- n+1) | Increment tos |
| J | (n -- ) | Translates current column north (negative) or south (positive) n times |
| K | (Vsrc Vsz Vdst -- ) | High order copy of funge space |
| L | ( -- n) | Get value to left of the ip's track |
| M | (Vsrc Vsz Vdst -- ) | Low order move of funge space |
| N | (n -- -n) | Negate tos |
| O | (n -- ) | Translates current row west (negative) or east (positive) n times |
| P | (.. -- n) | Pops all stack values and pushes back the product |
| Q | (n -- ) | Puts value in cell directly behind ip |
| R | ( -- n) | Get value to right of the ip's track |
| S | (v Vsz Vorg -- ) | Fill area with value v |
| T | (n -- ) | Pop value off of stack, if 0 then act like _, if 1 act like |, if 2 act like m |
| U | ( -- ) | Replaces itself with < > ^ v h or l |
| V | (Vsrc Vsz Vdst -- ) | High order move of funge space |
| W | (n V -- ) | Wait, see notes |
| X | ( -- ) | Increments IP's delta X |
| Y | ( -- ) | Increments IP's delta Y |
| Z | ( -- ) | Increments IP's delta Z |
- The W command takes a vector off the stack and then a value, if the
cell at the vector in Funge-Space is equal to the value then
nothing happens. If the cell in space is less than the value then
both the value and vector are pushed back onto the stack and the IP
moves backwards along its delta such that its next instruction will
be the W again. If the cell in space is greater than the value
then this cammand acts like r.
"TRDS" 0x54524453
| C | ( -- ) | Continue normal time |
| D | (V -- ) | Set absolute destination space coordinates |
| E | (V -- ) | Set relative destination space corrdinates |
| G | ( -- n) | Get current time point |
| I | ( -- ) | Set inverse settings |
| J | ( -- ) | Initiate a jump |
| P | ( -- n) | Maximum distance in the past ip can jump to |
| R | ( -- ) | Reset all tardis controls to default |
| S | ( -- ) | Stop time |
| T | (n -- ) | Set absolute destination time |
| U | (n -- ) | Set relative destination time |
| V | (V -- ) | Set destination vector |
| Notes to time travelling ips: |
| Usage of time travel can be very punishing on the performance of the funge
interpreter. If travel is performed to the past, the interpreter must be
capable of reproducing all conditions that existed at the destination time,
which includes all ips, stacks, and funge space cells. Some interpreters
may only store time snapshots from only so far back (The furthest point in
the past that can be jumped to can be determined with the P command). The
RCS interpreter essentially reruns from point 0 and therefore all points in
time can be jumped to (note: this can be quite time consuminmg if the
destination time point is tens or hundreds of thousands of instructions from
time point 0). |
| Time travel into the future is not quite so punishing. The ip that time
travels will merely be frozen until time catches up with it, at which point
it will continue to execute. |
Time travel into the past has the following consequences:
- It is not possible to travel further back than time point 0. Attempts
to travel beyond the beginning will leave the ip at time point 0.
- The original ip will still be born as per normal. example. If ip #2
is born at time 100 and then performs a jump at time 200 to time 50, ip #2
will be born again at time 100, and there will now be 2 of them (the newly
born ip #2 in addition to the one that jumped) When the newly born ip #2
reaches the time it jumped (time point 200) it will cease to exist, it will
not perform another jump into the past, the original ip #2 however can
still jump. If the new ip #2 performs a time jump earlier than when the
original jumped, the original will cease to exist.
- An ip travelling in the past can kill its parent prior to its own birth,
and will still exist.
- A time travelling ip will retain its memory, in other words, its stack
will be the same after the jump as before. Also, unless the jump also
included a space jump, the location will be the same physical space
coodinates as when it jumped.
- An ip that perfroms a time jump without a space jump will execute the
next instruction as if it had never jumped.
- An ip that performs a space jump (with or without a time jump) will
first execute the instruction it jumped to.
|
| When Multiple IPs Time Travel: |
| In order to decrease the work on the interpreter, it is not necessary for
the interpreter to remember future events. In other words when an ip travels
back in time, everything occuring after the time point of destination need
not recur if it does not occur in the further course of the program. When
IPs time travel, only those ips that are currently in funge space at the time
of arrival (either normally or from time travelling) will exist. Any ips
that time travelled to a point later in time will not recur, unless the
original time travel for these ips recur. Here are two examples to illustrate
this point: |
| Example 1: Ip#1 travels back in time and arrives to time point 100, Ip#2
travels back to point 150. At point 150 the time travelled copies of both
ips will exist. |
| Example 2: Ip#1 travels back in time and arrives to time point 150, Ip#2
travels back to point 100. At the point where ip#2 arrives, ip#1 has not
yet arrived and therefore does not exist, it will also not exist when time
point 150 arrives, only when the original jump for Ip#1 occurs, will
history again be rewritten. |
| Tardis Operators Manual: |
- Before attempting any jumps, the ip's tardis should be reset to clear
out any unwanted coordinates.
- There are three coordinate settings: Space coordinates, vector after jump,
and destination time. Any coordinate that is not set will remain at the
last setting, or at default if the tardis is reset.
- Default coordinates are the current time, space, and vector.
- Absolute coordinates are based from time point 0, and space 0,0,0.
- Relative coordinates are based from the point the jump is actually made.
- All tardis coordinates are retained following a jump.
- The I command will set the tardis for the last source jump point.
|
| Stopping Time: |
| An ip that issues a <S>top time command freezes the time counter. All other
ips will be frozen until a <C>ontinue time command is executed. During the
time that time is stopped, only the ip that executed the S command will
continue to run. For the purposes of time travel, the time used while time
is stopped does not actually exist, and therefore cannot be jumped to. In
other words everything the ip does is considered to have taken no time. If
an ip that stops time is terminated, time will be continued |
"TRGR" 0x54524752
| A-Y | ( -- ) | Activate a trigger |
| Z | (V -- ) | Specify where trigger table is located |
- When an IP executes a trigger a new IP is created that will then run
concurrently with the rest of the IPs. The new IP will be generated
in the same from as t, but will contain the position associated with
the relevent entry in the trigger table
- The original IP is unaffected and continues to run normally after having
executed the trigger
- The trigger table contains executable code for the new IP, the code for
A begins at the trigger table vector, B starts at the same X one line
lower, C below that, etc
- Both the original IP and the new IP will have the uid of the other pushed
onto its stack
"TURT" 0x54555254
| A | ( -- h) | Query heading (0=east) |
| B | (d -- ) | Move backwards d pixles |
| C | (rgb -- ) | Set pen color to 24-bit RGB value |
| D | (f -- ) | Set display on (f=1) or off (f=0) |
| E | ( -- p) | Query pen position down=1, up=0 |
| F | (d -- ) | Move forward d pixels |
| H | (h -- ) | Set heading to h (in degrees, 0=east) |
| I | ( -- ) | Print drawing (not implemented yet) |
| L | (d -- ) | Turn left d degrees |
| N | (rgb -- ) | Clear with 24-bit RGB color |
| P | (p -- ) | Set pen position, 0=up, 1=down |
| Q | ( -- x y) | Query pen position |
| R | (d -- ) | Turn right d degrees |
| T | (x y -- ) | Teleport pen to position |
| U | ( -- minX minY maxX maxY) | Query bounds |
- The Cats-Eye specification for the TURT extension does not specify
in which order values are placed on the stack when multiple values are
present, so this may be implementation dependant.
"WIND" 0x57494E44
| B | (x1 y1 x2 y2 h -- ) | Draw a box |
| C | (h -- ) | Close GC |
| D | (h -- ) | Drop (lower) Window |
| E | (h -- ) | Call event checker |
| I | (Va e h -- ) | Install event handler
| e | function |
| 1 | - Mouse Down |
| 2 | - Mouse Up |
| 3 | - Mouse Motion |
| 4 | - Key Pressed |
| 5 | - Expose |
| 6 | - Configuration |
|
| K | (h -- ) | Kill a window |
| L | (x1 y1 x2 y2 h -- ) | Draw a line |
| M | (x y h -- ) | Move a window |
| O | (h -- ) | Open GC |
| P | (x y h -- ) | Draw a point |
| R | (h -- ) | Raise Window |
| S | (x y h -- ) | resize a window |
| T | (0gnirts x y h --) | Draw text in a window |
| W | (x y w h -- h) | Open a window |
- Drawing commands: B, L, P, and T require an open GC
Mini-Funge:
When a fingerprint is requested that is not built into the interpreter,
RC/Funge will search for a file corresponding to the fingerprint. The
filename is built from the ascii characters associated with the fingerprint
and using an extension of 'fl'.
example fingerprint: 0x524F4D41 would search for file ROMA.fl
If the file is found it is loaded as the semantics for the overloaded
functions. The file must be in the funge-lib file format.
The following commands are not available in Mini-Funge:
| ( | (gnirts n -- ) | Overload functions A-Z |
| ) | (gnirts n -- ) | Unload functions A-Z |
| = | (0gnirts -- n) | Pass string to underlying system |
| h | ( -- ) | Sets ip delta to 0,0,1 |
| i | (v f 0gnirts -- vs vo) | Load a file, Acts as r on failure |
| l | ( -- ) | Sets ip delta to 0,0,-1 |
| m | (n -- ) | Does l if tos is zero else h |
| o | (vs vo 0gnirts -- ) | Write funge space to file |
| q | (n -- ) | Immedietly quit program, tos is return code |
| t | ( -- ) | Start new thread |
| u | ( -- ) | Transfer entries between soss and toss |
| x | (x y z -- ) | Set ip delta from stack |
| { | (n -- ) | Begin Block |
| } | (n -- ) | End Block |
The following commands have altered functions in Mini-Funge:
| ' | ( -- c) | Push next mini-funge cell onto stack |
| @ | ( -- ) | Terminate mini-funge program |
| g | (v -- n) | Get value stored in main funge-space cell |
| p | (n v -- ) | Put value into main funge-space cell |
The following are commands added to Mini-Funge:
| B | ( -- ) | Move calling ip backwards one delta unit |
| D | (v -- ) | Set delta of calling ip |
| E | (.. -- n) | Push depth of stack |
| F | ( -- ) | Move calling ip forwards one delta unit |
| G | (v -- n) | Get value stored in mini funge-space cell |
| K | (.. n -- .. n) | Forth Pick command |
| L | (v -- ) | Set location of calling ip |
| O | ( .. n -- .. n) | Forth Roll command |
| P | (n v -- ) | Put value into mini funge-space cell |
| R | ( -- ) | Reflect the delta of calling ip |
Unless otherwise noted above, accesses to funge space access the mini-
funge space. All stack access are from the stack of the calling ip.
An entire mini-funge program executes in a single tick in comparison
to other concurent funge ip pointers.
funge-lib file format:
A funge-lib file contains the funge source code for commands which can be
loaded into A-Z with the ( command.
Each command starts with a line beginning with = and an uppercase letter.
All lines up til the next = line are the funge source lines for the function.
Example: Here is a funge-lib file describing Cat's-eye's ROMA extension:
=I
1@
=V
5@
=X
a@
=L
a5*@
=C
aa*@
=D
aa5**@
=M
aaa**@
Debugger:
| back | - Move ip backward by its delta |
| del bp x [y [z]] | - Delete a breakpoint |
| del trap c | - Delete a command trap |
| drop | - Drop top entry from stack |
| fore | - Move ip forward by its delta |
| pop | - Pop and display top of stack |
| push n | - Push a number onto the stack |
| quit | - Quit program |
| run | - Prevent single stepping on current ip |
| set bp x [y [z]] | - Set a breakpoint |
| set cell v x [y [z]] | - Set value in specified funge cell |
| set ip delta x [y [z]] | - Set ip delta |
| set ip pos x [y [z]] | - Set ip position |
| set trap c | - Set a command breakpoint |
| show bp | - Show breakpoints |
| show cell x [y [z]] | - Show value in specified funge cell |
| show ip | - Show ip information |
| show ipdetails [n] | - Show detailed information about ip |
| show ips | - Show information on all ips |
| show fingers | - Show A-Z overloaded fingerprints |
| show mapper | - Show instruction mappings |
| show stack | - Show stack for current ip |
| show stacks | - Show entries in all stacks |
| show time | - Show current time point |
| show traps | - Show command breakpoints |
| steps n | - Allow the current ip to step n instructions |
| - Step one instruction |
Note: Any single character command will be executed as the associated
funge instruction (example, . will do the same as pop, with only a single
keystroke.)