One Pass Assembler in Python
- Open Command Prompt by typing 'cmd' in the Windows Search Bar and pressing Enter.
- Type in the command 'python -V' and press Enter to check the version of Python already installed on your System.
If a version of Python already exists on your system, ignore the following steps and continue to the Instructions to run the Assembler script, else continue to Step 3.
- Type 'python' on your Command Prompt screen and press Enter. This opens up Windows Store showing the latest Python Installer.
- Follow the steps on screen to install Python on your system using Python Installer (don't forget to add Python to PATH).
- Store the input SIC program in a text file named "input1.txt" in the folder containing the "Assembler.py" and "OpTable.py" scripts.
- Click on the Address Bar in File Explorer, type 'cmd' and press Enter.
A new Command Prompt window opens.
- Run the Assembler Python script with the input filename ("input1.txt") and output filename ("output.txt") as command line arguments as follows:
python Assembler.py input1.txt output.txt
- The Object Program is generated and stored in the output.txt file.
- To open the file in cmd, enter the following command:
output.txt
- The file can also be opened conventionally in the File Explorer.