{"id":28520245,"url":"https://github.com/abnormalhare/bad-x86_64","last_synced_at":"2026-05-20T05:07:52.397Z","repository":{"id":291155251,"uuid":"976752790","full_name":"abnormalhare/Bad-x86_64","owner":"abnormalhare","description":"The worst way to make an x86_64 emulator.","archived":false,"fork":false,"pushed_at":"2025-06-22T01:54:06.000Z","size":528,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-07-01T07:03:36.042Z","etag":null,"topics":["assembly","emulator","x86-64"],"latest_commit_sha":null,"homepage":"","language":"C","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/abnormalhare.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,"zenodo":null}},"created_at":"2025-05-02T17:25:15.000Z","updated_at":"2025-06-22T01:54:09.000Z","dependencies_parsed_at":"2025-05-02T19:23:15.789Z","dependency_job_id":"fc1565ba-fddf-420a-838b-294224037ab0","html_url":"https://github.com/abnormalhare/Bad-x86_64","commit_stats":null,"previous_names":["abnormalhare/bad-x86_64"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/abnormalhare/Bad-x86_64","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abnormalhare%2FBad-x86_64","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abnormalhare%2FBad-x86_64/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abnormalhare%2FBad-x86_64/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abnormalhare%2FBad-x86_64/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/abnormalhare","download_url":"https://codeload.github.com/abnormalhare/Bad-x86_64/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abnormalhare%2FBad-x86_64/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273886638,"owners_count":25185509,"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","status":"online","status_checked_at":"2025-09-06T02:00:13.247Z","response_time":2576,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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","emulator","x86-64"],"created_at":"2025-06-09T07:01:07.520Z","updated_at":"2026-05-20T05:07:52.365Z","avatar_url":"https://github.com/abnormalhare.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Bad x86_64\nThe worst way to make an x86_64 emulator. This is a library. The file to include is `x86.c`.\n\n## How to use\n\nUse this code block and the comments as a simple way to use this emulator!\n```c\n#include \"x86/x86.h\"\n\n// These are codefuncs. Store these in the stack to call them.\nvoid asm_func(void) {\n  // ASM_XX() -\u003e An opcode or prefix. This is how the emulator runs.\n\n  // functions with an X, L, or H require the specific opcode run to be input\n  // (these functions are: 4X, 5L, 5H, and BH)\n  ASM_4X(0x48);\n  ASM_01(0xC0, 0x00, NULL); // 0x48 0x01 0xC0 =\u003e add rax, rax\n\n  ASM_C3();\n}\n\nvoid setupStack() {\n  { STACK8(temp, 0); *temp = 'M'; } // this is how to store data into the stack\n  { STACK16(temp, 8); *temp = 0x3F40; }\n  { STACK32(temp, 0x24); *temp = 0x46404938; }\n  { STACK64(temp, 0x1000); *temp = (u64)\u0026asm_func; }\n      // s and u types are predefined! (s8, s16..., u8, u16...)\n}\n\nint main() {\n  // initialize the stack\n  ASM_init();\n  setupStack();\n\n  ASM_incIP(0x1000, NULL); // set instruction pointer\n  regs[4].r -= 8; // its suggested to decrement the stack pointer by 1 64bit number\n  ASM_codeFunc func = ASM_getCurrFunc(); // get the function at the IP\n  func(); // call the function\n\n  // optionally: you can end the program that prints out the final status of the registers\n  ASM_regPrint();\n}\n```\n\nCheckout checklist.txt to see the currently implemented opcodes!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fabnormalhare%2Fbad-x86_64","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fabnormalhare%2Fbad-x86_64","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fabnormalhare%2Fbad-x86_64/lists"}