{"id":20651892,"url":"https://github.com/abdullah-niaz/coal","last_synced_at":"2026-04-17T16:04:43.641Z","repository":{"id":253915020,"uuid":"844843778","full_name":"Abdullah-Niaz/COAL","owner":"Abdullah-Niaz","description":"Explore basic assembly language concepts and examples, including fundamental operations, NASM syntax, and low-level programming.","archived":false,"fork":false,"pushed_at":"2024-12-15T18:06:01.000Z","size":54,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-17T10:28:15.126Z","etag":null,"topics":["assemblylanguage","lowlevelprogramming","nasm","systemprogramming"],"latest_commit_sha":null,"homepage":"","language":"Assembly","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Abdullah-Niaz.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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-08-20T04:38:22.000Z","updated_at":"2024-12-15T18:06:04.000Z","dependencies_parsed_at":"2024-11-16T17:30:56.603Z","dependency_job_id":"3b0842fa-da17-4dac-87a2-b522f6ba9a15","html_url":"https://github.com/Abdullah-Niaz/COAL","commit_stats":null,"previous_names":["abdullah-niaz/coal"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Abdullah-Niaz%2FCOAL","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Abdullah-Niaz%2FCOAL/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Abdullah-Niaz%2FCOAL/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Abdullah-Niaz%2FCOAL/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Abdullah-Niaz","download_url":"https://codeload.github.com/Abdullah-Niaz/COAL/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242750785,"owners_count":20179257,"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":["assemblylanguage","lowlevelprogramming","nasm","systemprogramming"],"created_at":"2024-11-16T17:30:32.664Z","updated_at":"2026-04-17T16:04:43.628Z","avatar_url":"https://github.com/Abdullah-Niaz.png","language":"Assembly","funding_links":[],"categories":[],"sub_categories":[],"readme":"### Run on VsCode(linux)\n\n#### Assemble the Program\n\nIn the terminal, navigate to the directory containing hello.asm and run the following command to assemble the code into an object file:\n\n`nasm -f elf32 -o hello.o hello.asm`\n\n#### Link the Object File:\n\nUse the linker to create an executable from the object file:\n`ld -m elf_i386 -o hello hello.o`\n\n#### Run the Program:\n\nFinally, execute the program:\n`./hello`\n\n#### Summary:\n\n1. You installed NASM and GCC.\n2. Wrote an assembly program in VS Code.\n3. Assembled it using nasm.\n4. Linked it using ld.\n5. Ran it to print \"Hello, World!\" in the terminal.\n\n---\n\n### Assemble and Link on Ubuntu Using NASM:\n\nOpen a terminal on Ubuntu and run:\n\n`nasm -f bin filename.asm -o filename.com`\n\nThis command converts your assembly code to a `.com` file.\n\n### Run the Executable in DOSBox\n\nAfter assembling the `.com` file, you can run it within DOSBox:\n\n#### i. Mount the Directory in DOSBox\n\n`mount c /path/to/your/directory\nc:`\n\n#### ii. Run the Program\n\n`filename.com`\n\n---\n\n---\n\n## Window\n\n`nasm file.asm -o file.com`\n\n#### Listing\n\n`nasm file.asm  -o file.com -l file.lst`\n\n#### Run:\n\n`file.com`\n\n#### For Degugger\n\n`afd file.com`\n\n## Ubuntu\n\n### 1. Assemble the File:\n\nIf your file uses modern NASM syntax and is correctly formatted, assemble it like this:\n\n`nasm -f elf64 yourfile.asm -o yourfile.o`\n\n### 2. Link the Object File:\n\nFor first one\n\n`    ld -o yourfile yourfile.o`\n\n### 3. Run the Executable\n\n`    ./yourprogram`\n\n### 4. Checking for Common Issues\n\nIf you encounter issues, consider the following:\n\n#### i. File Paths:\n\nEnsure that the file paths used in the mov rsi, msg instruction correctly point to the message in your .asm file.\n\n#### ii. Syscall Numbers:\n\nVerify that the syscall numbers used (1 for sys_write and 60 for sys_exit) are correct for your system.\n\n#### iii. Permissions:\n\nEnsure the executable has execute permissions. If not, set the correct permissions using:\n\n`    chmod +x yourprogram`\n\n### 5. Debugging\n\nIf you encounter issues or need to debug your assembly program, follow these steps:\n\n#### i. Assemble with Debug Information\n\nGenerate debugging information during the assembly process:\n\n`nasm -f elf64 -g yourfile.asm -o yourfile.o `\n\n#### ii. Link with Debug Information\n\n`ld -g -o yourprogram yourfile.o 3. `\n\n#### iii. Run in gdb\n\nUse gdb (GNU Debugger) to debug your program:\n\n`gdb ./yourprogram`\n\nInside gdb, you can set breakpoints and step through the code to identify where it might be failing. For example:\n\n**Set a Breakpoint:** `break \\_start`\n\n**Run the Program:** `run`\n\n**Step Through Code:** `step`\n\n**Continue Execution:** `continue`\n\n**Print Registers or Variables:** `print rax` (or other registers)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fabdullah-niaz%2Fcoal","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fabdullah-niaz%2Fcoal","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fabdullah-niaz%2Fcoal/lists"}