{"id":21614564,"url":"https://github.com/halaway/asm-display","last_synced_at":"2025-07-31T22:39:47.611Z","repository":{"id":235019524,"uuid":"789922005","full_name":"halaway/asm-display","owner":"halaway","description":null,"archived":false,"fork":false,"pushed_at":"2024-04-22T03:09:32.000Z","size":23,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-04T12:55:11.288Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Assembly","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/halaway.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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-04-21T22:55:28.000Z","updated_at":"2024-04-22T03:09:36.000Z","dependencies_parsed_at":null,"dependency_job_id":"38474aed-976a-43a2-8114-82e5e73bf331","html_url":"https://github.com/halaway/asm-display","commit_stats":null,"previous_names":["halaway/asm-display"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/halaway/asm-display","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/halaway%2Fasm-display","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/halaway%2Fasm-display/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/halaway%2Fasm-display/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/halaway%2Fasm-display/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/halaway","download_url":"https://codeload.github.com/halaway/asm-display/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/halaway%2Fasm-display/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260451944,"owners_count":23011380,"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":[],"created_at":"2024-11-24T22:08:25.336Z","updated_at":"2025-06-17T22:36:49.736Z","avatar_url":"https://github.com/halaway.png","language":"Assembly","funding_links":[],"categories":[],"sub_categories":[],"readme":"# MIPS Assembly Bitmap Display\n\nAs part of a uni architecture course, the following creates a rendering of an image on a 512 x 256 2D Bitmap display. Using the MIPS Assembler and Runtime Simulator [MARS](https://courses.missouristate.edu/kenvollmar/mars/), the program uses MIPS assembly code for the MIPS Architecture- a Reduced Instruction Set Computer(RISC) with C-style structures containing 32-bit ints in the form: \n```c\nstruct asmInput {\n  unsigned w, h, l; // size parameters\n  unsigned bgcol; // background color\n}\n```\n\n| Proposed Output  | Solution  | \n| :------------ |:---------------:|\n|\u003cimg width=\"261\" alt=\"Screen Shot 2024-04-21 at 7 49 48 PM\" src=\"https://github.com/halaway/asm-display/assets/31904474/3bcfeb94-554f-4a52-88cb-b4ed2230154d\"\u003e | \u003cimg width=\"261\" alt=\"Screen Shot 2024-04-21 at 8 29 26 PM\" src=\"https://github.com/halaway/asm-display/assets/31904474/a04d6f67-b0ea-44fa-b4b1-0b067e70c419\"\u003e|\n\n\n\n### Implementation\nWhile a considerably trivial program, a requirement is to not make use of custom built-in function calls, multiplication, or division operators. Regardless, the approach was to traverse the display using the frame buffer in row-major form while calculating starting corner positions using the geometric properties of each shape when considered as a separate unit.\n```asm\n#   t3 - y coordinate of top left cap corner\n#   t5 - base and height of trapezoid with 45-degree angles\nmathPortion:\t  \n\taddi \t$t5, $t6, -48\t\t# $t5 ← w - 48\n\tsrl \t$t5, $t5, 1\t\t# $t5 ← w - 48 / 2\n\tadd \t$t3, $t7, $t8 \t\t# $t3 ← h + l\n\tadd \t$t3, $t3, $t5\t\t# $t3 ← h + l + b\n  ...\n```\n\n## Note\nThe program is relatively straightforward and was meant to simulate low-level programming while directly accessing and manipulating registers using the available instruction set. I genuinely hope this helps future CS students and clarifies some nuances when applying classroom theory to possible real-world examples.   \n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhalaway%2Fasm-display","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhalaway%2Fasm-display","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhalaway%2Fasm-display/lists"}