{"id":17092994,"url":"https://github.com/prkumar/ark","last_synced_at":"2026-04-29T19:05:52.204Z","repository":{"id":88472947,"uuid":"73958489","full_name":"prkumar/ark","owner":"prkumar","description":"An assembler for ARK: https://github.com/prkumar/ARK-Processor","archived":false,"fork":false,"pushed_at":"2016-11-18T01:29:14.000Z","size":113,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-07-04T04:38:54.376Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","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/prkumar.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":"2016-11-16T20:31:33.000Z","updated_at":"2016-11-18T00:57:13.000Z","dependencies_parsed_at":null,"dependency_job_id":"4f49a8c0-a546-4172-9167-d95324ffc55a","html_url":"https://github.com/prkumar/ark","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/prkumar/ark","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prkumar%2Fark","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prkumar%2Fark/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prkumar%2Fark/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prkumar%2Fark/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/prkumar","download_url":"https://codeload.github.com/prkumar/ark/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prkumar%2Fark/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32439375,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-29T18:12:22.909Z","status":"ssl_error","status_checked_at":"2026-04-29T18:11:33.322Z","response_time":110,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":[],"created_at":"2024-10-14T14:04:07.556Z","updated_at":"2026-04-29T19:05:52.188Z","avatar_url":"https://github.com/prkumar.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# `ark`: the ARK Assembler\n\n`ark` is an assembler for [ARK](https://github.com/prkumar/ARK-Processor), an instruction set architecture [we](#authors) developed at UCSD for CSE 141L and designed with the purpose of executing three specific problems (the `problems` directory contains the ARK instruction files for each problem).\n\n**Note:** Currently, the assembler only generates machine code based on the ISA definition. We plan to implement a *true* assembler for ARK in the near future -- probably sometime after the quarter ends, as that would fall outside the scope of the course. \n\n**Note:** Moreover, I believe that we may be able to draw out a more general Python package for creating assemblers and/or defining ISAs from this :metal:.\n\n## Usage\n\nTo run the assembler, type:\n```\n$ python -m ark\n```\n\n**Note:** The `-m` flags tells Python to execute `ark/__main__.py`, which contains the assembler code.\n\n**Note:** Because of Python’s import mechanism, running the assembler from within the `ark` directory will not work.\n\nThe assembler has three modes, determined by the number of positional arguments given.\n\n### Start a Read-eval-print loop (REPL)\n\nWhen the assembler is run without arguments, it will start a REPL. In this mode, you  can \"compile\" ARK instructions to machine code, one instruction at a time.\n  \n```bash\n$ python -m ark\nStarting the ARK interpreter... (Enter CTR + C to exit) \n\u003e\u003e\u003e shifto $accumulator\n101010_000\n\u003e\u003e\u003e\n``` \n  \n### Read instructions from a file and print to standard out.\n\nWhen the assembler is given a single argument, it reads instructions from the file at the given path and outputs the generated machine code directly to the screen.\n\n```bash\n$ python -m ark problems/problem17.txt\nReading instructions from 'problem17.txt'...\nMachine Code:\n11000_1111 // high        0b1111\n11001_1111 // low         0b1111\n100011_011 // paste       $t1\n11000_0011 // high        0b0011\n11001_0101 // low         0b0101\n1000000_00 // load        $s0\n...\n``` \n\n### Read instructions from a file and write to another file.\n\nWhen the assembler is given two arguments, it reads instructions from the first file and writes the generated machine code\nto the second.\n\n```bash\n$ python -m ark problems/problem17.txt problem17_out.txt\nReading instructions from 'problem17.txt' ... Done!\nWriting machine code output to 'problem17_out.txt' ... Done!\n``` \n\n## Implementation\n\nThe assembler is built using David Beazley’s [Python implementation of lex and yacc](https://github.com/dabeaz/ply).\n\n## Authors\n\nBrought to you by:\n\n* **A**nil Jethani\n* P. **R**aj Kumar \n* **K**evin Wong\n\n### An Aside\n\nWith a better understanding of ISA design tradeoffs now than when we were designing ARK (being that was back in early October '16), we consider it far from perfect and hope to make a few optimizations before completing the accompanying processor design.\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprkumar%2Fark","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fprkumar%2Fark","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprkumar%2Fark/lists"}