{"id":46496887,"url":"https://github.com/dogatana/yas80","last_synced_at":"2026-04-19T09:04:41.153Z","repository":{"id":337618428,"uuid":"1131618215","full_name":"dogatana/yas80","owner":"dogatana","description":"yas80 - Yet another ASsembler for z80","archived":false,"fork":false,"pushed_at":"2026-04-04T09:34:07.000Z","size":2915,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-04-04T10:23:06.311Z","etag":null,"topics":["assembler","z80-assembler","z80asm"],"latest_commit_sha":null,"homepage":"","language":"Assembly","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/dogatana.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-01-10T11:21:06.000Z","updated_at":"2026-04-04T09:34:10.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/dogatana/yas80","commit_stats":null,"previous_names":["dogatana/yas80"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/dogatana/yas80","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dogatana%2Fyas80","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dogatana%2Fyas80/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dogatana%2Fyas80/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dogatana%2Fyas80/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dogatana","download_url":"https://codeload.github.com/dogatana/yas80/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dogatana%2Fyas80/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31560476,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-08T14:31:17.711Z","status":"ssl_error","status_checked_at":"2026-04-08T14:31:17.202Z","response_time":54,"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":["assembler","z80-assembler","z80asm"],"created_at":"2026-03-06T12:09:27.823Z","updated_at":"2026-04-19T09:04:41.132Z","avatar_url":"https://github.com/dogatana.png","language":"Assembly","funding_links":[],"categories":[],"sub_categories":[],"readme":"# yas80\r\n\r\n\r\n## はじめに\r\n\r\nGo で書いた Z80/R800 マクロアセンブラです。\r\n\r\nGo 言語を使い始めて『Go 言語でつくるインタプリタ』を読んでいるうちに何か作りたくなり、\r\nそれならば Z80 アセンブラを書いてみようと思い立ち、\r\nその昔齧ったことのある yacc も利用できることもわかったので、\r\ngoyacc を使って書いてみました。\r\n\r\nyas80 は Yet Another Assembler for Z80 and R800 の略で、\r\nyacc の \"ya\" と同じです。(Yet Another xx を使いたかっただけ)\r\n\r\nZ80 用アセンブラは既にいくつか利用可能ですが、\r\nこれまで使用している中で個人的に欲しかった仕様を盛り込んでいます。\r\n\r\n\r\n## 主な特長\r\n\r\n- 寡黙（Rule of Silence に従い成功時は何も表示なし）\r\n- マルチパスアセンブラ\r\n- グローバル/PROC/マクロ スコープ\r\n- 匿名ラベル(PROC内)\r\n- ORG による生成コードの配置指定\r\n- bin/mzt/t88 形式出力\r\n- マルチステートメント\r\n- 行継続\r\n- 連続する文字列リテラルの結合\r\n- 変数（再代入可能シンボル）\r\n- シンボル結合演算子（##）\r\n- 複数行定義の関数\r\n- クロージャ\r\n- EXITM マクロ制御構文\r\n- CHARAMP 生成で直接 JSON 文字列を指定\r\n- CHARMAP 適用時に未定義文字の扱いを選択可能（エラー、特定文字、元の文字）\r\n- SETMAP による CHARMAP 定義内容更新\r\n- 配列リテラル\r\n- R800 命令（乗算命令+Z80非公開命令の一部）\r\n\r\n## 動作環境\r\n\r\nGo のクロスコンパイル機能を利用し次表の環境で利用可能です。\r\nただしこちらで確認しているのは windows - amd64 のみです。\r\n\r\n| OS (goos)| CPU (goarch)  |\r\n| --       | --           |\r\n| windows  | amd64        |\r\n| linux    | amd64        |\r\n| darwin   | amd64, arm64 |\r\n\r\n## インストール\r\n\r\n[Releases](https://github.com/dogatana/yad80/releases) からダウンロード、解凍してください。\r\n\r\n## マニュアル\r\n\r\n[こちら](https://dogatana.github.io/yas80-docs/) に置いています。\r\n\r\n## ライセンス\r\n\r\n[MIT](LICENSE)\r\n\r\n## アセンブル性能\r\n\r\n実用性の指標を得る目的でアセンブル性能を計測しました。\r\n入手可能な他のアセンブラとも比較しています。\r\n\r\n\r\n###  計測対象アセンブラ\r\n\r\n| アセンブラ                            | バージョン                   | サイズ     | 備考            |  \r\n|  --                                   | --                           | --:        | --              | \r\n| yas80.exe                             | 0.5.0                        |  3,715,584 |                 | \r\n| z80as.exe\u003cbr\u003e(紅茶羊羹氏)             | 0.12                         |    172,032 |                 | \r\n| z80asm.exe\u003cbr\u003e(z88dk)                 | 2.4                          | 39,447,620 | MSVCRT.dll 依存 |\r\n| tools80.jar\u003cbr\u003e(HAL 8999氏)           | Release 6.48\u003cbr\u003e(Ver. 6.6.66)|    186,306 | 要 java.exe     |\r\n| AILZ80ASM.exe\u003cbr\u003e(Mitsuhito Ishino氏) | 1.0.31.0                     | 68,322,858 | 複数 dll 依存（おそらくは埋め込み） | \r\n\r\n### 計測対象ソース\r\n\r\n疑似命令（ディレクティブ）はアセンブラ毎の仕様差が大きく共通ソースとすることが困難なため、\r\nZ80 公開命令の範囲でアセンブル時間の比較を行っています。\r\n\r\n公開命令でもアセンブラによっては対応していないものもあるため、\r\nそれを除いた最大公約数的なソースになっています。\r\n\r\nまたアセンブラのシンボル管理処理に負荷をかけるという観点で、\r\n各行にラベルを付加したものも使用しました。\r\n\r\n| ソースファイル                     | 行数   | 内容                         |\r\n| --                                 | --:    |  --                          |\r\n| [min.asm](performance/min.asm)     |    708 | Z80 公開命令のサブセット     |\r\n| [max.asm](performance/max.asm)     | 32,340 | 生成コードが 64KB を超えない範囲で min.asm の内容を繰り返したもの |\r\n| [label.asm](performance/label.asm) | 32,340 | max.asm の各行にラベルを付加 |\r\n\r\n### 計測方法\r\n\r\n- Python スクリプトで対象ソースファイルを所定回数アセンブルし、各回の実行時間を計測\r\n- 実行時間の合計を総実行時間とし、総実行時間を回数で割った平均実行時間を求める\r\n\r\n### 計測結果\r\n\r\n#### min.asm 10 回\r\n\r\n|アセンブラ | 平均実行時間（秒）|\r\n| --        |       --:         |\r\n| yas80     |             0.021 |\r\n| z80as     |             0.005 |\r\n| z80asm    |             0.017 |\r\n| tools80   |             0.113 |\r\n| AILZ80ASM |             0.540 |\r\n\r\n![min](https://raw.githubusercontent.com/dogatana/yas80/main/performance/min.asm.svg)\r\n\r\n#### max.asm 10 回\r\n\r\n|アセンブラ | 平均実行時間（秒）|\r\n| --        |       --:         |\r\n| yas80     |             0.046 |\r\n| z80as     |             0.014 |\r\n| z80asm    |             0.139 |\r\n| tools80   |             0.309 |\r\n| AILZ80ASM |             0.938 |\r\n\r\n![max](https://raw.githubusercontent.com/dogatana/yas80/main/performance/max.asm.svg)\r\n\r\n#### label.asm 10 回\r\n\r\n|アセンブラ | 平均実行時間（秒）|\r\n| --        |       --:         |\r\n| yas80     |             0.089 |\r\n| z80as     |             0.025 |\r\n| z80asm    |             0.268 |\r\n| tools80   |             2.423 |\r\n| AILZ80ASM |             6.220 |\r\n\r\n![label](https://raw.githubusercontent.com/dogatana/yas80/main/performance/label.asm.svg)\r\n\r\n#### ZMA v1.0.19 （参考）\r\n\r\nZMA v1.0.19 (t.hara氏)だと label.asm(相当)のアセンブルで z80asm と tools80 の間にあたる 0.868 秒でした。\u003cbr\u003e\r\nZMA は\r\n- 書式が一般の Z80 アセンブラと異なる\r\n- 対応 Z80 公開命令が更に絞り込まれている（模様）\r\n\r\nため専用ソース（書式変更、エラーとなる命令行コメント化）での計測としています。\r\n\r\n\r\n## 実用アセンブル性能\r\n\r\n### 内容\r\n\r\n公開ソフト（URL は末尾）を\r\n[メモ：他のアセンブラとの違い](https://dogatana.github.io/yas80-docs/port/port.html)\r\nに従い、書き換えたものについて性能を計測しました。\r\n\r\n| 計測アセンブラ | 計測対象 | 行数 |\r\n| -- | -- | --: |\r\n| z80as | 365面のパズルアクションゲーム FANTIC | 1,251 |\r\n| AILZ80ASM | LSX-Dodgers | 6,187 |\r\n\r\n### z80asm - FANTIC\r\n\r\n![fantic](performance/FANTIC.svg)\r\n\r\n### AILZ80ASM - LSX-Dodgers\r\n\r\n![lsx-dodgers](performance/LSX-Dodgers.svg)\r\n\r\n## 参考\r\n\r\nyas80 作成にあたって参考にした書籍、サイト、ソフトウェアです。\r\n著者・作者並びに公開されている方々に感謝します。\r\n\r\n\r\n### 書籍\r\n\r\n- Thorsten Ball 著、設樂 洋爾 訳. Go言語でつくるインタプリタ. O'Reilly Japan, 2018.\u003cbr\u003ehttps://www.oreilly.co.jp/books/9784873118222/  \r\n- Jon Bodner著、武舎 広幸 訳. 初めてのGo言語 第2版. O'Reilly Japan, 2025.\u003cbr\u003ehttps://www.oreilly.co.jp/books/9784814401192/\r\n- 近藤 嘉雪 著. yaccによるCコンパイラプログラミング. ソフトバンク, 1990\r\n\r\n### サイト\r\n\r\n- [goyaccで構文解析を行う](https://qiita.com/k0kubun/items/1b641dfd186fe46feb65)\r\n- [MZTファイルの仕様について覚書](https://mzakd.cool.coocan.jp/starthp/mzt.html) - [AKD's site](https://mzakd.cool.coocan.jp/main.html)\r\n- [T88Format](https://quagma.sakura.ne.jp/manuke/t88format.html) - [Manuke Station](https://quagma.sakura.ne.jp/manuke/index_j.html)\r\n- [DumpListEditor](https://bugfire2009.ojaru.jp/download.html) - [PC-8001を懐かしむページ](https://bugfire2009.ojaru.jp/index.html)\r\n- z80as - [We Love MZ-700](http://www.maroon.dti.ne.jp/youkan/mz700/index.html)\r\n- z80asm - [z88dk](https://z88dk.org/site/)\r\n- z80as - [OUT of STANDARD [PC-8001]](http://upd780c1.g1.xrea.com/pc-8001/index.html#UTL) \r\n- AILZ80ASM  https://github.com/AILight/AILZ80ASM\r\n- zma https://github.com/hra1129/zma\r\n\r\n### 公開ソフトウェア\r\n\r\nまたマニュアル内の 『[メモ：他のアセンブラとの違い](https://dogatana.github.io/yas80-docs/port/port.html)』 の検証にあたり、次の公開ソースを利用させていただきました。\r\n\r\n\r\n- [365面のパズルアクションゲーム FANTIC](http://www.maroon.dti.ne.jp/youkan/mz700/fantic/index.html)\r\n- [IPLセレクタ](https://web.archive.org/web/20210130154551/http://www.ne.jp/asahi/suga/junkyard/mz/mzsoft/iplsel/index.html)\r\n- [IPLセレクタ改 for MZ-80B/2000](https://github.com/kuran-kuran/IPLS09bKai?tab=readme-ov-file)\r\n- [LSX-Dodgers](https://github.com/tablacus/LSX-Dodgers)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdogatana%2Fyas80","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdogatana%2Fyas80","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdogatana%2Fyas80/lists"}