Beispiel #1
0
        public void Execute()
        {
            void loopBody()
            {
                _done.Set(0);

                Comment("Use current Op to find the op handler address, then indirect JMP");
                HandlerList.GoTo(X.Set(_liveQueue.Peek()));

                _executeLoopContinue.Write();
                _liveQueue.Pop();
            }

            _liveQueue.Read(Y, () => {
                Loop.Infinite(_ => {
                    if (_options.Contains(Option.Pause))
                    {
                        Pause.ExecuteBlockWrapper(loopBody);
                    }
                    else
                    {
                        loopBody();
                    }
                });
                _executeLoopBreak.Write();
            });
        }
        public void Execute()
        {
            Action loopBody = () => {
                _done.Set(0);

                Comment("Use current Op to find the op handler address, then indirect JMP");
                HandlerList.GoTo(X.Set(_liveQueue.Peek()));

                _executeLoopContinue.Write();
                _liveQueue.Pop();
            };

            var pause = Op <Pause>();

            _liveQueue.Read(Y, () => {
                Loop.Infinite(_ => {
                    if (pause != null)
                    {
                        pause.ExecuteBlockWrapper(loopBody);
                    }
                    else
                    {
                        loopBody();
                    }
                });
                _executeLoopBreak.Write();
            });
        }