Write an interactive Deadfish interpreter Deadfish is a joke "programming language" with four commands. Because the Esolang page is a bit contradictory and the interpreters on that page don't all work exactly the same, you should implement the following variation:



Specification


There is an accumulator which is at least 16 bits in size, more is allowed but less is not. Negative numbers do not need to be supported. The accumulator is 0 when the program starts.
There are the following two sets of four commands, and your program must support both at the same time. 

  Standard Deadfish    │   XKCD Variant   │    Meaning
  ─────────────────────┼──────────────────┼────────────────────────────────────
        i              │        x         │    Increment accumulator
        d              │        d         │    Decrement accumulator
        s              │        k         │    Square ( acc = acc * acc )
        o              │        c         │    Output accumulator, as a number

If, after executing a command, the accumulator is either -1 or 256, the accumulator must be reset to zero. Note that this is not normal wrap-around. If, say, the accumulator is 20, and the s command is run, the accumulator should be 400 afterward. Similarly, if the accumulator is 257 and the d command is run, the accumulator should become 0. 
Any input that isn't one of these commands should be ignored. 




Test programs


xiskso should output 0
xiskisc should output 289




I/O

Your program should display a prompt: &gt;&gt;. The prompt must be at the beginning of a new line. It should then read a line of user input, and run the given commands left-to-right. When outputing numbers, the numbers must be separated. I.e., 12 34 is OK, 12,34 is OK, 

12
34 


is OK, but 1234 is not.

Your program should keep doing this in a loop, at least until EOF is reached.

Example session:

&gt;&gt; xiskso
0
&gt;&gt; xiskisc
289
&gt;&gt; ddddo ddddo
285
281
&gt;&gt; ddddo ddddo
277
273
&gt;&gt; dddddddo
266
&gt;&gt; dddddddddo
257
&gt;&gt; do
0
&gt;&gt; do
0
&gt;&gt; io
1
&gt;&gt;
Perl 5, 90 bytes



do{print+(map{$?+=/i|x/-/d/;$?**=1+/s|k/;$?=~s/-1|^256$/0/;"$?
"x/o|c/}/./g),'&gt;&gt; '}while&lt;&gt;


Try it online!

Thanks to @xfix for his help on this previously! Saved 4 bytes thanks to @Xcali!