private function _init() { $this->_WhirlMemory = WhirlMemory::instance(); $this->_program = array(); $this->_rings = array(new WhirlMathRing(), new WhirlOpsRing()); $this->_currentRing = 0; $this->_currentPosition = 0; }
protected function RINGFUNC_Equal() { if ($this->_getValue() === WhirlMemory::instance()->getValue()) { $this->_setValue(1); } else { $this->_setValue(0); } }
protected function RINGFUNC_AscIO() { if ($this->_getValue() === 0) { WhirlMemory::instance()->setValue((int) ord(WhirlParser::instance()->input())); } else { WhirlParser::instance()->output(chr(WhirlMemory::instance()->getValue())); } }