Esempio n. 1
0
        public Brainfuck(string sourceCode, outputCallback outcb, inputCallback incb, breakpointCallback bpcb)
        {
            code = sourceCode;
            memory = new char[MEMORY_SIZE];
            stack = new int[STACK_SIZE];

            pc = 0;
            mc = 0;
            sc = 0;
            rc = 0;

            handleOutput = outcb;
            handleInput = incb;
            handleBreakpoint = bpcb;
        }
Esempio n. 2
0
        public Lolcode(string sourceCode, outputCallback outcb, inputCallback incb, breakpointCallback bpcb)
        {
            GenerateActions();

            running = true;

            code = ProcessCode(sourceCode);
            memory = new char[MEMORY_SIZE];
            stack = new int[STACK_SIZE];

            pc = 0;
            mc = 0;
            sc = 0;

            handleOutput = outcb;
            handleInput = incb;
            handleBreakpoint = bpcb;
        }