{
    "archive_path": "archive/1783447153.649778",
    "base_url": "nuclear.mutantstargoat.com/articles/retrocoding/dos01-setup",
    "basename": "",
    "bookmarked_date": "2026-07-07 17:59",
    "canonical": {
        "archive_org_path": "https://web.archive.org/web/nuclear.mutantstargoat.com/articles/retrocoding/dos01-setup",
        "dom_path": "output.html",
        "favicon_path": "favicon.ico",
        "git_path": "git/",
        "google_favicon_path": "https://www.google.com/s2/favicons?domain=nuclear.mutantstargoat.com",
        "headers_path": "headers.json",
        "htmltotext_path": "htmltotext.txt",
        "index_path": "index.html",
        "media_path": "media/",
        "mercury_path": "mercury/content.html",
        "pdf_path": "output.pdf",
        "readability_path": "readability/content.html",
        "screenshot_path": "screenshot.png",
        "singlefile_path": "singlefile.html",
        "warc_path": "warc/",
        "wget_path": "nuclear.mutantstargoat.com/articles/retrocoding/dos01-setup/index.html"
    },
    "domain": "nuclear.mutantstargoat.com",
    "extension": "",
    "hash": "1B0D257QSJWNEMT1BBPZ",
    "history": {
        "archive_org": [
            {
                "cmd": [
                    "curl",
                    "--silent",
                    "--location",
                    "--compressed",
                    "--head",
                    "--max-time",
                    "60",
                    "--user-agent",
                    "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/118.0.0.0 Safari/537.36 ArchiveBox/0.7.3 (+https://github.com/ArchiveBox/ArchiveBox/) curl/curl 8.10.1 (x86_64-pc-linux-gnu)",
                    "https://web.archive.org/save/http://nuclear.mutantstargoat.com/articles/retrocoding/dos01-setup/"
                ],
                "cmd_version": "curl 8.10.1 (x86_64-pc-linux-gnu)",
                "end_ts": "2026-07-07T18:00:32.640760+00:00",
                "index_texts": null,
                "output": "TimeoutExpired: Command '['curl', '--silent', '--location', '--compressed', '--head', '--max-time', '60', '--user-agent', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/118.0.0.0 Safari/537.36 ArchiveBox/0.7.3 (+https://github.com/ArchiveBox/ArchiveBox/) curl/curl 8.10.1 (x86_64-pc-linux-gnu)', 'https://web.archive.org/save/http://nuclear.mutantstargoat.com/articles/retrocoding/dos01-setup/']' timed out after 60 seconds",
                "pwd": "/data/archive/1783447153.649778",
                "schema": "ArchiveResult",
                "start_ts": "2026-07-07T17:59:32.624625+00:00",
                "status": "failed"
            }
        ],
        "dom": [
            {
                "cmd": [
                    "/usr/bin/chromium-browser",
                    "--headless=new",
                    "--no-sandbox",
                    "--no-zygote",
                    "--disable-dev-shm-usage",
                    "--disable-software-rasterizer",
                    "--run-all-compositor-stages-before-draw",
                    "--hide-scrollbars",
                    "--window-size=1440,2000",
                    "--autoplay-policy=no-user-gesture-required",
                    "--no-first-run",
                    "--use-fake-ui-for-media-stream",
                    "--use-fake-device-for-media-stream",
                    "--disable-sync",
                    "--user-agent=Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/118.0.0.0 Safari/537.36 ArchiveBox/0.7.3 (+https://github.com/ArchiveBox/ArchiveBox/)",
                    "--window-size=1440,2000",
                    "--dump-dom",
                    "http://nuclear.mutantstargoat.com/articles/retrocoding/dos01-setup/"
                ],
                "cmd_version": "Chromium 131.0.6778.33",
                "end_ts": "2026-07-07T17:59:27.238429+00:00",
                "index_texts": null,
                "output": "output.html",
                "pwd": "/data/archive/1783447153.649778",
                "schema": "ArchiveResult",
                "start_ts": "2026-07-07T17:59:26.181288+00:00",
                "status": "succeeded"
            }
        ],
        "favicon": [
            {
                "cmd": [
                    "curl",
                    "--silent",
                    "--location",
                    "--compressed",
                    "--max-time",
                    "60",
                    "--output",
                    "favicon.ico",
                    "--user-agent",
                    "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/118.0.0.0 Safari/537.36 ArchiveBox/0.7.3 (+https://github.com/ArchiveBox/ArchiveBox/) curl/curl 8.10.1 (x86_64-pc-linux-gnu)",
                    "https://www.google.com/s2/favicons?domain=nuclear.mutantstargoat.com"
                ],
                "cmd_version": "curl 8.10.1 (x86_64-pc-linux-gnu)",
                "end_ts": "2026-07-07T17:59:14.728533+00:00",
                "index_texts": null,
                "output": "favicon.ico",
                "pwd": "/data/archive/1783447153.649778",
                "schema": "ArchiveResult",
                "start_ts": "2026-07-07T17:59:14.341591+00:00",
                "status": "succeeded"
            }
        ],
        "git": [],
        "headers": [
            {
                "cmd": [
                    "curl",
                    "--silent",
                    "--location",
                    "--compressed",
                    "--head",
                    "--max-time",
                    "60",
                    "--user-agent",
                    "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/118.0.0.0 Safari/537.36 ArchiveBox/0.7.3 (+https://github.com/ArchiveBox/ArchiveBox/) curl/curl 8.10.1 (x86_64-pc-linux-gnu)",
                    "http://nuclear.mutantstargoat.com/articles/retrocoding/dos01-setup/"
                ],
                "cmd_version": "curl 8.10.1 (x86_64-pc-linux-gnu)",
                "end_ts": "2026-07-07T17:59:15.025817+00:00",
                "index_texts": null,
                "output": "headers.json",
                "pwd": "/data/archive/1783447153.649778",
                "schema": "ArchiveResult",
                "start_ts": "2026-07-07T17:59:14.737159+00:00",
                "status": "succeeded"
            }
        ],
        "htmltotext": [],
        "media": [
            {
                "cmd": [
                    "yt-dlp",
                    "--write-description",
                    "--write-info-json",
                    "--write-annotations",
                    "--write-thumbnail",
                    "--no-call-home",
                    "--write-sub",
                    "--write-auto-subs",
                    "--convert-subs=srt",
                    "--yes-playlist",
                    "--continue",
                    "--no-abort-on-error",
                    "--ignore-errors",
                    "--geo-bypass",
                    "--add-metadata",
                    "--format=(bv*+ba/b)[filesize<=750m][filesize_approx<=?750m]/(bv*+ba/b)",
                    "http://nuclear.mutantstargoat.com/articles/retrocoding/dos01-setup/"
                ],
                "cmd_version": "2024.12.13",
                "end_ts": "2026-07-07T17:59:32.619871+00:00",
                "index_texts": [],
                "output": "media",
                "pwd": "/data/archive/1783447153.649778",
                "schema": "ArchiveResult",
                "start_ts": "2026-07-07T17:59:30.597755+00:00",
                "status": "succeeded"
            }
        ],
        "mercury": [
            {
                "cmd": [
                    "/app/node_modules/@postlight/parser/cli.js",
                    "http://nuclear.mutantstargoat.com/articles/retrocoding/dos01-setup/"
                ],
                "cmd_version": "1.0.0",
                "end_ts": "2026-07-07T17:59:30.585066+00:00",
                "index_texts": null,
                "output": "mercury",
                "pwd": "/data/archive/1783447153.649778",
                "schema": "ArchiveResult",
                "start_ts": "2026-07-07T17:59:28.970136+00:00",
                "status": "succeeded"
            }
        ],
        "pdf": [
            {
                "cmd": [
                    "/usr/bin/chromium-browser",
                    "--headless=new",
                    "--no-sandbox",
                    "--no-zygote",
                    "--disable-dev-shm-usage",
                    "--disable-software-rasterizer",
                    "--run-all-compositor-stages-before-draw",
                    "--hide-scrollbars",
                    "--window-size=1440,2000",
                    "--autoplay-policy=no-user-gesture-required",
                    "--no-first-run",
                    "--use-fake-ui-for-media-stream",
                    "--use-fake-device-for-media-stream",
                    "--disable-sync",
                    "--user-agent=Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/118.0.0.0 Safari/537.36 ArchiveBox/0.7.3 (+https://github.com/ArchiveBox/ArchiveBox/)",
                    "--window-size=1440,2000",
                    "--print-to-pdf",
                    "http://nuclear.mutantstargoat.com/articles/retrocoding/dos01-setup/"
                ],
                "cmd_version": "Chromium 131.0.6778.33",
                "end_ts": "2026-07-07T17:59:24.869746+00:00",
                "index_texts": null,
                "output": "output.pdf",
                "pwd": "/data/archive/1783447153.649778",
                "schema": "ArchiveResult",
                "start_ts": "2026-07-07T17:59:23.537850+00:00",
                "status": "succeeded"
            }
        ],
        "readability": [
            {
                "cmd": [
                    "/app/node_modules/readability-extractor/readability-extractor",
                    "/tmp/tmph6l2ggji",
                    "http://nuclear.mutantstargoat.com/articles/retrocoding/dos01-setup/"
                ],
                "cmd_version": "0.0.11",
                "end_ts": "2026-07-07T17:59:28.953019+00:00",
                "index_texts": [
                    "DOS retrocoding 01 - setting up\n\n\n\n\nAuthor:\nJohn Tsiombikas (Nuclear of TheLab and Mindlapse).\nContact:\nnuclear@member.fsf.org\n\n\n\nContents\n\n1\u00a0\u00a0\u00a0Series introduction\n2\u00a0\u00a0\u00a0Overview of the intel PC architecture\n2.1\u00a0\u00a0\u00a016bit Real Mode\n2.2\u00a0\u00a0\u00a032bit protected mode\n\n\n3\u00a0\u00a0\u00a0Tooling up for DOS retrocoding\n3.1\u00a0\u00a0\u00a0DOSBox setup\n3.2\u00a0\u00a0\u00a0OpenWatcom setup\n3.3\u00a0\u00a0\u00a0Text Editor\n\n\n4\u00a0\u00a0\u00a0Hello World program\n4.1\u00a0\u00a0\u00a0Watcom Make\n\n\n\n\n\n1\u00a0\u00a0\u00a0Series introduction\nWelcome to the first part of my series of tutorials on DOS retrocoding. In this\nseries I will guide you through the basics of writing games or demos, on 90s era\nMS-DOS computers.\nI will, necessarilly, have to touch onto some graphics programming fundamendals\nalong the way, but I will not focus on high level graphics algorithms. Such\nconcepts are mostly platform-independent, and there are many texts available on\nthe subject (see Real-Time Rendering by M\u00f6ller, Haines and Hoffman).\nThe focus of this series is going to be on the aspects of programming for\ngames/demos, which modern systems handle for us. We will have to transcend the\nboundaries of typical modern user-level programs, into the field of what today\nwould be called kernel programming, but was once the bread and butter of any\ngame or demo hacker. This holistic systems programming approach which was\nrequired by 90s game development, is in a large extend the lure of such kind of\nretrocoding. It puts the programmer in the driver seat, requiring\ndeep understanding of the system on all levels, and minimizing 3rd party black\nboxes which, today, impede total knowledge and control.\nIf any of the above sound enticing to you, feel free to tag along.\n\n\n2\u00a0\u00a0\u00a0Overview of the intel PC architecture\n\n2.1\u00a0\u00a0\u00a016bit Real Mode\nAll x86 processors start running in 16bit mode after a reset, in order to\nmaintain backwards compatibility with programs written for the 8086. This 16bit\nmode is called \"real mode\", and it's the mode in which MS-DOS and most DOS\nprograms run.\nIn real mode the processor uses 20 bit addresses like the original 8088/8086,\nand can thus access up to 1MB of memory (2^20 bytes). The 20 bit addresses are\nformed by combining the value of a segment register with a 16bit offset. The\noffset is added to the value of the segment register shifted 4 bits to the left\nlike so:\n20     16     12      8      4      0\n +------+------+------+------+      .\n |15  12|11   8|7    4|3    0|      . segment\n +------+------+------+------+      .\n        +------+------+------+------+\n    +   |15  12|11   8|7    4|3    0| offset\n        +------+------+------+------+\n\nWhen talking about real-mode addresses, we often use the segment:offset\nnotation. So for instance the linear 20bit memory address abcde can be\naccessed by loading a segment register with the value a000 and using it\nwith the offset value bcde, in which case we refer to that address as\na000:bcde. Note that segments can overlap, and we could also access the\nexact same linear address as ab00:0cde, a00d:bc0e etc.\n\n\n2.2\u00a0\u00a0\u00a032bit protected mode\nIntel processors during our focus period of the 90s, had progressed far from\ntheir lowly 16bit ancestors used in the original IBM PC and AT. Starting from\nthe 386 and onwards, x86 processors where fully 32bit, featuring virtual memory,\npriviledge levels, and memory protection.\nIn 32bit protected mode, memory accesses use 32bit addresses, making it possible\nto access up to 4GB, which might as well be infinity for how ludicrously large\nit was back then. Addressing in protected mode then becomes much easier, as a\nsingle 32bit value can be used as a linear address; no more of all that\nsegment/offset nonsense.\nAs I mentioned previously, all x86 processors start in 16bit real mode, and it\ntakes explicit action by the program to switch into the 32bit protected mode of\noperation. The process of switching to protected mode and setting up a virtual\nmemory system is very interesting, and instructive on the inner workings of the\nx86 processor and the fundamendals of kernel programming. It is however\nsomewhat complicated, and was almost always delegated to specialized middleware\nlike DOS4G and Tran's PMODE. If you're interested in this subject, see my\n\"Kernel Development from Scratch\" series of articles:\nhttp://nuclear.mutantstargoat.com/articles/kerneldev/ (unfortunately currently\nonly available in Greek).\n\n\n\n\n4\u00a0\u00a0\u00a0Hello World program\nLet's write a hello world program to familiarize ourselves with our tools. To\nkeep it from being completely trivial in terms of build process, we'll break it\ninto two source files: main.c, and hello.c. Create a directory named\nhello (the DOS command for that is md hello), and create the\nthese two source files in there:\n\nvoid hello(void);\n\nint main(void)\n{\n    hello();\n    return 0;\n}\n\n\n \nvoid hello(void)\n{\n    printf(\"hello world!\\n\");\n}\n\nLet's compile them manually first, to observe Watcom build process more\nvividly. First we'll call the watcom 16bit C compiler to compile our source\nfiles into object code, then use the linker to combine the object files into an\nexecutable:\nC:\\HELLO>wcc main.c\nC:\\HELLO>wcc hello.c\nC:\\HELLO>wlink name hello.exe file { main.obj hello.obj }\n\nThe first two steps produce intermediate object files main.obj and\nhello.obj respectively, which are then fed to the linker to produce the\nfinal executable: hello.exe:\nC:\\HELLO>hello\nhello world!\n\nIf you try these commands yourself, you will notice that wcc prints a lot of\nmessages while compiling our source code, which tends to become annoying very\nfast. From now on we'll pass the -zq flag to the compiler to instruct it to\nshut up."
                ],
                "output": "readability",
                "pwd": "/data/archive/1783447153.649778",
                "schema": "ArchiveResult",
                "start_ts": "2026-07-07T17:59:28.024866+00:00",
                "status": "succeeded"
            }
        ],
        "screenshot": [
            {
                "cmd": [
                    "/usr/bin/chromium-browser",
                    "--headless=new",
                    "--no-sandbox",
                    "--no-zygote",
                    "--disable-dev-shm-usage",
                    "--disable-software-rasterizer",
                    "--run-all-compositor-stages-before-draw",
                    "--hide-scrollbars",
                    "--window-size=1440,2000",
                    "--autoplay-policy=no-user-gesture-required",
                    "--no-first-run",
                    "--use-fake-ui-for-media-stream",
                    "--use-fake-device-for-media-stream",
                    "--disable-sync",
                    "--user-agent=Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/118.0.0.0 Safari/537.36 ArchiveBox/0.7.3 (+https://github.com/ArchiveBox/ArchiveBox/)",
                    "--window-size=1440,2000",
                    "--screenshot",
                    "http://nuclear.mutantstargoat.com/articles/retrocoding/dos01-setup/"
                ],
                "cmd_version": "Chromium 131.0.6778.33",
                "end_ts": "2026-07-07T17:59:26.177026+00:00",
                "index_texts": null,
                "output": "screenshot.png",
                "pwd": "/data/archive/1783447153.649778",
                "schema": "ArchiveResult",
                "start_ts": "2026-07-07T17:59:24.873940+00:00",
                "status": "succeeded"
            }
        ],
        "singlefile": [
            {
                "cmd": [
                    "/app/node_modules/single-file-cli/single-file",
                    "--browser-executable-path=chromium-browser",
                    "--browser-args=[\"--headless=new\", \"--no-sandbox\", \"--no-zygote\", \"--disable-dev-shm-usage\", \"--disable-software-rasterizer\", \"--run-all-compositor-stages-before-draw\", \"--hide-scrollbars\", \"--window-size=1440,2000\", \"--autoplay-policy=no-user-gesture-required\", \"--no-first-run\", \"--use-fake-ui-for-media-stream\", \"--use-fake-device-for-media-stream\", \"--disable-sync\", \"--user-agent=Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/118.0.0.0 Safari/537.36 ArchiveBox/0.7.3 (+https://github.com/ArchiveBox/ArchiveBox/)\", \"--window-size=1440,2000\"]",
                    "http://nuclear.mutantstargoat.com/articles/retrocoding/dos01-setup/",
                    "singlefile.html"
                ],
                "cmd_version": "1.1.54",
                "end_ts": "2026-07-07T17:59:23.533560+00:00",
                "index_texts": null,
                "output": "singlefile.html",
                "pwd": "/data/archive/1783447153.649778",
                "schema": "ArchiveResult",
                "start_ts": "2026-07-07T17:59:15.030315+00:00",
                "status": "succeeded"
            }
        ],
        "title": [
            {
                "cmd": [
                    "curl",
                    "--silent",
                    "--location",
                    "--compressed",
                    "--max-time",
                    "60",
                    "--user-agent",
                    "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/118.0.0.0 Safari/537.36 ArchiveBox/0.7.3 (+https://github.com/ArchiveBox/ArchiveBox/) curl/curl 8.10.1 (x86_64-pc-linux-gnu)",
                    "http://nuclear.mutantstargoat.com/articles/retrocoding/dos01-setup/"
                ],
                "cmd_version": "curl 8.10.1 (x86_64-pc-linux-gnu)",
                "end_ts": "2026-07-07T17:59:28.021001+00:00",
                "index_texts": null,
                "output": "DOS retrocoding 01 - setting up",
                "pwd": "/data/archive/1783447153.649778",
                "schema": "ArchiveResult",
                "start_ts": "2026-07-07T17:59:28.013739+00:00",
                "status": "succeeded"
            }
        ],
        "wget": [
            {
                "cmd": [
                    "wget",
                    "--no-verbose",
                    "--adjust-extension",
                    "--convert-links",
                    "--force-directories",
                    "--backup-converted",
                    "--span-hosts",
                    "--no-parent",
                    "-e",
                    "robots=off",
                    "--timeout=60",
                    "--restrict-file-names=windows",
                    "--warc-file=/data/archive/1783447153.649778/warc/1783447167",
                    "--page-requisites",
                    "--user-agent=Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/118.0.0.0 Safari/537.36 ArchiveBox/0.7.3 (+https://github.com/ArchiveBox/ArchiveBox/) wget/GNU Wget 1.21.3",
                    "--compression=auto",
                    "http://nuclear.mutantstargoat.com/articles/retrocoding/dos01-setup/"
                ],
                "cmd_version": "GNU Wget 1.21.3",
                "end_ts": "2026-07-07T17:59:28.008394+00:00",
                "index_texts": null,
                "output": "nuclear.mutantstargoat.com/articles/retrocoding/dos01-setup/index.html",
                "pwd": "/data/archive/1783447153.649778",
                "schema": "ArchiveResult",
                "start_ts": "2026-07-07T17:59:27.244176+00:00",
                "status": "succeeded"
            }
        ]
    },
    "icons": null,
    "is_archived": true,
    "is_static": false,
    "latest": {
        "archive_org": "TimeoutExpired: Command '['curl', '--silent', '--location', '--compressed', '--head', '--max-time', '60', '--user-agent', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/118.0.0.0 Safari/537.36 ArchiveBox/0.7.3 (+https://github.com/ArchiveBox/ArchiveBox/) curl/curl 8.10.1 (x86_64-pc-linux-gnu)', 'https://web.archive.org/save/http://nuclear.mutantstargoat.com/articles/retrocoding/dos01-setup/']' timed out after 60 seconds",
        "dom": "output.html",
        "favicon": "favicon.ico",
        "git": null,
        "media": "media",
        "pdf": "output.pdf",
        "screenshot": "screenshot.png",
        "singlefile": "singlefile.html",
        "title": "DOS retrocoding 01 - setting up",
        "warc": null,
        "wget": "nuclear.mutantstargoat.com/articles/retrocoding/dos01-setup/index.html"
    },
    "link_dir": "/data/archive/1783447153.649778",
    "newest_archive_date": "2026-07-07T17:59:32.624625+00:00",
    "num_failures": 1,
    "num_outputs": 11,
    "oldest_archive_date": "2026-07-07T17:59:14.341591+00:00",
    "path": "/articles/retrocoding/dos01-setup/",
    "schema": "Link",
    "scheme": "http",
    "snapshot_id": "b3168d2d-cfbc-4392-855a-718c4a04bb76",
    "sources": [
        "/data/sources/1783447153-import.txt"
    ],
    "tags": null,
    "tags_str": "",
    "timestamp": "1783447153.649778",
    "title": "DOS retrocoding 01 - setting up",
    "updated": "2026-07-07T17:59:14.340395+00:00",
    "updated_date": "2026-07-07 17:59",
    "url": "http://nuclear.mutantstargoat.com/articles/retrocoding/dos01-setup/"
}