{"id":19371402,"url":"https://github.com/amid68/hello-world-in-arm-assembly","last_synced_at":"2026-07-09T15:30:17.434Z","repository":{"id":255447952,"uuid":"852197622","full_name":"Amid68/hello-world-in-arm-assembly","owner":"Amid68","description":"A simple \"Hello, World!\" program written in ARM assembly for macOS","archived":false,"fork":false,"pushed_at":"2024-09-04T12:01:19.000Z","size":2,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-07T00:38:09.455Z","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":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Amid68.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-09-04T11:54:48.000Z","updated_at":"2024-09-04T12:01:22.000Z","dependencies_parsed_at":"2024-09-05T13:05:09.969Z","dependency_job_id":null,"html_url":"https://github.com/Amid68/hello-world-in-arm-assembly","commit_stats":null,"previous_names":["amid68/hello-world-in-arm-assembly"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Amid68%2Fhello-world-in-arm-assembly","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Amid68%2Fhello-world-in-arm-assembly/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Amid68%2Fhello-world-in-arm-assembly/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Amid68%2Fhello-world-in-arm-assembly/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Amid68","download_url":"https://codeload.github.com/Amid68/hello-world-in-arm-assembly/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240495019,"owners_count":19810535,"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-10T08:18:19.859Z","updated_at":"2026-07-09T15:30:17.376Z","avatar_url":"https://github.com/Amid68.png","language":"Assembly","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Hello World in ARM Assembly for macOS\n\nThis is a simple \"Hello, World!\" program written in ARM assembly for macOS, targeting ARM64 architecture (like Apple Silicon M1).\n\n## How the Code Works\n\nThis program uses the C runtime and calls functions from the standard library (`puts` and `exit`) rather than using direct system calls, which makes it easier and more portable.\n\n### Assembly Code Breakdown\n\n1. **Global Declaration:**\n   - The program starts by declaring `_main` as the global entry point using `.globl _main`.\n\n2. **Aligning Code:**\n   - The `.p2align 2` ensures that the code is properly aligned in memory.\n\n3. **Main Function (`_main`):**\n   - **`ADR X0, helloworld`:** This instruction loads the address of the `helloworld` string into register `X0`, which will be passed to the `puts` function.\n   - **`bl _puts`:** The `bl` instruction (branch with link) calls the `puts` function from the C library, which prints the string.\n   - **`mov X0, #0`:** After the string is printed, this instruction sets the value `0` in `X0`, which will be the return value of the program. An exit code of 0 is used to indicate success.\n   - **`b _exit`:** This branches to the `_exit` function from the C library to terminate the program.\n\n4. **Data Section:**\n   - **`helloworld` label:** This label marks the location of the string in memory.\n   - **`.asciz \"Hello, World!\"`:** This directive defines a null-terminated string to be printed.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Famid68%2Fhello-world-in-arm-assembly","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Famid68%2Fhello-world-in-arm-assembly","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Famid68%2Fhello-world-in-arm-assembly/lists"}