"SUBR" Subroutine extension
Fingerprint ID: | 0x53554252 |
New in version 0.5-rc2.
This fingerprint, from RC/Funge-98, implements a function call to arbitrary Funge code and a return from it. It provides the following commands:
- A : —
- Sets the absolute mode, so the jump location is independent to IP’s storage offset. This is a default behavior.
- C : a1 ... an posv n — origposv origdeltav a1 ... an
- Calls a subroutine at pos and saves the original position and delta as origpos and origdelta. After the call IP travels towards right. It pops n items from the stack as well, and moves them to the top of the stack. Reflects if n is negative.
- J : posv —
- Jumps to given pos, and make IP travels towards right. It doesn’t store any return information.
- O : —
- Sets the relative mode, so the jump location is relative to IP’s storage offset.
- R : origposv origdeltav a1 ... an n — a1 ... an
- Returns from a subroutine and restores the position and delta to origpos and origdelta, respectively. It also pops n items from the stack and moes them to the top of the stack. Reflects if n is negative.