{"id":13835983,"url":"https://github.com/yds12/x64-roadmap","last_synced_at":"2025-04-10T05:50:58.710Z","repository":{"id":143440153,"uuid":"263876893","full_name":"yds12/x64-roadmap","owner":"yds12","description":"A roadmap to learn x64 assembly using nasm on Linux.","archived":false,"fork":false,"pushed_at":"2020-07-16T15:54:20.000Z","size":675,"stargazers_count":73,"open_issues_count":1,"forks_count":9,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-02-17T06:33:05.545Z","etag":null,"topics":["assembly","assembly-language","assembly-x86-64","guide","linux","nasm","nasm-assembly","tutorial"],"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/yds12.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}},"created_at":"2020-05-14T09:52:42.000Z","updated_at":"2024-02-04T09:33:52.000Z","dependencies_parsed_at":"2023-06-06T18:00:14.627Z","dependency_job_id":null,"html_url":"https://github.com/yds12/x64-roadmap","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yds12%2Fx64-roadmap","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yds12%2Fx64-roadmap/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yds12%2Fx64-roadmap/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yds12%2Fx64-roadmap/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yds12","download_url":"https://codeload.github.com/yds12/x64-roadmap/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248166926,"owners_count":21058480,"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":["assembly","assembly-language","assembly-x86-64","guide","linux","nasm","nasm-assembly","tutorial"],"created_at":"2024-08-04T15:00:31.604Z","updated_at":"2025-04-10T05:50:58.677Z","avatar_url":"https://github.com/yds12.png","language":"Assembly","funding_links":[],"categories":["Assembly"],"sub_categories":[],"readme":"This is a roadmap for learning x86 assembly, using\n[nasm](https://www.nasm.us/) on Linux. I will try to list the topics as I\nlearn, sorting them from the most basic to most advanced, adding a series of\nsmall tasks and reference material for each topic.\n\nAs I complete each task/topic, a check mark (✓) will be added to the item\nand a pointer to the solution will be provided. All solutions are inside\nthe `tasks` directory.\n\n# Roadmap\n\n## The Basics\n\n* ✓ Install the necessary tools ([`installation/`](tasks/installation))\n\n  * ✓ Install `nasm` ([`nasm.md`](tasks/installation/nasm.md))\n\n  * ✓ Install `ld`, `gcc`, `hexdump`, `objdump` (most Linux distros \n  already come with this installed)\n\n* ✓ First program: the `exit` system call ([`first_prog/`](tasks/first_prog))\n\n  * ✓ Write, assemble and run a program that \"does nothing\", and check \n  the return value ([`build.md`](tasks/first_prog/build.md))\n\n  * ✓ Try to exit with various exit codes \n  ([`exit8.asm`](tasks/first_prog/exit8.asm) and\n  [`exit256.asm`](tasks/first_prog/exit256.asm))\n\n* ✓ Make a \"hello world\" program ([`hello.asm`](tasks/helloworld/hello.asm))\n\n* ✓ Call assembly functions from C ([`call_from_c`](tasks/call_from_c/run.md))\n\n  * ✓ Write an assembly program with a callable function that returns a\n  64-bit integer ([`ret_int64.asm`](tasks/call_from_c/ret_int64.asm))\n\n  * ✓ Write a small C program that calls this assembly function and displays\n  the result in decimal, hexadecimal and binary formats \n  ([`caller.c`](tasks/call_from_c/caller.c))\n\n  * ✓ Write a program with a function that returns a negative number\n  ([`ret_neg.asm`](tasks/call_from_c/ret_neg.asm))\n\n* Registers ([`registers`](tasks/registers))\n\n  * ✓ Register names and sizes ([theory](tasks/registers/theory.md))\n\n  * The `mov` instruction\n\n  * ✓ Write a program that moves values between registers of different sizes\n  ([run](tasks/registers/run.md))\n\n  * The `xchg` instruction\n\n* ✓ Look into machine code \n  ([`inspect_binary/howto.md`](tasks/inspect_binary/howto.md))\n\n  * ✓ Check out the machine code of a program with `hexdump`\n\n  * ✓ Disassemble a program with `objdump`\n\n* ✓ Basic Arithmetic ([`arithmetic/run.md`](tasks/arithmetic/run.md))\n\n  * ✓ Make a program that sums two numbers \n  ([`add.asm`](tasks/arithmetic/add.asm))\n\n  * ✓ Make a program that subtracts two numbers\n  ([`sub.asm`](tasks/arithmetic/sub.asm))\n  \n  * ✓ Make a program that uses increment\n  ([`inc.asm`](tasks/arithmetic/inc.asm))\n\n  * ✓ Make a program that uses decrement\n  ([`dec.asm`](tasks/arithmetic/dec.asm))\n\n  * ✓ Make a program that uses unsigned integer multiplication\n  ([`mul.asm`](tasks/arithmetic/mul.asm))\n  \n  * ✓ Make a program that uses signed integer multiplication\n  ([`imul.asm`](tasks/arithmetic/imul.asm))\n\n  * ✓ Make a program that obtains the negative of a number\n  ([`neg.asm`](tasks/arithmetic/neg.asm))\n\n* ✓ Labels and Unconditional Jumps ([`jump`](tasks/jump))\n\n  * ✓ Write a program with a `jmp` instruction\n  ([`jump.asm`](tasks/jump/jump.asm) and [`labels.asm`](tasks/jump/labels.asm))\n\n* ✓ Flags, Comparisons and Conditional Jumps \n  ([`flags/theory.md`](tasks/flags/theory.md))\n\n  * ✓ Write a program with a conditional jump \n  ([`cond_jump.asm`](tasks/flags/cond_jump.asm))\n\n  * ✓ Write a program with a loop ([`loop.asm`](tasks/flags/loop.asm))\n\n  * ✓ Write a program using the overflow flag\n  ([`overflow.asm`](tasks/flags/overflow.asm))\n\n  * ✓ Write a program contrasting the above and below comparisons with the\n  greater than and less than comparisons\n  ([`above_below.asm`](tasks/flags/above_below.asm))\n\n* Logical and Bitwise Operations ([`logical`](tasks/logical))\n\n  * ✓ Use AND and OR ([`and_or.asm`](tasks/logical/and_or.asm))\n  \n  * ✓ Use NOT and XOR ([`not_xor.asm`](tasks/logical/not_xor.asm))\n\n  * ✓ Shift and Rotate operations ([`shift.asm`](tasks/logical/shift.asm))\n\n* ✓ Data Types, Memory Addressing and the `.data` Section\n  ([`data/run.md`](tasks/data/run.md))\n\n  * ✓ How memory works in Linux?\n  ([`theory.md`](tasks/data/theory.md))\n\n  * ✓ Write a program that uses the `.data` section\n  ([`print_data.asm`](tasks/data/print_data.asm))\n \n  * ✓ Write a program that uses different data types\n  ([`types.asm`](tasks/data/types.asm))\n\n  * ✓ Write a program that uses addressing with displacement\n  ([`ret4bytes.asm`](tasks/data/ret4bytes.asm))\n\n  * ✓ Write a program using addressing with a base register,\n  an index register and scale factor\n  ([`ret_words.asm`](tasks/data/ret_words.asm))\n\n  * ✓ Write a program using the `.bss` section\n  ([`bss.asm`](tasks/data/bss.asm))\n\n  * ✓ Write a program that uses a \"global variable\" from the `.bss` section\n  ([`var_bss.asm`](tasks/data/var_bss.asm))\n\n  * ✓ Write a program that increments a \"global variable\" from the \n  `.bss` section ([`inc_var.asm`](tasks/data/inc_var.asm))\n\n  * ✓ Write a program that manipulates an array\n  ([`array.asm`](tasks/data/array.asm))\n\n* ✓ The Stack ([`stack/theory.md`](tasks/stack/theory.md))\n\n  * ✓ Write a program that uses `push` and `pop`\n  ([`push_pop.asm`](tasks/stack/push_pop.asm))\n\n  * ✓ Write a program that uses the stack pointer to allocate space and\n  access elements on the stack ([`sp.asm`](tasks/stack/sp.asm) and\n  [`sp2.asm`](tasks/stack/sp2.asm))\n\n* ✓ The `call` Instruction ([`call/theory.md`](tasks/call/theory.md))\n\n  * ✓ Write a program that uses `call` ([`call.asm`](tasks/call/call.asm))\n\n  * ✓ Write a program that `call`s a `print` function/subroutine\n  ([`print_func.asm`](tasks/call/print_func.asm))\n\n* Calling External Functions\n\n  * ✓ Write a program divided in two files using `extern`/`global`\n  ([`uselib.asm`](tasks/extern/uselib.asm) and\n  [`lib.asm`](tasks/extern/lib.asm))\n\n  * ✓ Write a program divided into two `.asm` files using the `include` macro\n  ([`includer.asm`](tasks/extern/includer.asm) and\n  [`include.asm`](tasks/extern/include.asm))\n\n  * Write a library with a function containing arguments, and call it from\n  another `asm` file\n\n  * Call a function from C\n\n  * Write an assembly library function that takes arguments, and call it from C\n\n  * Write an assembly program that calls a C function\n\n  * ✓ Write an assembly program that calls a C library function\n  ([`malloc.asm`](tasks/extern/malloc.asm))\n\n* Using the Heap\n\n  * Use C's `malloc` and `free` to allocate and free memory dynamically\n\n* Special `mov` instructions\n\n  * Sign and Zero Extend `mov` and \"size casting\" directive\n\n  * Conditional `mov`\n\n* ✓ Arithmetic 2\n\n  * ✓ Write a program with division operations\n  ([`idiv.asm`](tasks/arith2/idiv.asm))\n  \n  * ✓ Write a program that does proper signed divisions with sign extensions\n  ([`sx.asm`](tasks/arith2/sx.asm))\n\n* Manipulating Strings\n\n* Floating point arithmetic\n\n* NASM local labels\n\n## Challenges\n\n* Write a function that receives an integer and prints it\n\n* Write a function that receives an integer and returns a string with it\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyds12%2Fx64-roadmap","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyds12%2Fx64-roadmap","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyds12%2Fx64-roadmap/lists"}