pIRCIS

The programs

Every program that comes with pIRCIS, in the folders PROG shows them in. Copy one and paste it in: Ctrl/Cmd-V on the emulator, PASTE FROM THE CLIPBOARD under PROG > New program on the phone. A runner starts at the top left, heading east, unless the program says otherwise.

Written one of your own? Send it in through GitHub, with a name and a line about what it does, and it can go on this page under Contributed.

Counting

Backwards source

>'20.&N...................v
v.........................<
>&1.@N.'21.'-.'21.'-.#" "#v
^?.............N&.-'.N@.1'<
.>$!.......................

Count to 20 source

>'20.&N.v...........
v.......<...........
>&1.@N.'21.'-.#" "#v
^?......N&.-'.N@.1'<
.>$!................

Countdown source

>'10.&N.v......
v.......<......
>&1.@N.#" "#..v
^?.N&.-'.N@.1'<
.>"OG"##!......

Cubes source

>'8.&N.v.......................
v......<.......................
>&1.@N.'9.'-.@0.@0.'*.'*.#" "#v
^?.................N&.-'.N@.1'<
.>$!...........................

Divide 720 source

>'12.&N....................v
v..........................<
>&1.@N.'13.'-.'720.'/.#" "#v
^?..............N&.-'.N@.1'<
.>$!........................

Doubles source

>'12.&N.....................v
v...........................<
>&1.@N.'13.'-.&I.@I.'+.#" "#v
^?...............N&.-'.N@.1'<
.>$!.........................

Doubling source

>'10.&N.'1.&P.v..........
v.............<..........
>&2.@P.#" "#@P.'2.'*.&P.v
^?...........N&.-'.N@.1'<
.>$!.....................

Down By Three source

>'10.&N.........................v
v...............................<
>&1.@N.'11.'-.'3.'*.'33.'-.#" "#v
^?...................N&.-'.N@.1'<
.>$!.............................

Eleven Times source

>'12.&N............................v
v..................................<
>&1.@N.'13.'-.&I.'10.'*.@I.'+.#" "#v
^?......................N&.-'.N@.1'<
.>$!................................

Even Numbers source

>'10.&N.v.................
v.......<.................
>&1.'2.@N.'*.'22.'-.#" "#v
^?............N&.-'.N@.1'<
.>$!......................

Fahrenheit source

>'10.&N..........................v
v................................<
>&1.@N.'11.'-.'18.'*.'32.'+.#" "#v
^?....................N&.-'.N@.1'<
.>$!..............................

Fibonacci source

>'10.&N.'0.&A.'1.&B.v......
v...................<......
>&3.@A.#" "#@A.@B.'+.&T...v
^?.N&.-'.N@.1'.B&.T@.A&.B@<
.>$!.......................

Halving 1024 source

>'10.&N.'1024.&D.&1......v
v........................<
>&1.@N.'11.'-.@D.'/.#" "#v
^?............N&.-'.N@.1'<
.>$!......................

Halving source

>'10.&N.'1024.&P.v.......
v................<.......
>&2.@P.#" "#'2.@P.'/.&P.v
^?...........N&.-'.N@.1'<
.>$!.....................

Leftovers source

>'12.&N....................v
v..........................<
>&1.@N.'13.'-.'100.'%.#" "#v
^?..............N&.-'.N@.1'<
.>$!........................

Nine Times source

>'12.&N.'0.&A.&1..................v
v.................................<
>&1.@N.'13.'-.&1.@A.'9.'+.&A.#" "#v
^?.....................N&.-'.N@.1'<
.>$!...............................

Oblong Numbers source

>'10.&N........................v
v..............................<
>&1.@N.'11.'-.@0.'1.'+.'*.#" "#v
^?..................N&.-'.N@.1'<
.>$!............................

Odd Numbers source

>'10.&N.v.................
v.......<.................
>&1.'2.@N.'*.'21.'-.#" "#v
^?............N&.-'.N@.1'<
.>$!......................

Pi source

>'5.'1600000002.'/.&P.&1.'375.'1600000187.'/.@P.'-.&P.&1....................v
v.......1&.P&.-'.P@./'.7343720061'.578645'.1&.P&.+'.P@./'.2187000061'.52651'<
>'17578125.'1608789062.'/.@P.'+.&P.&1.'537109375.'1868554687.'/.@P.'-.&P.&1.v
v.........1&.P&.+'.P@./'.878774024'.75755904'.1&.P&.-'.P@./'.911000004'.932'<
>'300000000.@P.'-.".3">#v....................................................
......................^.<....................................................

Quarters source

>'12.&N...........................v
v.................................<
>&1.@N.'13.'-.&I.@I.'+.'2.'*.#" "#v
^?.....................N&.-'.N@.1'<
.>$!...............................

Running Total source

>'10.&N.'0.&S.v..........
v.............<..........
>&2.@N.@S.'+.&S.@S.#" "#v
^?...........N&.-'.N@.1'<
.>$!.....................

Seven Times source

>'12.&N.'7.&T.v...........
v.............<...........
>&1.@N.'13.'-.@T.'*.#" "#v
^?............N&.-'.N@.1'<
.>$!......................

Sevens Plus One source

>'1.&N..................v
v.......................<
>&1.@N.'7.'*.'1.'+.#" "#v
^?.-'.11'.N@.N&.+'.N@.1'<
.>$!.....................

Squares source

>'10.&N.v.................
v.......<.................
>&1.@N.'11.'-.@0.'*.#" "#v
^?............N&.-'.N@.1'<
.>$!......................

Threes source

>'12.&N.v.................
v.......<.................
>&1.@N.'13.'-.'3.'*.#" "#v
^?............N&.-'.N@.1'<
.>$!......................

Deciding

Coin Flip source

>'200311296.r'*.'118489298.'+.%!....
...no branch at all: r gives 0 or 1,
...which picks between two constants
...that % prints as HEADS and TAILS.

Dog Name source

r?r?v.............................
.r.v..............................
.?v...............................
.>....>&2.'40541018.%'2215.%" "#.v
..>...>&2.'75947.%" "#...........v
...>..>&2.'2991986.%" "#.........v
....>.>&2.'60935016.%'43.%" "#...v
v................................<
>r?r?v............................
..r.v.............................
..?v..............................
..>...>&2.'25872174.%'2221.%.....!
...>..>&2.'93775839.%............!
....>.>&2.'175831207.%...........!
.....>>&2.'62507102.%'2860.%.....!

Dumb Clock source

>'1.R?..........v........
.....>&1.v......v........
v..."am."<......>&1.v....
v..."pm."...........<....
>'11.R'1.'+.&H.'59.R&M.v.
v......................<.
>&2.'10.@M.'%.'10.@M.'/.v
v.......................<
>":"@H." si emit ehT">#v.
.....................^.<.

Fortune source

>'3.R&K.v...............................................................
........?>&1.".snigeb yenruoj A">#v.....................................
........v.......................^.<.....................................
........>'1.@K.'-.&K.v..................................................
.....................v..................................................
.....................?>&2.".raen si htlaeW">#v..........................
.....................v.....................^.<..........................
.....................>'1.@K.'-.&K.v.....................................
..................................v.....................................
..................................?>&3.".yadseuT fo eraweB">#v..........
..................................v........................^.<..........
..................................>'1.@K.'-.&K.v........................
...............................................v........................
...............................................?>&4.".yrgnuh era uoY">#v
.....................................................................^.<

Magic Eight Ball source

r?r?v..........................
.r.v...........................
.?v............................
.>....>&2.".niatrec si tI">#v..
..........................^.<..
..>...>&2.".retal niaga ksA">#v
............................^.<
...>..>&2.".luftbuod yreV">#v..
..........................^.<..
....>.>&2.".tbuod a tuohtiW">#v
............................^.<

True Or False source

>r?"eurt"####....v.......................
..>"eslaf"#####v.........................
...............>.>"."#!..................
..a branch whose two arms meet again:....
..each prints a counted number of........
..characters, so both can reach one tail.

Decoding

Base 64 source

>'7.'64.'*.'4.'+.'64.'*.'0.'+.'64.'*.'3.'+.'64.'*.'18.'+.&N.%" = "###@N.#$v
v.........................................................................<
>'HEADS.&N.%" = "###@N.#!..................................................
...........................................................................
..one number, reached two ways, printed twice each way.....................
...........................................................................
..row 0 does it by hand. HEADS in base64 is the digits 7 4 0 3 18,.........
..and row 0 multiplies by 64 and adds the next digit, five times over......
..no base64 anywhere in it, just arithmetic................................
...........................................................................
..row 2 writes 'HEADS. and lets the language read it. same number..........
...........................................................................
..% prints a number as base64 and # prints the same number in base 10,.....
..which is why each line shows it both ways................................

Binary source

>'14.........v..Prints
v............<..binary
............in reverse
>.?.*>.'2.@1.'%..#.!..
....v.................
....>......v..........
^./'.1@.2'.<..........

Insult Machine source

>'999.R&1.'42.R&1.'690590.%" "#'2985.%" "#'12725089.%" "#'13274027.%" "#v
v........#" "%.8319089'#" "%.604702'#" "%.4292'%.561238085'#" "%.159661'<
>'498756018.%...........................................................v
........................................................................!

Morse Decoder source

>'0.'1111.'1.'1211.'1211.'222..................................................................v
....^^^ your morse goes here -- one code per letter, left to right, after the '0...............v
....    1 is a dit (.)   2 is a dah (-)   so '1111.'1.'1211.'1211.'222. is HELLO...............v
....    five letters maximum -- a sixth overflows the answer and prints nonsense...............v
v.............................................................................1&.W&.1'.1&.A&.0'<
v..............................................................................................<
>&R.&1.@R.?...................................................................................v.
..........>@A.%$!...............................................................................
v.............................................................................................<.
>&1.'1.&I.&1.'10.@R.'%.&G.&1.'10.@R.'/.&R.&1.'2.'1.@G.'-.@G.'*.'/.&B.&1......................v..
v...................1&.R&./'.R@.01'.1&.G&.%'.R@.01'.1&.I&.+'.*'.M@.I@.B@.1&.M&.-'.+'.G@.1'.B@<..
>'2.'1.@G.'-.@G.'*.'/.&B.&1.@B.'1.@G.'+.'-.&M.&1.@B.@I.@M.'*.'+.&I.&1.'10.@R.'%.&G.&1........v..
v........1&.I&.+'.*'.M@.I@.B@.1&.M&.-'.+'.G@.1'.B@.1&.B&./'.*'.G@.-'.G@.1'.2'.1&.R&./'.R@.01'<..
>'10.@R.'%.&G.&1.'10.@R.'/.&R.&1.'2.'1.@G.'-.@G.'*.'/.&B.&1.@B.'1.@G.'+.'-.&M.&1.............v..
v..................1&.Z&.0'.1&.P&.%'.K@.5'.1&.Q&./'.K@.5'.1&.K&.-'.I@.2'.1&.I&.+'.*'.M@.I@.B@<..
>@Z.'0.@Q.'-.&T.&1.@T.@T.'*.'1.'+.'1.'/.'72123200.'*.'+.&Z.&1................................v..
v...............................1&.Z&.+'.*'.665850602'./'.1'.+'.1'.*'.T@.T@.1&.T&.-'.Q@.1'.Z@<..
>@Z.'2.@Q.'-.&T.&1.@T.@T.'*.'1.'+.'1.'/.'338256775.'*.'+.&Z.&1...............................v..
v................................1&.Z&.+'.*'.22536791'./'.1'.+'.1'.*'.T@.T@.1&.T&.-'.Q@.3'.Z@<..
>@Z.'4.@Q.'-.&T.&1.@T.@T.'*.'1.'+.'1.'/.'267998718.'*.'+.&Z.&1...............................v..
v.............1&.Z&.0'.1&.C&.Z@.1&.Z&.+'.*'.623787482'./'.1'.+'.1'.*'.T@.T@.1&.T&.-'.Q@.5'.Z@<..
>@Z.'0.@P.'-.&T.&1.@T.@T.'*.'1.'+.'1.'/.'16777216.'*.'+.&Z.&1................................v..
v..................................1&.Z&.+'.*'.441262'./'.1'.+'.1'.*'.T@.T@.1&.T&.-'.P@.1'.Z@<..
>@Z.'2.@P.'-.&T.&1.@T.@T.'*.'1.'+.'1.'/.'4096.'*.'+.&Z.&1....................................v..
v......................................1&.Z&.+'.*'.46'./'.1'.+'.1'.*'.T@.T@.1&.T&.-'.P@.3'.Z@<..
>@Z.'4.@P.'-.&T.&1.@T.@T.'*.'1.'+.'1.'/.'1.'*.'+.&Z.&1.@Z.&V.&1..............................v..
v.........................1&.W&.*'.W@.46'.1&.A&.+'.*'.W@.U@.A@.1&.U&.%'.U@.46'.1&.U&./'.C@.V@<..
>..............................................................................................^

Talking

Advice source

>".niaga no "v
.>"T">#v....."
."...^.<.....d
.u...........n
.r...........a
."..........."
.^"n it off "<

Excuse source

>".dirg eht ffo llef rennur ehT">#v
................................^.<

Greeting source

>".di"v.....>" mo"v.....>"H">#v
......"....."....."....."...^.<
......r.....a.....r.....e......
......g..... .....f.....l......
......"....."....."....."......
......>" D2"^.....>" ol"^......

Hello World source

>"!dlroW olleH">#v
...............^.<

Liquor Jugs source

>".sguj rouqil nezod evif htiw xob ym kcaP">#v
...........................................^.<

Morse A to M source

>"--M ..-.L -.-K ---.J ..I ....H .--G .-..F .E ..-D .-.-C ...-B -.A">#v
....................................................................^.<

Morse N to Z source

>"..--Z --.-Y -..-X --.W -...V -..U -T ...S .-.R -.--Q .--.P ---O .-N">#v
......................................................................^.<

Quick Brown Fox source

>".god yzal eht revo spmuj xof nworb kciuq ehT">#v
...............................................^.<

SOS source

>"... --- ...">#v
..............^.<

Two Dimensions source

>".eno naht re"v.
v"ons are bett"<.
>"isnemid owT">#v
..............^.<

Warning source

>'5133.'997.'*.'523.'+.%" "#'701408.'997.'*.'203.'+.%..................v
v...................#" "%.+'.353'.*'.799'.1977'#" "%.+'.507'.*'.799'.1'<
>'666984.'997.'*.'602.'+.%'2.'997.'*.'534.'+.%" ."##...................v
......................!#"."%.+'.05'.*'.799'.0'%.+'.745'.*'.799'.497213'<

Watching

Bounce source

>v..........>v..........>v..
.>v........>^>v........>^>v.
..>v......>^..>v......>^..>v
...>v....>^....>v....>^....!
....>v..>^......>v..>^......
.....>v>^........>v>^.......
......>^..........>^....~ns.

Circuit source

>..........................v
............................
............................
............................
............................
............................
............................
<.......................~ns<

Comb source

v....>v....>v....>v....!
........................
..>v....>v....>v....>v..
....................~nts
........................
>.^>.^>.^>.^>.^>.^>.^>.^

Dice Roll source

>'5.R'1.'+.&D.&K.v..........
v................<....<.....
>&2.@K.?*>'1.@K.'-.&K.^.....
.......vv...................
........>....v..............
........^....<..............
v......<....................
>&1.@D." dellor evah uoY">#v
.........................^.<

Dumb Pi source

>'5.'1600000002.'/.&P.&1.'375.'1600000187.'/.@P.'-.&P.&1....................v
v.......1&.P&.-'.P@./'.7343720061'.578645'.1&.P&.+'.P@./'.2187000061'.52651'<
>'17578125.'1608789062.'/.@P.'+.&P.&1.'537109375.'1868554687.'/.@P.'-.&P.&1.v
v.........1&.P&.+'.P@./'.878774024'.75755904'.1&.P&.-'.P@./'.911000004'.932'<
>'300000000.@P.'-.".3"###...................................................v
v...........................................................................<
>'9.R#v......................................................................
^.....<......................................................................

Four Ways source

.............!..............
............................
.............^..............
!...........<*>............!
.............v..............
............................
.............!......~ns3,13.

Lottery source

>'6.&N.v.............
v......<.............
>&1.'48.R'1.'+.#" "#v
^?.......N&.-'.N@.1'<
.>$!.................

Motto source

>..*>" "*>'42314476.@1..*>@0.*>'75678...*>.v
...v....v...............v....v..........v...
...'....*>#%v.....v...%#<....#....v....%<...
5..8....v...>v...............'..............
1............................8..............
6..%....*>.v.<....................>.....v...
2.......v..>v................%..............
7...........>v...............#..............
'..!....!....!....>.....!....!....!.....<...
!...................~st8,N..................
^..........................................<

Nothing To See source

It looks like nothing much, even.............
when you read it twice. There's nothing here.
Every word of it is ordinary if you check....
It is a note about nothing, arranged plainly.
These lines are the sort you could skim past.
Nobody would give it a quick inspection......
It says nothing much, and does nothing.......
There is no trick here at all. Nothing.......
Not a word of it, not even 15% of it.........
There is nothing here, at all! Nothing.......

Race source

>'80.R*>'80.R*>'80.R*>'80.R*>!..
......v......v......v......v....
......p......p......p......p....
~ns.............................
................................
................................
................................
................................
................................
......!......!......!......!....

Racetrack source

v..pIRCIS GRAND PRIX -- three runners, five random pit stops each...............
*>'1.'10.p'9.Rp......v...........>'14.Rp.....v...........>'11.Rp.....#!.........
v....................>'4.Rp......^...........>'6.Rp......^......................
v...............................................................................
v..==========================================================================...
v...............................................................................
*>'2.'5.p.'14.Rp.....v...........>'11.Rp.....v...........>'4.Rp......#!.........
v....................>'6.Rp......^...........>'9.Rp......^......................
v...............................................................................
v..==========================================================================...
v...............................................................................
>>'3.'0.p.'11.Rp.....v...........>'4.Rp......v...........>'6.Rp......#!.........
.....................>'9.Rp......^...........>'14.Rp.....^......................
...the finishing order is the output. place your bets...........................
.............................................................................~nm

Serpent source

v.>.v.>.v.>.v.>.v.>.v.>.v.>.!.
..............................
..............................
..............................
..............................
...........................~ns
..............................
..............................
..............................
>.^.>.^.>.^.>.^.>.^.>.^.>.^...

Snake source

>............................v
v............................<
>............................v
v............................<
>............................v
v............................<
>............................v
v............................<
>............................v
v~ns.........................!

Spiral source

>.............................v
>............................v.
.>..........................v..
..>........................v...
...>......................v....
....!.....................<....
...^.......................<...
..^........~nts.............<..
.^...........................<.
^.............................<

Staircase source

>v..........................
.>v.........................
..>v........................
...>v.......................
....>v......................
.....>v.....................
......>v....................
.......>........!.......~nst