{"id":15060317,"url":"https://github.com/ibara/8088ify","last_synced_at":"2025-07-25T07:33:36.248Z","repository":{"id":49428461,"uuid":"372560569","full_name":"ibara/8088ify","owner":"ibara","description":"The famous Intel 8080 CP/M 2.2 to Intel 8086/8088 MS-DOS assembly language translator.","archived":false,"fork":false,"pushed_at":"2022-02-26T14:22:41.000Z","size":425,"stargazers_count":90,"open_issues_count":0,"forks_count":4,"subscribers_count":9,"default_branch":"main","last_synced_at":"2025-04-10T05:54:49.932Z","etag":null,"topics":["8080","8086","8088","assembler","assembly","c","cp-m","cpm","dos","ibm-pc","intel","ms-dos","msdos","open-watcom","retro","retrocomputer","retrocomputing","transpiler","unix","x86"],"latest_commit_sha":null,"homepage":"https://briancallahan.net/blog/20210606.html","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"isc","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ibara.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}},"created_at":"2021-05-31T15:58:31.000Z","updated_at":"2025-01-18T04:59:13.000Z","dependencies_parsed_at":"2022-08-29T10:30:26.888Z","dependency_job_id":null,"html_url":"https://github.com/ibara/8088ify","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/ibara/8088ify","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ibara%2F8088ify","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ibara%2F8088ify/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ibara%2F8088ify/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ibara%2F8088ify/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ibara","download_url":"https://codeload.github.com/ibara/8088ify/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ibara%2F8088ify/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266973162,"owners_count":24014627,"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-07-25T02:00:09.625Z","response_time":70,"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":["8080","8086","8088","assembler","assembly","c","cp-m","cpm","dos","ibm-pc","intel","ms-dos","msdos","open-watcom","retro","retrocomputer","retrocomputing","transpiler","unix","x86"],"created_at":"2024-09-24T22:56:43.288Z","updated_at":"2025-07-25T07:33:36.221Z","avatar_url":"https://github.com/ibara.png","language":"C","funding_links":[],"categories":["C"],"sub_categories":[],"readme":"8088ify\n=======\n`8088ify` is an Intel 8080 CP/M 2.2 to Intel 8086 (8088)\nMS-DOS assembly language translator. This means that\n`8088ify` reads in assembly language written for the Intel\n8080 and outputs an equivalent assembly program for the\nIntel 8086/8088. As many of us home computer users begin\ntransitioning to the IBM PC with its 16-bit Intel 8088 CPU\nand new IBM PC DOS operating system, we need not bid\nfarewell to our CP/M programs. `8088ify` is the tool to\nbring our home computing out of the 1970s and into the\n1980s and beyond. No need to depend upon expensive and\nunreliable 8080 emulators!\n\n`8088ify` was written for\n[PCjam 2021](https://pcjam.gitlab.io/).\n\n![8088ify converting hello world program](8088ify.gif)\n\nWe're famous!\n-------------\n`8088ify` has been featured on\n[Hacker News](https://news.ycombinator.com/item?id=27399039)\nand\n[Hackaday](https://hackaday.com/2021/06/13/translate-your-cp-m-code-to-8086-and-leave-the-1970s-behind/).\nWe are even mentioned on\n[Wikipedia](https://en.wikipedia.org/wiki/Source-to-source_compiler#Others).\n\nThanks to everyone for sharing this project.\n\nWhy?\n----\nI could not find an open source translator between Intel\n8080 and Intel 8086/8088. The 8080 and 8088 CPUs were\ncontemporaries from the introduction of the 8088 in 1979 to\nthe discontinuation of the 8080 in 1990. Not being able to\neasily find such a translation tool surprised me.\n\nIt may be lesser-known that Intel had the porting of 8080\nassembly code to 8086/8088 in mind when designing the\n8086/8088. According to\n[this retrocomputing forum post](https://retrocomputingforum.com/t/translation-of-8080-code-to-8086/1309),\nIntel even produced documentation of conversion tables\nbetween the 8080 and the 8086/8088. Unfortunately, I was\nunable to find that document. However, there was a\ncommercial tool written by Digital Research, Inc., XLT86,\nthat could translate from 8080 to 8086/8088 assembly. XLT86\nwas designed for translation from CP/M-80 to CP/M-86 and\nrelated DRI operating systems. The XLT86 users manual, which\ncontains DRI's own 8080 to 8086/8088 conversion tables, is\n[available](http://s100computers.com/Software%20Folder/Assembler%20Collection/Digital%20Research%20XLT86%20Manual.pdf),\nand which I used for `8088ify`.\n\nLater, @bilegeek altered me to \n[an official Intel document](http://www.bitsavers.org/pdf/intel/ISIS_II/9800642A_MCS-86_Assembly_Language_Converter_Operating_Instructions_for_ISIS-II_Users_Mar79.pdf)\nfor Intel's own 8080 to 8086 translator program.\n\nBuilding\n--------\nRun your C compiler on `8088ify.c`. It is a single-file C\nutility and written in ANSI C. As `8088ify` was written on\n[OpenBSD](https://www.openbsd.org/),\nI can verify that it works equally as well on Unix as\nMS-DOS. It even runs on CP/M and Windows!\n\n`8088ify` should compile with any ANSI C compiler that\nincludes a `strtol()` function. I may remedy this in the\nfuture with a built-in `strtol()` function, but as Open\nWatcom v2 has the function, I have not (yet) found a need.\n\n`8088ify` can be compiled as a standalone application for\nUnix, as a standalone application for Windows using the\n[Digital Mars C/C++ Compiler](https://digitalmars.com/),\nnatively compiled on MS-DOS using\n[Open Watcom v2](https://open-watcom.github.io/),\ncross compiled on Unix for MS-DOS using\n[the Amsterdam Compiler Kit](http://tack.sourceforge.net/),\nor cross compiled on Unix for CP/M using the Amsterdam\nCompiler Kit.\n\nWhen compiling for Unix, the following compiler invocation\nis recomended:\n```\n$ cc -O2 -pipe -o 8088ify 8088ify.c\n```\n\nWhen compiling for Windows, the following compiler\ninvocation is recommended:\n```\n\u003e dmc 8088ify.c -o\n```\n\nWhen compiling for MS-DOS with Open Watcom v2, the following\ncompiler invocation is recommended:\n```\n\u003e wcl -0 -ox -mt 8088ify.c\n```\n\nWhen compiling for MS-DOS with the Amsterdam Compiler Kit,\nthe following compiler invocation is recommended:\n```\n$ ack -mmsdos86 -O2 -o 8088ify.com 8088ify.c\n```\n\nWhen compiling for CP/M with the Amsterdam Compiler Kit, the\nfollowing compiler invocation is recommended:\n```\n$ ack -mcpm -O2 -o 8088ify.com 8088ify.c\n```\n\nThe included `Makefile` is for creating a Unix binary,\nsorry.\n\nRunning\n-------\n`usage: 8088ify infile.asm outfile.asm`\n\nSo long as your system is able to open the input and output\nfiles, `8088ify` will not fail. That is to say, it is only\na mechanical translator. `8088ify` does not perform any\nsemantic or syntactic analysis; it assumes the input\nassembly is valid. The user should review the output before\nattempting assembly.\n\nAssembling translated programs\n------------------------------\n`8088ify` targets\n[nasm](https://nasm.us/).\nIt has been a long time since nasm built 16-bit DOS\nbinaries. In this repository you will find binaries of nasm\n0.98.31, as found on\n[Sourceforge](https://sourceforge.net/projects/nasm/files/DOS%2016-bit%20binaries%20%28OBSOLETE%29/),\nwhich do work on an 8086 (tested via DOSBox-X).\n\nTo create binaries, the following nasm command can be used:\n```\nnasm -f bin -o prog.com prog.asm\n```\n\nWhere `prog.asm` is the name of your assembly program output\nfrom `8088ify` and `prog.com` is the name you want for your\nfinal binary. This also means that all programs translated\nby `8088ify` target the tiny memory model only. This could\nbe improved in the future.\n\nNOTE: This version of nasm is licensed under the LGPLv2.1+.\nYou can find a copy of the LGPLv2.1 license\n[here](https://www.gnu.org/licenses/old-licenses/lgpl-2.1.en.html).\nThis license does not affect the license of `8088ify`.\n\nExamples\n--------\nIn the `examples` directory you will find two example\nprograms: `hello.asm` which is a typical hello world\nprogram and `TST8080.ASM` which tests all the opcodes of the\n8080 to ensure correct functionality.\n\nTo demonstrate `8088ify`, there are two additional example\nprograms: `test1.asm` and `test2.asm`. The `test1.asm` file\nis the result of running `TST8080.ASM` through `8088ify`.\nThe `test2.asm` file is the result of fixing all the nasm\nerrors reported on `test1.asm`. A diff between the two files\ncan be found in `test.diff`.\n\nCaveats\n-------\n`8088ify` assumes no single line of input assembly code will\nexceed 255 characters. It will truncate lines longer than\n255 characters, but still output assembly for what it did\nread in before truncation.\n\nComments are carried over to the output assembly. They may\nnot make sense for an 8086/8088 CPU.\n\nAn attempt is made to detect calls to the CP/M BDOS:\n`call 0005h`. The first `equ` statement to assign the value\n5 to a label will be assumed to be the BDOS label and used\nfor all `call` and `jmp` checks.\n\nCalls to `0000h` are also special-cased and will result in\nan MS-DOS termination call. As with `0005h`, the first `equ`\nstatement to assign the value 0 to a label will be assumed\nto be the warm reboot label and used for all `call` and\n`jmp` checks.\n\nLine separation with `!` is detected but not properly used.\nSplit those lines before running `8088ify`.\n\nNo macro facilities. Preprocess your assembly before running\nit through `8088ify`.\n\nI don't actually know if `8088ify` or the programs it\ngenerates will work on the original IBM PC DOS. But I didn't\nwant to ruin the anachronistic sales pitch at the top of\nthis file. `8088ify` was tested on\n[DOSBox-X](https://dosbox-x.com/)\nwith the 8086 core. Both it and the programs it generates\nwork with the 8086 core.\n\nNot all programs can be mechanically translated and just\nwork. There exists fundamental differences between 8080 and\n8086 assembly that need to be smoothed over by hand if such\nincompatibilties exist in the original 8080 assembly.\n\nIf you see the following warning from nasm:\n`warning: uninitialized space declared in .text section: zeroing`\neverything is fine. This is in fact the desired behavior.\nNewer versions of nasm have a command line option to disable\nthis warning but the older 16-bit versions of nasm do not.\n\nBugs\n----\nNone! As far as I know...\n\nIf you find one, please open an Issue or (better!) a Pull\nRequest with a diff.\n\nLicense\n-------\nISC License. See `LICENSE` for details.\n\nReleases\n--------\nThe current release is 8088ify-1.2; a tarball can be found\nin the Releases section.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fibara%2F8088ify","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fibara%2F8088ify","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fibara%2F8088ify/lists"}