public override byte tick(byte scancode) { LCD_Manager lm = _parent._m_Hardware_LCD; Program_Memory pm = _parent._m_Program_Memory; lm.updateStatusPC(pm.getCounter()); lm.updateStatusMC(_parent._m_Extended_Memory.getCounter()); lm.updateStatusDMODE(pm.getEModeName()); int display_PC = (int)pm.getCounter(); string[] _displayLines = pm.getPreviousLines(LCD_Manager.SCREEN_ROWS - 1); for (int i = 10, j = 0, k = display_PC; i >= 0; i--, j++, k--) { if (k < 0) { lm.eraseTerminalLine((uint)i); continue; } string s = k.ToString("0000"); s += (k == display_PC) ? "> " : " "; lm.updateTerminalLine((uint)i, s + _displayLines[j]); } lm.requestUpdate(); return(0); }
public override void activate(string prevReceiver) { base.activate(prevReceiver); if (prevReceiver.StartsWith("PROG")) { tick(0); return; } LCD_Manager lm = _parent._m_Hardware_LCD; Program_Memory pm = _parent._m_Program_Memory; lm.clearScreen(); lm.outputStatus( pm.getCounter(), _parent._m_Extended_Memory.getCounter(), pm.getEModeName(), " "); int display_PC = (int)pm.getCounter(); string[] _displayLines = pm.getPreviousLines(LCD_Manager.SCREEN_ROWS - 1); for (int i = 10, j = 0, k = display_PC; i >= 0; i--, j++, k--) { if (k < 0) { lm.eraseTerminalLine((uint)i); continue; } string s = k.ToString("0000"); s += (k == display_PC) ? "> " : " "; lm.outputTerminalLine((uint)i, s + _displayLines[j]); } lm.forcePaint(); }