{"id":23349975,"url":"https://github.com/hannahgsimon/sic-xe-assembler","last_synced_at":"2026-04-28T11:02:12.406Z","repository":{"id":268833411,"uuid":"878667217","full_name":"hannahgsimon/SIC-XE-Assembler","owner":"hannahgsimon","description":"Developed a two-pass assembler for the SIC/XE architecture that processes assembly language programs, and generates a listing file with a symbol table and a corresponding object code file.","archived":false,"fork":false,"pushed_at":"2024-12-26T07:33:41.000Z","size":152,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-07T18:16:45.042Z","etag":null,"topics":["assembler-design","assembly-language","compilers","listing-files","object-code","sic-xe-assembler","symbol-table","systems-programming","two-pass-assembler"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hannahgsimon.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-10-25T20:24:24.000Z","updated_at":"2024-12-26T07:33:45.000Z","dependencies_parsed_at":"2024-12-19T07:37:34.539Z","dependency_job_id":null,"html_url":"https://github.com/hannahgsimon/SIC-XE-Assembler","commit_stats":null,"previous_names":["hannahgsimon/sic-xe-assembler"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hannahgsimon%2FSIC-XE-Assembler","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hannahgsimon%2FSIC-XE-Assembler/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hannahgsimon%2FSIC-XE-Assembler/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hannahgsimon%2FSIC-XE-Assembler/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hannahgsimon","download_url":"https://codeload.github.com/hannahgsimon/SIC-XE-Assembler/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247704575,"owners_count":20982298,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["assembler-design","assembly-language","compilers","listing-files","object-code","sic-xe-assembler","symbol-table","systems-programming","two-pass-assembler"],"created_at":"2024-12-21T08:14:27.119Z","updated_at":"2026-04-28T11:02:07.012Z","avatar_url":"https://github.com/hannahgsimon.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# SIC/XE Assembler\n\n## Overview\n- SIC/XE is a hypothetical architecture introduced in *System Software: An Introduction to Systems Programming*, by Leland Beck to explain the concepts of assemblers, compilers, and operating systems [1; 2].\n- The `sicasm.c` program implements a two-pass assembler for the SIC (Simplified Instructional Computer) machine architecture.\n- The `sicxeasm.c` program implements a two-pass assembler for the SIC/XE (Simplified Instructional Computer with Extra Equipment) machine architecture.\n- Both programs read an assembly language program for the SIC or SIC/XE machines respectively, process it, and produce three output files:\n  - Intermediate File: A temporary file that can be safely deleted. It contains the source code and is utilized to generate the listing and object code files.\n  - Listing File: This file contains the source code along with the corresponding object code (in hexadecimal) generated for each statement. It also includes a symbol table that lists all symbols and their corresponding addresses after the assembly process.\n  - Object Code File: This file contains the final object code generated by the assembler, formatted according to SIC/XE standards. It includes a Header record, Text records, and an End record.\n- The program handles basic directives and opcodes in the SIC/XE instruction set and performs error checking during both passes of the assembly process.\n\n## Features\n- Pass 1:\n  - Parses the assembly source code to generate a symbol table and track location counters.\n  - Checks for duplicate symbols and invalid opcodes.\n- Pass 2:\n  - Generates object code based on the symbol table and processes each statement.\n  - Checks for undefined symbols and errors related to operand formats.\n- Supported Directives: `START`, `BYTE`, `WORD`, `RESB`, `RESW`, `END`, `BASE`, `NOBASE`\n- Supported Opcodes: A range of SIC/XE machine opcodes such as `ADD`, `SUB`, `LDA`, `STA`, `JSUB`, `RD`, `TD`, `RSUB`, and more.\n- Input Format: The source file is a text file containing assembly instructions, comments, labels, opcodes, and operands formatted according to SIC/XE conventions.\n- Output Format:\n  1. An intermediate file (temporary file that can be safely deleted) containing:\n      - Line numbers\n      - Location counter values\n      - Source statements\n  2. A listing file containing:\n      - Line numbers\n      - Location counter values\n      - Source statements\n      - Object code\n      - Symbol table\n  3. An object file containing the final assembled object code\n\n## Setup \u0026 Usage\n1. Ensure the following prerequisites are installed:\n    - C Compiler (e.g., GCC, MSVC)\n    - Command-line interface to run the assembler program\n    - Standard C libraries: `stdio.h`, `stdlib.h`, `string.h`, `stdbool.h`\n2. Compile the source code into an executable:\n    ```bash\n    gcc sicasm.c -o sicasm\n    ```\n    ```bash\n    gcc sicxeasm.c -o sicasm\n    ```\n3. Run the assembler with the input assembly source code file:\n    ```bash\n    ./sicasm SIC_PROG.txt\n    ```\n    ```bash\n    ./sicxeasm SIC_PROG.txt\n    ```\n4. Each program will generate three output files:\n    - `sic_intermediate.txt`, `sic_listing.txt`, and `sic_object.txt`\n    - `sicxe_intermediate.txt`, `sicxe_listing.txt`, and `sicxe_object.txt`\n\n## Sample Program Inputs \u0026 Outputs\n- Sample input and output files are included in the repository for reference in the `SIC sample_io` and `SIC_XE sample_io` folders.\n- `sicasm.c` Program:\n  - Input: `SIC_PROG.txt`\n  - Outputs: `sic_immediate.txt`, `sic_listing.txt`, `sic_object.txt`\n- `sicxeasm.c` Program:\n  - Input: `SIC_XE_PROG.txt`\n  - Outputs: `sicxe_immediate.txt`, `sicxe_listing.txt`, `sicxe_object.txt`\n\n## References\n[1] Beck, L. L. (1997). *System Software: An Introduction to Systems Programming* (3rd ed.). Addison-Wesley.  \n[2] Wikimedia Foundation. (2024, December 16). *Simplified Instructional Computer*. Wikipedia. https://en.wikipedia.org/wiki/Simplified_Instructional_Computer\n\n## Authors\nThis project was collaboratively developed by Hannah G. Simon and Charlie Strickland.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhannahgsimon%2Fsic-xe-assembler","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhannahgsimon%2Fsic-xe-assembler","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhannahgsimon%2Fsic-xe-assembler/lists"}