# SIC/XE Simulator A complete SIC/XE architecture simulator with instruction execution, device I/O, memory management, and assembler. ## Quick Start ### Building the Project ```bash make ``` This will build: - `target/bin/simulator_exec` - The main simulator - `target/bin/assembler` - The SIC/XE assembler - `target/bin/simulator_qt` - Qt GUI version (if Qt is available) ### Using the Assembler Assemble a SIC/XE assembly file to object code: ```bash ./target/bin/assembler ``` **Example:** ```bash ./target/bin/assembler res/test_format4.asm ``` This will: - Parse and assemble the input file - Generate modification records (M records) for format 4 instructions - Create `.obj` with the object code - Display the object code and symbol table **Sample Output:** ``` H TESTF4 0003E8 00001B T 0003E8 1B 031003F70F1003FA4B1003FD4F2C090000000000000100004F2BFD M 0003E9 05 M 0003ED 05 M 0003F1 05 E 0003E8 ``` ### Running the Simulator ```bash make run ``` This will build and run the simulator with the default program. ## Build Commands | Command | Description | |--------------|----------------------------------------------------| | `make` | Build all executables | | `make build` | Build the project | | `make run` | Build and run the simulator | | `make clean` | Clean build artifacts | ## Project Structure ``` simulator_SIC_XE/ ├── include/ # Header files (.h) ├── src/ # Source files (.cpp) ├── target/bin/ # Build output (executables, libraries) └── build/ # CMake build directory ``` ## Features - **SIC/XE Architecture**: Complete register set (A, X, L, B, S, T, F, PC, SW) - **Instruction Execution**: Format 1, 2, and 3/4 instruction support - **Device I/O**: Input, output, and file device management - **Memory Management**: 24-bit address space with proper bounds checking ## Development The project uses CMake with a convenient Makefile wrapper. All build artifacts are placed in `target/bin/` for easy access. For manual CMake usage: ```bash cmake -S . -B build -DCMAKE_BUILD_TYPE=Release cmake --build build -j ```