A web-based terminal simulator that mimics a classic menu-driven calculator. Built with HTML, CSS, and vanilla JavaScript, it uses a Finite State Machine (FSM) to handle sequential terminal inputs seamlessly within a custom CLI environment.
- Terminal UI: Sleek, dark-themed command-line interface with standard window controls and auto-scrolling.
- FSM Architecture: Structured state transitions (
MENU➔GET_NUM1➔GET_NUM2) for robust input handling. - Arithmetic Logic: Supports addition, subtraction, multiplication, and a specialized division.
- Input Validation: Error prevention against invalid menu options, out-of-range inputs, and division-by-zero.
- HTML5 | CSS3 (Flexbox, Fira Code font) | Vanilla JavaScript (ES6).
Tracks application execution states programmatically instead of using deeply nested conditions. It cycles sequentially through menu choices and number inputs before executing operations.
Mimics traditional text-based, low-level CLI software architectures within a browser context, resetting states and refreshing input buffers automatically.
Asynchronously captures keyboard events (Enter key updates) and dynamically generates color-coded system responses while pinning viewport scroll to the latest line.
Open index.html directly in any modern web browser.