public void renumberAdresses(uint fromLine, int shift) { uint tmpCounter = _counter; resetCounter(); while (_current < _bottom) { string progLine = getCurrentLine(); RPN_Function fn = _parent._m_RPN_Functions.getFunctionByName(progLine); if (fn != null && fn.containsPC()) { int operand = fn.Name().Length; string addrStr = progLine.Substring(operand); addrStr = modifyAddress(addrStr, fromLine, shift); replaceLine(fn.Name() + addrStr); } incrementCounter(); } setCounter(tmpCounter); }
public void execute(string command) { for (int i = 0; i < _functions.Count; i++) { RPN_Function pf = _functions[i]; if (!pf.checkName(command)) { continue; } int operand = pf.Name().Length; pf.execute(_parent, command.Substring(operand)); pf.advancePC(_parent); return; } rpnStack.setLabel(0, command); progMem.incrementCounter(); }