{"id":23668734,"url":"https://github.com/maurocamerini/som8086","last_synced_at":"2026-05-15T21:38:08.693Z","repository":{"id":270178922,"uuid":"909557996","full_name":"MauroCamerini/SOM8086","owner":"MauroCamerini","description":"Tiny operating system for the 8086 processor","archived":false,"fork":false,"pushed_at":"2024-12-30T16:58:57.000Z","size":108,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-21T01:15:29.376Z","etag":null,"topics":["assembly","bootloader","operating-system","virtual-machine"],"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/MauroCamerini.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":"2024-12-29T04:24:52.000Z","updated_at":"2024-12-30T16:59:00.000Z","dependencies_parsed_at":"2024-12-29T05:22:34.773Z","dependency_job_id":"523e8b1e-4a78-4ee2-bbae-35af87d3ec07","html_url":"https://github.com/MauroCamerini/SOM8086","commit_stats":null,"previous_names":["maurocamerini/som8086"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/MauroCamerini/SOM8086","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MauroCamerini%2FSOM8086","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MauroCamerini%2FSOM8086/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MauroCamerini%2FSOM8086/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MauroCamerini%2FSOM8086/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MauroCamerini","download_url":"https://codeload.github.com/MauroCamerini/SOM8086/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MauroCamerini%2FSOM8086/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265554781,"owners_count":23787279,"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","bootloader","operating-system","virtual-machine"],"created_at":"2024-12-29T08:13:50.092Z","updated_at":"2026-05-15T21:38:08.646Z","avatar_url":"https://github.com/MauroCamerini.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Sistema Operativo M 8086 (SOM8086)  \n*M Operating System 8086*  \n\nThis is a project I worked on during 2015/2016. The goal was to build a tiny operating system for the 8086 processor, which was used in early PCs (the x86 32-bit processor family began in 8086 mode). It is written in C and Assembly.  \n\nI made significant progress: I developed a bootloader to boot from a floppy disk that loaded the full binary into memory. Once laoded, the operating system runs command line user interface.\n\nThe project, however, did not reach the stage where the OS could load other programs or execute commands. Despite this, I find the repository very interesting and well-documented.  \n\n[Legacy documentation (in spanish) here](/docs/LEGACY.md)\n\n### Download\nOpen a terminal on your desired directory and run:\n```bash\ngit clone https://github.com/MauroCamerini/SOM8086.git\n```\n## Try It Yourself  \nBecause SOM8086 is an operating system, it needs to be installed on a disk image and run in a virtual machine. The repository includes binaries and disk images, so you can test it directly. *Back in the day it worked; recently I tried with QEMU and VirtualBox with bad results.*\n\n### QEMU\nWith [QEMU](https://www.qemu.org/), it runs but inmmediatelly stops. I downloaded the [2023-08-22 QEMU installer (8.1.0)](https://qemu.weilnetz.de/w64/2023/qemu-w64-setup-20230822.exe) for security reasons, it's the last installer that has a valid certificate.\n1. Download and install QEMU\n2. Run:\n```bash\ncd \"C:/Program Files/qemu\"\n./qemu-system-i386 -fda \"%YOURFOLDER%/SOM8086/disk/DISCOM.IMA\"\n```\nWhere %YOURFOLDER% is the path to where you copied the repository.\n### Virtual Box\nI created a VirtualBox VM using the `disk/CDARNQ.ISO` image. Apparently it runs, but it does not capture keystrokes.\n\n## Build Instructions\nThis project was developed on Windows, so the instructions provided are tailored to that environment.\n\n### Required tools\n- **`make`:** It is a tool which controls the generation of executables from the program's source files. It gets its knowledge of how to build your program from a file called the *makefile*.\nWatch out the [main page of GNU Make](https://www.gnu.org/software/make/). You can get the Windows version on [Make for Windows](https://gnuwin32.sourceforge.net/packages/make.htm) or using [MinGW](https://www.mingw-w64.org/).\n- **`wcc`:** [Open Watcom](https://www.openwatcom.org/) C compiler.  \n- **`wlink`:** The linker provided with Watcom C/C++.  \n- **`nasm`:** [NASM, the Netwide Assembler](https://github.com/netwide-assembler/nasm).  \n**Ensure these programs are added to the `%PATH%`.**  \n\n### Clone the repository\nOpen a terminal on your desired directory and run\n```bash\ngit clone https://github.com/MauroCamerini/SOM8086.git\ncd SOM8086\n```\n### Build `nucleo.bin` (Kernel)  \nThe `/src` directory contains a Makefile for compiling the kernel. Use the following command to build it:  \n```bash\ncd SOM8086/src\nmake\n```  \nIt compiles `.asm` files with NASM and `.c` files with OpenWatcom into `.obj` files on the `obj` directory. Then it links everything into `nucleo.bin` file using WLINK. Compiler options ensure that only 8086 instructions are used, and the final binary is a pure binary file without a header.\n\n#### NASM Options  \n- `-f` Specifies the output format: OBJ.  \n\n#### OpenWatcom `wcc` Options  \n- `-0` Use 8086 instructions.  \n- `-d0` Disable debugging information.  \n- `-ms` Use \"small\" memory model (CS = ES = DS).  \n- `-s` Disable stack overflow checks.  \n- `-wx` Enable maximum warning level.  \n- `-zl` Exclude library references in the object file.  \n- `-i` Include directory for `.h` files.  \n\n### `arranque.bin` (Bootloader)  \nThere is a `crear.bat` *(make)* script to build the bootloader. \n```bash\ncd arranque\ncrear\n``` \nIt is compiled with NASM and translates the assembly code directly into its corresponding processor instructions. No linking or any other process is required. This routine is compiled into a 512-byte binary file.\n\n### Utilities  \nTwo utilities are provided on the `utils` direcyory:  \n1. **`insarnq`:** It is used to copy `arranque.bin` file into the boot sector of a specified disk image file.  \n2. **`leernbp`:** Displays the boot sector information of a disk image file. \nThese utilities are standalone tools and must be compiled directly on your PC's system as target, because they are not part of the OS. Here again, if you have [MinGW](https://www.mingw-w64.org/) installed you can run:\n```bash\ncd utils\ngcc insarnq.c\ngcc leernbp.c\n``` \n---\n\n### Instructions to install\n\n1. Create a 3.5\" 1.44MB floppy disk image. I used [WinImage](http://www.winimage.com) by Gilles Vollant, but the website seems broken. Other similar tools may work. *You can use the `leernbp` utility to check if the created image has the right format.*\n2. Overwrite the disk image's boot sector with `arranque.bin` using the `insarnq` utility. \n```bash\ninsarnq arranque.bin floppy.ima\n``` \n3. Copy the `nucleo.bin` file into the disk image. **It must be the very first file written to the disk** because the bootloader blindly loads the first file. It does not check the file system's indication of how the file fragments are stored on the disk.\n4. Mount the disk image in a virtual machine.  \n5. Enjoy!  \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaurocamerini%2Fsom8086","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmaurocamerini%2Fsom8086","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaurocamerini%2Fsom8086/lists"}