{"id":30808331,"url":"https://github.com/maokij/ocala","last_synced_at":"2026-05-18T09:33:08.484Z","repository":{"id":293810167,"uuid":"985130882","full_name":"maokij/ocala","owner":"maokij","description":"Ocala is an assembler for Z80 / R800 / 6502.","archived":false,"fork":false,"pushed_at":"2026-01-01T09:54:52.000Z","size":671,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2026-01-04T21:27:44.416Z","etag":null,"topics":["6502","assembler","msx","r800","z80"],"latest_commit_sha":null,"homepage":"https://maokij.github.io/","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/maokij.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","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,"zenodo":null,"notice":"NOTICE.txt","maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-05-17T06:00:32.000Z","updated_at":"2026-01-01T09:40:54.000Z","dependencies_parsed_at":null,"dependency_job_id":"fcfd7854-6bf6-47b2-8564-923f5de65a36","html_url":"https://github.com/maokij/ocala","commit_stats":null,"previous_names":["maokij/ocala"],"tags_count":16,"template":false,"template_full_name":null,"purl":"pkg:github/maokij/ocala","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maokij%2Focala","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maokij%2Focala/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maokij%2Focala/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maokij%2Focala/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/maokij","download_url":"https://codeload.github.com/maokij/ocala/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maokij%2Focala/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33172589,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-18T09:27:30.708Z","status":"ssl_error","status_checked_at":"2026-05-18T09:27:28.300Z","response_time":71,"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":["6502","assembler","msx","r800","z80"],"created_at":"2025-09-06T03:02:43.806Z","updated_at":"2026-05-18T09:33:08.472Z","avatar_url":"https://github.com/maokij.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Ocala\n\nOcala is an assembler for Z80 / 6502.\n\nhttps://maokij.github.io/\n\nMSX1 sprite32:  \n![msx-sprite32.gif](https://maokij.github.io/assets/images/msx-sprite32.gif)\n\nMSX2 scroll:  \n![msx2-scroll.gif](https://maokij.github.io/assets/images/msx2-scroll.gif)\n\n## Features\n\n- Modules and namespaces\n- Flexible link methods\n- Macros and inline procedures\n- Controll flows like if/loop\n- Infix notation for machine language instructions\n- MSX BIOS functions library\n\n## Example Code\n\nHello world for MSX:\n\n```\n  // Specify the target CPU.\n  arch z80\n  // Include another file.\n  include \"msx.oc\"\n  // Specify the link method.\n  msx:link-as-rom main _\n\n  // Define the module.\n  module main {\n      // Define the procedure.\n      proc main() {\n          // Define message string data. This will be placed in the rodata section.\n          data message = byte [ \"Hello, world!\" ] : rodata\n\n          // Initialize the SP register. Same as \"LD SP, F380h.\"\n          SP \u003c- msx:STACK_ADDR\n          // Initialize the screen as 32x24 mode using BIOS.\n          msx:init32(!)\n          // Transfer data to the screen using BIOS.\n          BC@sizeof(message) . DE@msx:t32nam(10 12) . HL@message . msx:ldirvm(BC DE HL =\u003e !)\n\n          // The main loop. Do nothing.\n          never-return loop { msx:wait }\n      }\n  }\n```\n\nOutput assembly list:\n\n```\n                                              __ARCH__ = \"z80\"\n\n       - 4000                                 .org 16384\n  000000 4000[8] 41 42 10 40 00 00 00 00      .byte 65, 66, 16, 64, 0, 0, 0, 0\n  000008 4008[8] 00 00 00 00 00 00 00 00      .byte 0, 0, 0, 0, 0, 0, 0, 0\n\n       - 4010                             main:main:\n  000010 4010[3] 31 80 f3                     LD     SP, msx:STACK_ADDR\n  000013 4013[3] cd 6f 00                     CALL   msx:init32\n  000016 4016[3] 01 0d 00                     LD     BC, sizeof(.message.#984)\n  000019 4019[3] 11 8a 19                     LD     DE, msx:t32nam(10 12)\n  00001c 401c[3] 21 26 40                     LD     HL, .message.#984\n  00001f 401f[3] cd 5c 00                     CALL   msx:ldirvm\n       - 4022                             .beg.G1.#988:\n  000022 4022[1] 76                           HALT\n  000023 4023[3] c3 22 40                     JP     .beg.G1.#988\n\n       - 4026                                 .align 2 ; (.defb 0)\n       - 4026                             .message.#984:\n  000026 4026[8] 48 65 6c 6c 6f 2c 20 77      .byte \"Hello, world!\"\n            :[5] 6f 72 6c 64 21\n\n       - c000                                 .org 49152\n```\n\n## Installation\n\n### Using precompiled binaries\n\nDownload the archive of latest version from\nthe [releases](https://github.com/maokij/ocala/releases) page.\nThen extract all files from the archive.\n\nTo verify your installation, try below.\n\n```\n$ ./ocala/bin/ocala -h\n```\n\nAnd make a symbolic link to the binary file if necessary.\n\n```\n$ ln -nfs \"$(realpath ./ocala/bin/ocala)\" ~/.local/bin/ocala\n```\n\n### Building from source\n\nClone this repository. Then execute below.\n\n```\n$ make install prefix=$HOME/.local\n```\n\n## Usage\n\n```\nUsage: ocala [options] file\nOptions:\n  -D value\n        Define the symbol\n  -I value\n        Add the directory to the include path\n  -L string\n        Specify the list file name\n  -V    Display the version information\n  -l    Generate a list file\n  -o string\n        Specify the output file name\n  -t string\n        Specify the target arch\n```\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaokij%2Focala","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmaokij%2Focala","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaokij%2Focala/lists"}