{"id":22920159,"url":"https://github.com/xgqfrms/assembly","last_synced_at":"2026-04-12T05:32:19.372Z","repository":{"id":145108212,"uuid":"153923624","full_name":"xgqfrms/assembly","owner":"xgqfrms","description":"assembly \u0026 汇编","archived":false,"fork":false,"pushed_at":"2022-09-07T14:19:53.000Z","size":12,"stargazers_count":1,"open_issues_count":2,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-10T14:07:00.868Z","etag":null,"topics":["assembly","c","c-plus-plus","c-sharp","rust","webassembly"],"latest_commit_sha":null,"homepage":"","language":"C#","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/xgqfrms.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":"2018-10-20T16:09:16.000Z","updated_at":"2022-09-07T14:20:08.000Z","dependencies_parsed_at":null,"dependency_job_id":"1cb724f6-030d-4e67-aee0-060473905cfb","html_url":"https://github.com/xgqfrms/assembly","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/xgqfrms/assembly","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xgqfrms%2Fassembly","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xgqfrms%2Fassembly/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xgqfrms%2Fassembly/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xgqfrms%2Fassembly/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/xgqfrms","download_url":"https://codeload.github.com/xgqfrms/assembly/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xgqfrms%2Fassembly/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31705574,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-12T05:11:36.334Z","status":"ssl_error","status_checked_at":"2026-04-12T05:11:27.332Z","response_time":58,"last_error":"SSL_read: 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":["assembly","c","c-plus-plus","c-sharp","rust","webassembly"],"created_at":"2024-12-14T07:14:36.553Z","updated_at":"2026-04-12T05:32:19.342Z","avatar_url":"https://github.com/xgqfrms.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# assembly\n\n\u003e assembly \u0026 汇编\n\n## C language `.c`\n\n\u003e C\n\n## C Plus Plus `.cpp`\n\n\u003e C ++\n\n## C Sharp `.cs`\n\n\u003e C#\n\nhttps://www.w3schools.com/cs/\n\n## Objective C `.oc`\n\n\u003e OC\n\nhttps://www.runoob.com/ios/ios-objective-c.html\n\n***\n\n## 汇编语言\n\nhttps://www.bilibili.com/video/av28132657\n\nhttp://c.biancheng.net/view/3294.html\n\nhttps://zhuanlan.zhihu.com/p/23618489\n\n\n```sh\n# 环境安装\n$ brew install gcc nasm gcc-multilib -y\n# $ sudo apt-get install gcc nasm vim gcc-multilib -y\n\n# 重装 nasm\n$ brew reinstall nasm\n\n$ nasm -v\n# NASM version 2.14.02 compiled on Dec 27 2018\n\n$ gcc -v\n# Configured with: --prefix=/Library/Developer/CommandLineTools/usr --with-gxx-include-dir=/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/include/c++/4.2.1\n# Apple LLVM version 10.0.1 (clang-1001.0.46.4)\n# Target: x86_64-apple-darwin18.7.0\n# Thread model: posix\n# InstalledDir: /Library/Developer/CommandLineTools/usr/bin\n\n$ which nasm\n# /usr/bin/nasm\n\n$ which gcc\n# /usr/bin/gcc\n\n```\n\n```sh\n# 编译\n# abc.asm =\u003e abc.o\n$ nasm -f elf abc.asm -o abc.o\n# abc.o =\u003e abc\n$ gcc -m32 abc.o -o abc\n# The i386 architecture is deprecated for macOS, ..., symbol(s) not found for architecture i386\n\n$ gcc -m64 abc.o -o abc\n# Undefined symbols for architecture x86_64:\n\n$ gcc macho64 abc.o -o abc\n# clang: error: no such file or directory: 'macho64'\n\n# 查看编译后的文件\n$ ls -al\n# abc abc.o abc.asm\n\n# 运行\n$ ./abc ; echo $?\n\n```\n\n```sh\n$ nasm -f macho64 -o hello-world.o hello-world.asm\n\n$ ld -o hello-world -e _main hello-world.o\n# ld: warning: No version-min specified on command line\n# ld: dynamic main executables must link with libSystem.dylib for inferred architecture x86_64\n\n$ ./hello-world\n\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxgqfrms%2Fassembly","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fxgqfrms%2Fassembly","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxgqfrms%2Fassembly/lists"}