diff options
17 files changed, 1234 insertions, 21 deletions
diff --git a/Content/posts/2024-03-04-opencvjs-video-processing.md b/Content/posts/2024-03-04-opencvjs-video-processing.md new file mode 100644 index 0000000..cf87fb1 --- /dev/null +++ b/Content/posts/2024-03-04-opencvjs-video-processing.md @@ -0,0 +1,12 @@ +--- +date: 2024-03-04 12:01 +description: Real time video processing with OpenCV.js in the browser +tags: HTML, JS, OpenCV +draft: true +--- + +# Video Processing W/ OpenCV.js + +Note: A really weird bug you might run into when you are trying to mess around +and reloading the page on iOS is that OpenCV just stops loading. This is a bug in +WebKit.: diff --git a/Content/posts/2024-03-15-setting-up-macos-for-8088-dos-dev.md b/Content/posts/2024-03-15-setting-up-macos-for-8088-dos-dev.md new file mode 100644 index 0000000..15161f5 --- /dev/null +++ b/Content/posts/2024-03-15-setting-up-macos-for-8088-dos-dev.md @@ -0,0 +1,267 @@ +--- +date: 2024-03-15 13:16 +description: This goes through compiling Open Watcom 2 and creating simple hello-world exampls +tags: DOS, x86, macOS +draft: false +--- + +# Cross-Compiling Hello World for DOS on macOS + +Technically this should work for any platform that OpenWatcom 2 supports compiling binaries for. Some instructions are based on [a post at retrocoding.net](https://retrocoding.net/openwatcom-gateway-to-ancient-world-of-x86), + and [John Tsiombikas's post](http://nuclear.mutantstargoat.com/articles/retrocoding/dos01-setup/#hello-world-program) + +## Prerequisites + +You should already have XCode / Command Line Tools, and Homebrew installed. To compile Open Watcom for DOS you will need DOSBox (I use DOSBox-X). + +```bash +brew install --cask dosbox-x +``` + +## Compiling Open Watcom v2 + +*If this process is super annoying, I might make a custom homebrew tap to build and install Open Watcom* + +```bash +git clone https://github.com/open-watcom/open-watcom-v2 +cp open-watcom-v2/setvars.sh custom_setvars.sh +``` + +Now, edit this `setvars.sh` file. My file looks like this: + +```bash +#!/bin/zsh +export OWROOT="/Users/navanchauhan/Developer/8088Stuff/open-watcom-v2" +export OWTOOLS=CLANG +export OWDOCBUILD=0 +export OWGUINOBUILD=0 +export OWDISTRBUILD=0 +export OWDOSBOX="/Applications/dosbox-x.app/Contents/MacOS/dosbox-x" +export OWOBJDIR=binbuildV01 +. "$OWROOT/cmnvars.sh" +echo "OWROOT=$OWROOT" +cd "$OWROOT" +``` + +Note, your `OWRTOOT` is definitely going to be in a different location. + +```bash +source ./custom_setvars.sh +./build.sh +./build.sh rel +``` + +This will build, and then copy everything to the `rel` directory inside `open-watcom-v2` directory. Since I ran this on an Apple Silicon Mac, + all the binaries for me are in the `armo64` directory. You can now move everything inside the rel folder to another location, or create a simple + script to init all variables whenever you want. + +I like having a script called `exportVarsForDOS.sh` + +```bash +#!/bin/zsh + +export WATCOM=/Users/navanchauhan/Developer/8088Stuff/open-watcom-v2/rel +export PATH=$PATH:$WATCOM/armo64 +export EDDAT=$WATCOM/eddat + +# For DOS 8088/8086 development +export INCLUDE=$WATCOM/h +export LIB=$WATCOM/lib286 # You don't really need this +``` + +Then, when you need to load up these variables, you can simply run `source exportVarsForDOS.sh` or `. exportVarsForDOS.sh` + +## Hello World + +### Buliding without any Makefiles + +Create a new file called `example1.c` + +```c +#include<stdio.h> + +int main() { + printf("Hello World!"); + return 0; +} +``` + +First we compile the code: + +```bash +$ wcc example1.c +Open Watcom C x86 16-bit Optimizing Compiler +Version 2.0 beta Mar 15 2024 13:11:55 +Copyright (c) 2002-2024 The Open Watcom Contributors. All Rights Reserved. +Portions Copyright (c) 1984-2002 Sybase, Inc. All Rights Reserved. +Source code is available under the Sybase Open Watcom Public License. +See https://github.com/open-watcom/open-watcom-v2#readme for details. +example1.c: 7 lines, included 818, 0 warnings, 0 errors +Code size: 19 +``` + +Then, link to make an executable: + +```bash +$ wlink name example1.exe system dos file example1.o +Open Watcom Linker Version 2.0 beta Mar 15 2024 13:10:09 +Copyright (c) 2002-2024 The Open Watcom Contributors. All Rights Reserved. +Portions Copyright (c) 1985-2002 Sybase, Inc. All Rights Reserved. +Source code is available under the Sybase Open Watcom Public License. +See https://github.com/open-watcom/open-watcom-v2#readme for details. +loading object files +searching libraries +creating a DOS executable +``` + +If you want to test this executable, jump to the section titled `Testing with DOSBox-X` below. + +### Simple Makefile + +```makefile +obj = main.o hello.o +bin = tizts.com + +CC = wcc +CFLAGS = -0 +LD = wlink + +$(bin): $(obj) + $(LD) name $@ system dos file main.o file hello.o + +.c.o: + $(CC) $(CFLAGS) $< + +clean: + rm $(obj) $(bin) +``` + +Where, `main.c` +```c +void hello(void); + +int main(void) +{ + hello(); + return 0; +} +``` + +and `hello.c` + +```c +/* hello.c */ +#include <stdio.h> + +void hello(void) +{ + printf("Hello!"); +} +``` + +To compile into `tizts.com` simply run `wmake` + +```bash +$ wmake +➜ simple-cpp wmake +Open Watcom Make Version 2.0 beta Mar 15 2024 13:10:16 +Copyright (c) 2002-2024 The Open Watcom Contributors. All Rights Reserved. +Portions Copyright (c) 1988-2002 Sybase, Inc. All Rights Reserved. +Source code is available under the Sybase Open Watcom Public License. +See https://github.com/open-watcom/open-watcom-v2#readme for details. + wcc -0 main.c +Open Watcom C x86 16-bit Optimizing Compiler +Version 2.0 beta Mar 15 2024 13:11:55 +Copyright (c) 2002-2024 The Open Watcom Contributors. All Rights Reserved. +Portions Copyright (c) 1984-2002 Sybase, Inc. All Rights Reserved. +Source code is available under the Sybase Open Watcom Public License. +See https://github.com/open-watcom/open-watcom-v2#readme for details. +main.c(8): Warning! W138: No newline at end of file +main.c: 8 lines, included 53, 1 warnings, 0 errors +Code size: 12 + wcc -0 hello.c +Open Watcom C x86 16-bit Optimizing Compiler +Version 2.0 beta Mar 15 2024 13:11:55 +Copyright (c) 2002-2024 The Open Watcom Contributors. All Rights Reserved. +Portions Copyright (c) 1984-2002 Sybase, Inc. All Rights Reserved. +Source code is available under the Sybase Open Watcom Public License. +See https://github.com/open-watcom/open-watcom-v2#readme for details. +hello.c: 8 lines, included 818, 0 warnings, 0 errors +Code size: 17 + wlink name tizts.com system dos file main.o file hello.o +Open Watcom Linker Version 2.0 beta Mar 15 2024 13:10:09 +Copyright (c) 2002-2024 The Open Watcom Contributors. All Rights Reserved. +Portions Copyright (c) 1985-2002 Sybase, Inc. All Rights Reserved. +Source code is available under the Sybase Open Watcom Public License. +See https://github.com/open-watcom/open-watcom-v2#readme for details. +loading object files +searching libraries +creating a DOS executable +``` + +### Using CMake + +Create a file called `CMakeLists.txt` + +```CMake +project(hello) + +set(SOURCES abc.c) + +add_executable(hello ${SOURCES}) +``` + +Where, `abc.c` is: + +```c +#include <stdio.h> + +int main() { + printf("Does this work?"); + return 0; +} +``` + +```bash +mkdir build +cd build +``` + +And build using CMake + +``` +cmake -DCMAKE_SYSTEM_NAME=DOS -DCMAKE_SYSTEM_PROCESSOR=I86 -DCMAKE_C_FLAGS="-0 -bt=dos -d0 -oaxt" -G "Watcom WMake" ../.. +``` + +There you have it. Three different ways to compile a C program on a macOS device in 2024 that can run on an IBM PC 5150 (which was released in 1981!) + +## Testing with DOSBox-X + +```bash +cp example1.exe ~/Downloads +/Applications/dosbox-x.app/Contents/MacOS/dosbox-x +``` + +In DOSBox-X we now mount the `~/Downloads` folder as our `C:` drive + +``` +mount C ~/Downloads +``` + +Switch to the C drive + +``` +C: +``` + +Run the program: + +``` +example1 +``` + +![Running our program in DOSBox-X](/assets/posts/dosbox/hello-world.png) + +*My DOSBox setup might look slightly different than yours...* + + diff --git a/Resources/assets/posts/dosbox/hello-world.png b/Resources/assets/posts/dosbox/hello-world.png Binary files differnew file mode 100644 index 0000000..4e2482e --- /dev/null +++ b/Resources/assets/posts/dosbox/hello-world.png diff --git a/Resources/images/opengraph/posts/2024-03-04-opencvjs-video-processing.png b/Resources/images/opengraph/posts/2024-03-04-opencvjs-video-processing.png Binary files differnew file mode 100644 index 0000000..e77d3d7 --- /dev/null +++ b/Resources/images/opengraph/posts/2024-03-04-opencvjs-video-processing.png diff --git a/Resources/images/opengraph/posts/2024-03-15-setting-up-macos-for-8088-dos-dev.png b/Resources/images/opengraph/posts/2024-03-15-setting-up-macos-for-8088-dos-dev.png Binary files differnew file mode 100644 index 0000000..8cba6d8 --- /dev/null +++ b/Resources/images/opengraph/posts/2024-03-15-setting-up-macos-for-8088-dos-dev.png diff --git a/docs/assets/posts/dosbox/hello-world.png b/docs/assets/posts/dosbox/hello-world.png Binary files differnew file mode 100644 index 0000000..4e2482e --- /dev/null +++ b/docs/assets/posts/dosbox/hello-world.png diff --git a/docs/feed.rss b/docs/feed.rss index 4f92bc6..d242684 100644 --- a/docs/feed.rss +++ b/docs/feed.rss @@ -4,8 +4,8 @@ <title>Navan's Archive</title> <description>Rare Tips, Tricks and Posts</description> <link>https://web.navan.dev/</link><language>en</language> - <lastBuildDate>Wed, 28 Feb 2024 11:50:15 -0000</lastBuildDate> - <pubDate>Wed, 28 Feb 2024 11:50:15 -0000</pubDate> + <lastBuildDate>Fri, 15 Mar 2024 15:00:25 -0000</lastBuildDate> + <pubDate>Fri, 15 Mar 2024 15:00:25 -0000</pubDate> <ttl>250</ttl> <atom:link href="https://web.navan.dev/feed.rss" rel="self" type="application/rss+xml"/> @@ -198,6 +198,292 @@ I actually added the code to this post after running the program.</p> <item> <guid isPermaLink="true"> + https://web.navan.dev/posts/2024-03-15-setting-up-macos-for-8088-dos-dev.html + </guid> + <title> + Cross-Compiling Hello World for DOS on macOS + </title> + <description> + This goes through compiling Open Watcom 2 and creating simple hello-world exampls + </description> + <link>https://web.navan.dev/posts/2024-03-15-setting-up-macos-for-8088-dos-dev.html</link> + <pubDate>Fri, 15 Mar 2024 13:16:00 -0000</pubDate> + <content:encoded><![CDATA[<h1>Cross-Compiling Hello World for DOS on macOS</h1> + +<p>Technically this should work for any platform that OpenWatcom 2 supports compiling binaries for. Some instructions are based on <a rel="noopener" target="_blank" href="https://retrocoding.net/openwatcom-gateway-to-ancient-world-of-x86">a post at retrocoding.net</a>, + and <a rel="noopener" target="_blank" href="http://nuclear.mutantstargoat.com/articles/retrocoding/dos01-setup/#hello-world-program">John Tsiombikas's post</a></p> + +<h2>Prerequisites</h2> + +<p>You should already have XCode / Command Line Tools, and Homebrew installed. To compile Open Watcom for DOS you will need DOSBox (I use DOSBox-X).</p> + +<div class="codehilite"> +<pre><span></span><code>brew<span class="w"> </span>install<span class="w"> </span>--cask<span class="w"> </span>dosbox-x +</code></pre> +</div> + +<h2>Compiling Open Watcom v2</h2> + +<p><em>If this process is super annoying, I might make a custom homebrew tap to build and install Open Watcom</em></p> + +<div class="codehilite"> +<pre><span></span><code>git<span class="w"> </span>clone<span class="w"> </span>https://github.com/open-watcom/open-watcom-v2 +cp<span class="w"> </span>open-watcom-v2/setvars.sh<span class="w"> </span>custom_setvars.sh +</code></pre> +</div> + +<p>Now, edit this <code>setvars.sh</code> file. My file looks like this:</p> + +<div class="codehilite"> +<pre><span></span><code><span class="ch">#!/bin/zsh</span> +<span class="nb">export</span><span class="w"> </span><span class="nv">OWROOT</span><span class="o">=</span><span class="s2">"/Users/navanchauhan/Developer/8088Stuff/open-watcom-v2"</span> +<span class="nb">export</span><span class="w"> </span><span class="nv">OWTOOLS</span><span class="o">=</span>CLANG +<span class="nb">export</span><span class="w"> </span><span class="nv">OWDOCBUILD</span><span class="o">=</span><span class="m">0</span> +<span class="nb">export</span><span class="w"> </span><span class="nv">OWGUINOBUILD</span><span class="o">=</span><span class="m">0</span> +<span class="nb">export</span><span class="w"> </span><span class="nv">OWDISTRBUILD</span><span class="o">=</span><span class="m">0</span> +<span class="nb">export</span><span class="w"> </span><span class="nv">OWDOSBOX</span><span class="o">=</span><span class="s2">"/Applications/dosbox-x.app/Contents/MacOS/dosbox-x"</span> +<span class="nb">export</span><span class="w"> </span><span class="nv">OWOBJDIR</span><span class="o">=</span>binbuildV01 +.<span class="w"> </span><span class="s2">"</span><span class="nv">$OWROOT</span><span class="s2">/cmnvars.sh"</span> +<span class="nb">echo</span><span class="w"> </span><span class="s2">"OWROOT=</span><span class="nv">$OWROOT</span><span class="s2">"</span> +<span class="nb">cd</span><span class="w"> </span><span class="s2">"</span><span class="nv">$OWROOT</span><span class="s2">"</span> +</code></pre> +</div> + +<p>Note, your <code>OWRTOOT</code> is definitely going to be in a different location.</p> + +<div class="codehilite"> +<pre><span></span><code><span class="nb">source</span><span class="w"> </span>./custom_setvars.sh +./build.sh +./build.sh<span class="w"> </span>rel +</code></pre> +</div> + +<p>This will build, and then copy everything to the <code>rel</code> directory inside <code>open-watcom-v2</code> directory. Since I ran this on an Apple Silicon Mac, + all the binaries for me are in the <code>armo64</code> directory. You can now move everything inside the rel folder to another location, or create a simple + script to init all variables whenever you want.</p> + +<p>I like having a script called <code>exportVarsForDOS.sh</code> </p> + +<div class="codehilite"> +<pre><span></span><code><span class="ch">#!/bin/zsh</span> + +<span class="nb">export</span><span class="w"> </span><span class="nv">WATCOM</span><span class="o">=</span>/Users/navanchauhan/Developer/8088Stuff/open-watcom-v2/rel +<span class="nb">export</span><span class="w"> </span><span class="nv">PATH</span><span class="o">=</span><span class="nv">$PATH</span>:<span class="nv">$WATCOM</span>/armo64 +<span class="nb">export</span><span class="w"> </span><span class="nv">EDDAT</span><span class="o">=</span><span class="nv">$WATCOM</span>/eddat + +<span class="c1"># For DOS 8088/8086 development</span> +<span class="nb">export</span><span class="w"> </span><span class="nv">INCLUDE</span><span class="o">=</span><span class="nv">$WATCOM</span>/h +<span class="nb">export</span><span class="w"> </span><span class="nv">LIB</span><span class="o">=</span><span class="nv">$WATCOM</span>/lib286<span class="w"> </span><span class="c1"># You don't really need this</span> +</code></pre> +</div> + +<p>Then, when you need to load up these variables, you can simply run <code>source exportVarsForDOS.sh</code> or <code>. exportVarsForDOS.sh</code></p> + +<h2>Hello World</h2> + +<h3>Buliding without any Makefiles</h3> + +<p>Create a new file called <code>example1.c</code></p> + +<div class="codehilite"> +<pre><span></span><code><span class="cp">#include</span><span class="cpf"><stdio.h></span> + +<span class="kt">int</span><span class="w"> </span><span class="nf">main</span><span class="p">()</span><span class="w"> </span><span class="p">{</span> +<span class="w"> </span><span class="n">printf</span><span class="p">(</span><span class="s">"Hello World!"</span><span class="p">);</span> +<span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="mi">0</span><span class="p">;</span> +<span class="p">}</span> +</code></pre> +</div> + +<p>First we compile the code:</p> + +<div class="codehilite"> +<pre><span></span><code>$<span class="w"> </span>wcc<span class="w"> </span>example1.c +Open<span class="w"> </span>Watcom<span class="w"> </span>C<span class="w"> </span>x86<span class="w"> </span><span class="m">16</span>-bit<span class="w"> </span>Optimizing<span class="w"> </span>Compiler +Version<span class="w"> </span><span class="m">2</span>.0<span class="w"> </span>beta<span class="w"> </span>Mar<span class="w"> </span><span class="m">15</span><span class="w"> </span><span class="m">2024</span><span class="w"> </span><span class="m">13</span>:11:55 +Copyright<span class="w"> </span><span class="o">(</span>c<span class="o">)</span><span class="w"> </span><span class="m">2002</span>-2024<span class="w"> </span>The<span class="w"> </span>Open<span class="w"> </span>Watcom<span class="w"> </span>Contributors.<span class="w"> </span>All<span class="w"> </span>Rights<span class="w"> </span>Reserved. +Portions<span class="w"> </span>Copyright<span class="w"> </span><span class="o">(</span>c<span class="o">)</span><span class="w"> </span><span class="m">1984</span>-2002<span class="w"> </span>Sybase,<span class="w"> </span>Inc.<span class="w"> </span>All<span class="w"> </span>Rights<span class="w"> </span>Reserved. +Source<span class="w"> </span>code<span class="w"> </span>is<span class="w"> </span>available<span class="w"> </span>under<span class="w"> </span>the<span class="w"> </span>Sybase<span class="w"> </span>Open<span class="w"> </span>Watcom<span class="w"> </span>Public<span class="w"> </span>License. +See<span class="w"> </span>https://github.com/open-watcom/open-watcom-v2#readme<span class="w"> </span><span class="k">for</span><span class="w"> </span>details. +example1.c:<span class="w"> </span><span class="m">7</span><span class="w"> </span>lines,<span class="w"> </span>included<span class="w"> </span><span class="m">818</span>,<span class="w"> </span><span class="m">0</span><span class="w"> </span>warnings,<span class="w"> </span><span class="m">0</span><span class="w"> </span>errors +Code<span class="w"> </span>size:<span class="w"> </span><span class="m">19</span> +</code></pre> +</div> + +<p>Then, link to make an executable:</p> + +<div class="codehilite"> +<pre><span></span><code>$<span class="w"> </span>wlink<span class="w"> </span>name<span class="w"> </span>example1.exe<span class="w"> </span>system<span class="w"> </span>dos<span class="w"> </span>file<span class="w"> </span>example1.o +Open<span class="w"> </span>Watcom<span class="w"> </span>Linker<span class="w"> </span>Version<span class="w"> </span><span class="m">2</span>.0<span class="w"> </span>beta<span class="w"> </span>Mar<span class="w"> </span><span class="m">15</span><span class="w"> </span><span class="m">2024</span><span class="w"> </span><span class="m">13</span>:10:09 +Copyright<span class="w"> </span><span class="o">(</span>c<span class="o">)</span><span class="w"> </span><span class="m">2002</span>-2024<span class="w"> </span>The<span class="w"> </span>Open<span class="w"> </span>Watcom<span class="w"> </span>Contributors.<span class="w"> </span>All<span class="w"> </span>Rights<span class="w"> </span>Reserved. +Portions<span class="w"> </span>Copyright<span class="w"> </span><span class="o">(</span>c<span class="o">)</span><span class="w"> </span><span class="m">1985</span>-2002<span class="w"> </span>Sybase,<span class="w"> </span>Inc.<span class="w"> </span>All<span class="w"> </span>Rights<span class="w"> </span>Reserved. +Source<span class="w"> </span>code<span class="w"> </span>is<span class="w"> </span>available<span class="w"> </span>under<span class="w"> </span>the<span class="w"> </span>Sybase<span class="w"> </span>Open<span class="w"> </span>Watcom<span class="w"> </span>Public<span class="w"> </span>License. +See<span class="w"> </span>https://github.com/open-watcom/open-watcom-v2#readme<span class="w"> </span><span class="k">for</span><span class="w"> </span>details. +loading<span class="w"> </span>object<span class="w"> </span>files +searching<span class="w"> </span>libraries +creating<span class="w"> </span>a<span class="w"> </span>DOS<span class="w"> </span>executable<span class="w"> </span> +</code></pre> +</div> + +<p>If you want to test this executable, jump to the section titled <code>Testing with DOSBox-X</code> below.</p> + +<h3>Simple Makefile</h3> + +<div class="codehilite"> +<pre><span></span><code><span class="nv">obj</span><span class="w"> </span><span class="o">=</span><span class="w"> </span>main.o<span class="w"> </span>hello.o +<span class="nv">bin</span><span class="w"> </span><span class="o">=</span><span class="w"> </span>tizts.com + +<span class="nv">CC</span><span class="w"> </span><span class="o">=</span><span class="w"> </span>wcc +<span class="nv">CFLAGS</span><span class="w"> </span><span class="o">=</span><span class="w"> </span>-0 +<span class="nv">LD</span><span class="w"> </span><span class="o">=</span><span class="w"> </span>wlink + +<span class="nf">$(bin)</span><span class="o">:</span><span class="w"> </span><span class="k">$(</span><span class="nv">obj</span><span class="k">)</span> +<span class="w"> </span><span class="k">$(</span>LD<span class="k">)</span><span class="w"> </span>name<span class="w"> </span><span class="nv">$@</span><span class="w"> </span>system<span class="w"> </span>dos<span class="w"> </span>file<span class="w"> </span>main.o<span class="w"> </span>file<span class="w"> </span>hello.o<span class="w"> </span> + +<span class="nf">.c.o</span><span class="o">:</span> +<span class="w"> </span><span class="k">$(</span>CC<span class="k">)</span><span class="w"> </span><span class="k">$(</span>CFLAGS<span class="k">)</span><span class="w"> </span>$< + +<span class="nf">clean</span><span class="o">:</span> +<span class="w"> </span>rm<span class="w"> </span><span class="k">$(</span>obj<span class="k">)</span><span class="w"> </span><span class="k">$(</span>bin<span class="k">)</span> +</code></pre> +</div> + +<p>Where, <code>main.c</code></p> + +<div class="codehilite"> +<pre><span></span><code><span class="kt">void</span><span class="w"> </span><span class="nf">hello</span><span class="p">(</span><span class="kt">void</span><span class="p">);</span> + +<span class="kt">int</span><span class="w"> </span><span class="nf">main</span><span class="p">(</span><span class="kt">void</span><span class="p">)</span> +<span class="p">{</span> +<span class="w"> </span><span class="n">hello</span><span class="p">();</span> +<span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="mi">0</span><span class="p">;</span> +<span class="p">}</span> +</code></pre> +</div> + +<p>and <code>hello.c</code></p> + +<div class="codehilite"> +<pre><span></span><code><span class="cm">/* hello.c */</span> +<span class="cp">#include</span><span class="w"> </span><span class="cpf"><stdio.h></span> + +<span class="kt">void</span><span class="w"> </span><span class="nf">hello</span><span class="p">(</span><span class="kt">void</span><span class="p">)</span> +<span class="p">{</span> +<span class="w"> </span><span class="n">printf</span><span class="p">(</span><span class="s">"Hello!"</span><span class="p">);</span> +<span class="p">}</span> +</code></pre> +</div> + +<p>To compile into <code>tizts.com</code> simply run <code>wmake</code></p> + +<div class="codehilite"> +<pre><span></span><code>$<span class="w"> </span>wmake +➜<span class="w"> </span>simple-cpp<span class="w"> </span>wmake +Open<span class="w"> </span>Watcom<span class="w"> </span>Make<span class="w"> </span>Version<span class="w"> </span><span class="m">2</span>.0<span class="w"> </span>beta<span class="w"> </span>Mar<span class="w"> </span><span class="m">15</span><span class="w"> </span><span class="m">2024</span><span class="w"> </span><span class="m">13</span>:10:16 +Copyright<span class="w"> </span><span class="o">(</span>c<span class="o">)</span><span class="w"> </span><span class="m">2002</span>-2024<span class="w"> </span>The<span class="w"> </span>Open<span class="w"> </span>Watcom<span class="w"> </span>Contributors.<span class="w"> </span>All<span class="w"> </span>Rights<span class="w"> </span>Reserved. +Portions<span class="w"> </span>Copyright<span class="w"> </span><span class="o">(</span>c<span class="o">)</span><span class="w"> </span><span class="m">1988</span>-2002<span class="w"> </span>Sybase,<span class="w"> </span>Inc.<span class="w"> </span>All<span class="w"> </span>Rights<span class="w"> </span>Reserved. +Source<span class="w"> </span>code<span class="w"> </span>is<span class="w"> </span>available<span class="w"> </span>under<span class="w"> </span>the<span class="w"> </span>Sybase<span class="w"> </span>Open<span class="w"> </span>Watcom<span class="w"> </span>Public<span class="w"> </span>License. +See<span class="w"> </span>https://github.com/open-watcom/open-watcom-v2#readme<span class="w"> </span><span class="k">for</span><span class="w"> </span>details. +<span class="w"> </span>wcc<span class="w"> </span>-0<span class="w"> </span>main.c +Open<span class="w"> </span>Watcom<span class="w"> </span>C<span class="w"> </span>x86<span class="w"> </span><span class="m">16</span>-bit<span class="w"> </span>Optimizing<span class="w"> </span>Compiler +Version<span class="w"> </span><span class="m">2</span>.0<span class="w"> </span>beta<span class="w"> </span>Mar<span class="w"> </span><span class="m">15</span><span class="w"> </span><span class="m">2024</span><span class="w"> </span><span class="m">13</span>:11:55 +Copyright<span class="w"> </span><span class="o">(</span>c<span class="o">)</span><span class="w"> </span><span class="m">2002</span>-2024<span class="w"> </span>The<span class="w"> </span>Open<span class="w"> </span>Watcom<span class="w"> </span>Contributors.<span class="w"> </span>All<span class="w"> </span>Rights<span class="w"> </span>Reserved. +Portions<span class="w"> </span>Copyright<span class="w"> </span><span class="o">(</span>c<span class="o">)</span><span class="w"> </span><span class="m">1984</span>-2002<span class="w"> </span>Sybase,<span class="w"> </span>Inc.<span class="w"> </span>All<span class="w"> </span>Rights<span class="w"> </span>Reserved. +Source<span class="w"> </span>code<span class="w"> </span>is<span class="w"> </span>available<span class="w"> </span>under<span class="w"> </span>the<span class="w"> </span>Sybase<span class="w"> </span>Open<span class="w"> </span>Watcom<span class="w"> </span>Public<span class="w"> </span>License. +See<span class="w"> </span>https://github.com/open-watcom/open-watcom-v2#readme<span class="w"> </span><span class="k">for</span><span class="w"> </span>details. +main.c<span class="o">(</span><span class="m">8</span><span class="o">)</span>:<span class="w"> </span>Warning!<span class="w"> </span>W138:<span class="w"> </span>No<span class="w"> </span>newline<span class="w"> </span>at<span class="w"> </span>end<span class="w"> </span>of<span class="w"> </span>file +main.c:<span class="w"> </span><span class="m">8</span><span class="w"> </span>lines,<span class="w"> </span>included<span class="w"> </span><span class="m">53</span>,<span class="w"> </span><span class="m">1</span><span class="w"> </span>warnings,<span class="w"> </span><span class="m">0</span><span class="w"> </span>errors +Code<span class="w"> </span>size:<span class="w"> </span><span class="m">12</span> +<span class="w"> </span>wcc<span class="w"> </span>-0<span class="w"> </span>hello.c +Open<span class="w"> </span>Watcom<span class="w"> </span>C<span class="w"> </span>x86<span class="w"> </span><span class="m">16</span>-bit<span class="w"> </span>Optimizing<span class="w"> </span>Compiler +Version<span class="w"> </span><span class="m">2</span>.0<span class="w"> </span>beta<span class="w"> </span>Mar<span class="w"> </span><span class="m">15</span><span class="w"> </span><span class="m">2024</span><span class="w"> </span><span class="m">13</span>:11:55 +Copyright<span class="w"> </span><span class="o">(</span>c<span class="o">)</span><span class="w"> </span><span class="m">2002</span>-2024<span class="w"> </span>The<span class="w"> </span>Open<span class="w"> </span>Watcom<span class="w"> </span>Contributors.<span class="w"> </span>All<span class="w"> </span>Rights<span class="w"> </span>Reserved. +Portions<span class="w"> </span>Copyright<span class="w"> </span><span class="o">(</span>c<span class="o">)</span><span class="w"> </span><span class="m">1984</span>-2002<span class="w"> </span>Sybase,<span class="w"> </span>Inc.<span class="w"> </span>All<span class="w"> </span>Rights<span class="w"> </span>Reserved. +Source<span class="w"> </span>code<span class="w"> </span>is<span class="w"> </span>available<span class="w"> </span>under<span class="w"> </span>the<span class="w"> </span>Sybase<span class="w"> </span>Open<span class="w"> </span>Watcom<span class="w"> </span>Public<span class="w"> </span>License. +See<span class="w"> </span>https://github.com/open-watcom/open-watcom-v2#readme<span class="w"> </span><span class="k">for</span><span class="w"> </span>details. +hello.c:<span class="w"> </span><span class="m">8</span><span class="w"> </span>lines,<span class="w"> </span>included<span class="w"> </span><span class="m">818</span>,<span class="w"> </span><span class="m">0</span><span class="w"> </span>warnings,<span class="w"> </span><span class="m">0</span><span class="w"> </span>errors +Code<span class="w"> </span>size:<span class="w"> </span><span class="m">17</span> +<span class="w"> </span>wlink<span class="w"> </span>name<span class="w"> </span>tizts.com<span class="w"> </span>system<span class="w"> </span>dos<span class="w"> </span>file<span class="w"> </span>main.o<span class="w"> </span>file<span class="w"> </span>hello.o +Open<span class="w"> </span>Watcom<span class="w"> </span>Linker<span class="w"> </span>Version<span class="w"> </span><span class="m">2</span>.0<span class="w"> </span>beta<span class="w"> </span>Mar<span class="w"> </span><span class="m">15</span><span class="w"> </span><span class="m">2024</span><span class="w"> </span><span class="m">13</span>:10:09 +Copyright<span class="w"> </span><span class="o">(</span>c<span class="o">)</span><span class="w"> </span><span class="m">2002</span>-2024<span class="w"> </span>The<span class="w"> </span>Open<span class="w"> </span>Watcom<span class="w"> </span>Contributors.<span class="w"> </span>All<span class="w"> </span>Rights<span class="w"> </span>Reserved. +Portions<span class="w"> </span>Copyright<span class="w"> </span><span class="o">(</span>c<span class="o">)</span><span class="w"> </span><span class="m">1985</span>-2002<span class="w"> </span>Sybase,<span class="w"> </span>Inc.<span class="w"> </span>All<span class="w"> </span>Rights<span class="w"> </span>Reserved. +Source<span class="w"> </span>code<span class="w"> </span>is<span class="w"> </span>available<span class="w"> </span>under<span class="w"> </span>the<span class="w"> </span>Sybase<span class="w"> </span>Open<span class="w"> </span>Watcom<span class="w"> </span>Public<span class="w"> </span>License. +See<span class="w"> </span>https://github.com/open-watcom/open-watcom-v2#readme<span class="w"> </span><span class="k">for</span><span class="w"> </span>details. +loading<span class="w"> </span>object<span class="w"> </span>files +searching<span class="w"> </span>libraries +creating<span class="w"> </span>a<span class="w"> </span>DOS<span class="w"> </span>executable +</code></pre> +</div> + +<h3>Using CMake</h3> + +<p>Create a file called <code>CMakeLists.txt</code></p> + +<div class="codehilite"> +<pre><span></span><code><span class="nb">project</span><span class="p">(</span><span class="s">hello</span><span class="p">)</span> + +<span class="nb">set</span><span class="p">(</span><span class="s">SOURCES</span><span class="w"> </span><span class="s">abc.c</span><span class="p">)</span> + +<span class="nb">add_executable</span><span class="p">(</span><span class="s">hello</span><span class="w"> </span><span class="o">${</span><span class="nv">SOURCES</span><span class="o">}</span><span class="p">)</span> +</code></pre> +</div> + +<p>Where, <code>abc.c</code> is:</p> + +<div class="codehilite"> +<pre><span></span><code><span class="cp">#include</span><span class="w"> </span><span class="cpf"><stdio.h></span> + +<span class="kt">int</span><span class="w"> </span><span class="nf">main</span><span class="p">()</span><span class="w"> </span><span class="p">{</span> +<span class="w"> </span><span class="n">printf</span><span class="p">(</span><span class="s">"Does this work?"</span><span class="p">);</span> +<span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="mi">0</span><span class="p">;</span> +<span class="p">}</span> +</code></pre> +</div> + +<div class="codehilite"> +<pre><span></span><code>mkdir<span class="w"> </span>build +<span class="nb">cd</span><span class="w"> </span>build +</code></pre> +</div> + +<p>And build using CMake</p> + +<pre><code>cmake -DCMAKE_SYSTEM_NAME=DOS -DCMAKE_SYSTEM_PROCESSOR=I86 -DCMAKE_C_FLAGS="-0 -bt=dos -d0 -oaxt" -G "Watcom WMake" ../.. +</code></pre> + +<p>There you have it. Three different ways to compile a C program on a macOS device in 2024 that can run on an IBM PC 5150 (which was released in 1981!)</p> + +<h2>Testing with DOSBox-X</h2> + +<div class="codehilite"> +<pre><span></span><code>cp<span class="w"> </span>example1.exe<span class="w"> </span>~/Downloads +/Applications/dosbox-x.app/Contents/MacOS/dosbox-x +</code></pre> +</div> + +<p>In DOSBox-X we now mount the <code>~/Downloads</code> folder as our <code>C:</code> drive</p> + +<pre><code>mount C ~/Downloads +</code></pre> + +<p>Switch to the C drive</p> + +<pre><code>C: +</code></pre> + +<p>Run the program:</p> + +<pre><code>example1 +</code></pre> + +<p><img src="/assets/posts/dosbox/hello-world.png" alt="Running our program in DOSBox-X" /></p> + +<p><em>My DOSBox setup might look slightly different than yours...</em></p> +]]></content:encoded> + </item> + + <item> + <guid isPermaLink="true"> https://web.navan.dev/posts/hello-world.html </guid> <title> diff --git a/docs/images/opengraph/posts/2024-03-04-opencvjs-video-processing.png b/docs/images/opengraph/posts/2024-03-04-opencvjs-video-processing.png Binary files differnew file mode 100644 index 0000000..e77d3d7 --- /dev/null +++ b/docs/images/opengraph/posts/2024-03-04-opencvjs-video-processing.png diff --git a/docs/images/opengraph/posts/2024-03-15-setting-up-macos-for-8088-dos-dev.png b/docs/images/opengraph/posts/2024-03-15-setting-up-macos-for-8088-dos-dev.png Binary files differnew file mode 100644 index 0000000..8cba6d8 --- /dev/null +++ b/docs/images/opengraph/posts/2024-03-15-setting-up-macos-for-8088-dos-dev.png diff --git a/docs/index.html b/docs/index.html index 3bee970..f6a4942 100644 --- a/docs/index.html +++ b/docs/index.html @@ -50,6 +50,21 @@ <h2>Recent Posts</h2> <ul> + <li><a href="/posts/2024-03-15-setting-up-macos-for-8088-dos-dev.html">Cross-Compiling Hello World for DOS on macOS</a></li> + <ul> + <li>This goes through compiling Open Watcom 2 and creating simple hello-world exampls</li> + <li>Published On: 2024-03-15 13:16</li> + <li>Tags: + + <a href='/tags/DOS.html'>DOS</a>, + + <a href='/tags/x86.html'>x86</a>, + + <a href='/tags/macOS.html'>macOS</a> + + </ul> + + <li><a href="/posts/2024-02-26-control-element-under-another-element-html-css.html">Interacting with underlying element in HTML</a></li> <ul> <li>With CSS you can disable any interactions with an element and directly control the underlying element</li> @@ -102,25 +117,6 @@ </ul> - <li><a href="/posts/2023-10-05-attack-lab.html">Attack Lab</a></li> - <ul> - <li>Walkthrough of Attack Lab Phases 1-4 for CSCI 2400 Computer Systems</li> - <li>Published On: 2023-10-05 20:01</li> - <li>Tags: - - <a href='/tags/gdb.html'>gdb</a>, - - <a href='/tags/Reverse-Engineering.html'>Reverse-Engineering</a>, - - <a href='/tags/C++.html'>C++</a>, - - <a href='/tags/CSCI2400.html'>CSCI2400</a>, - - <a href='/tags/Assembly.html'>Assembly</a> - - </ul> - - </ul> <b>For all posts go to <a href="/posts">Posts</a></b> diff --git a/docs/posts/2024-03-15-setting-up-macos-for-8088-dos-dev.html b/docs/posts/2024-03-15-setting-up-macos-for-8088-dos-dev.html new file mode 100644 index 0000000..bb37d00 --- /dev/null +++ b/docs/posts/2024-03-15-setting-up-macos-for-8088-dos-dev.html @@ -0,0 +1,330 @@ +<!DOCTYPE html> +<html lang="en"> +<head> + + <link rel="stylesheet" href="https://unpkg.com/latex.css/style.min.css" /> + <link rel="stylesheet" href="/assets/main.css" /> + <meta charset="utf-8"> + <meta name="viewport" content="width=device-width, initial-scale=1.0"> + <title>Cross-Compiling Hello World for DOS on macOS</title> + <meta name="og:site_name" content="Navan Chauhan" /> + <link rel="canonical" href="https://web.navan.dev/posts/2024-03-15-setting-up-macos-for-8088-dos-dev.html" /> + <meta name="twitter:url" content="https://web.navan.dev/posts/2024-03-15-setting-up-macos-for-8088-dos-dev.html /> + <meta name="og:url" content="https://web.navan.dev/posts/2024-03-15-setting-up-macos-for-8088-dos-dev.html" /> + <meta name="twitter:title" content="Cross-Compiling Hello World for DOS on macOS" /> + <meta name="og:title" content="Cross-Compiling Hello World for DOS on macOS" /> + <meta name="description" content="This goes through compiling Open Watcom 2 and creating simple hello-world exampls" /> + <meta name="twitter:description" content="This goes through compiling Open Watcom 2 and creating simple hello-world exampls" /> + <meta name="og:description" content="This goes through compiling Open Watcom 2 and creating simple hello-world exampls" /> + <meta name="twitter:card" content="summary_large_image" /> + <meta name="viewport" content="width=device-width, initial-scale=1.0" /> + <link rel="shortcut icon" href="/images/favicon.png" type="image/png" /> + <link rel="alternate" href="/feed.rss" type="application/rss+xml" title="Subscribe to Navan Chauhan" /> + <meta name="twitter:image" content="https://web.navan.dev/images/opengraph/posts/2024-03-15-setting-up-macos-for-8088-dos-dev.png" /> + <meta name="og:image" content="https://web.navan.dev/images/opengraph/posts/2024-03-15-setting-up-macos-for-8088-dos-dev.png" /> + <meta name="google-site-verification" content="LVeSZxz-QskhbEjHxOi7-BM5dDxTg53x2TwrjFxfL0k" /> + <script data-goatcounter="https://navanchauhan.goatcounter.com/count" + async src="//gc.zgo.at/count.js"></script> + <script defer data-domain="web.navan.dev" src="https://plausible.io/js/plausible.js"></script> + <link rel="manifest" href="/manifest.json" /> + +</head> +<body> + <center><nav style="display: block;"> +| +<a href="/">home</a> | +<a href="/about/">about/links</a> | +<a href="/posts/">posts</a> | +<a href="/3D-Designs/">3D designs</a> | +<!--<a href="/publications/">publications</a> |--> +<!--<a href="/repo/">iOS repo</a> |--> +<a href="/feed.rss">RSS Feed</a> | +</nav> +</center> + +<main> + + <h1>Cross-Compiling Hello World for DOS on macOS</h1> + +<p>Technically this should work for any platform that OpenWatcom 2 supports compiling binaries for. Some instructions are based on <a rel="noopener" target="_blank" href="https://retrocoding.net/openwatcom-gateway-to-ancient-world-of-x86">a post at retrocoding.net</a>, + and <a rel="noopener" target="_blank" href="http://nuclear.mutantstargoat.com/articles/retrocoding/dos01-setup/#hello-world-program">John Tsiombikas's post</a></p> + +<h2>Prerequisites</h2> + +<p>You should already have XCode / Command Line Tools, and Homebrew installed. To compile Open Watcom for DOS you will need DOSBox (I use DOSBox-X).</p> + +<div class="codehilite"> +<pre><span></span><code>brew<span class="w"> </span>install<span class="w"> </span>--cask<span class="w"> </span>dosbox-x +</code></pre> +</div> + +<h2>Compiling Open Watcom v2</h2> + +<p><em>If this process is super annoying, I might make a custom homebrew tap to build and install Open Watcom</em></p> + +<div class="codehilite"> +<pre><span></span><code>git<span class="w"> </span>clone<span class="w"> </span>https://github.com/open-watcom/open-watcom-v2 +cp<span class="w"> </span>open-watcom-v2/setvars.sh<span class="w"> </span>custom_setvars.sh +</code></pre> +</div> + +<p>Now, edit this <code>setvars.sh</code> file. My file looks like this:</p> + +<div class="codehilite"> +<pre><span></span><code><span class="ch">#!/bin/zsh</span> +<span class="nb">export</span><span class="w"> </span><span class="nv">OWROOT</span><span class="o">=</span><span class="s2">"/Users/navanchauhan/Developer/8088Stuff/open-watcom-v2"</span> +<span class="nb">export</span><span class="w"> </span><span class="nv">OWTOOLS</span><span class="o">=</span>CLANG +<span class="nb">export</span><span class="w"> </span><span class="nv">OWDOCBUILD</span><span class="o">=</span><span class="m">0</span> +<span class="nb">export</span><span class="w"> </span><span class="nv">OWGUINOBUILD</span><span class="o">=</span><span class="m">0</span> +<span class="nb">export</span><span class="w"> </span><span class="nv">OWDISTRBUILD</span><span class="o">=</span><span class="m">0</span> +<span class="nb">export</span><span class="w"> </span><span class="nv">OWDOSBOX</span><span class="o">=</span><span class="s2">"/Applications/dosbox-x.app/Contents/MacOS/dosbox-x"</span> +<span class="nb">export</span><span class="w"> </span><span class="nv">OWOBJDIR</span><span class="o">=</span>binbuildV01 +.<span class="w"> </span><span class="s2">"</span><span class="nv">$OWROOT</span><span class="s2">/cmnvars.sh"</span> +<span class="nb">echo</span><span class="w"> </span><span class="s2">"OWROOT=</span><span class="nv">$OWROOT</span><span class="s2">"</span> +<span class="nb">cd</span><span class="w"> </span><span class="s2">"</span><span class="nv">$OWROOT</span><span class="s2">"</span> +</code></pre> +</div> + +<p>Note, your <code>OWRTOOT</code> is definitely going to be in a different location.</p> + +<div class="codehilite"> +<pre><span></span><code><span class="nb">source</span><span class="w"> </span>./custom_setvars.sh +./build.sh +./build.sh<span class="w"> </span>rel +</code></pre> +</div> + +<p>This will build, and then copy everything to the <code>rel</code> directory inside <code>open-watcom-v2</code> directory. Since I ran this on an Apple Silicon Mac, + all the binaries for me are in the <code>armo64</code> directory. You can now move everything inside the rel folder to another location, or create a simple + script to init all variables whenever you want.</p> + +<p>I like having a script called <code>exportVarsForDOS.sh</code> </p> + +<div class="codehilite"> +<pre><span></span><code><span class="ch">#!/bin/zsh</span> + +<span class="nb">export</span><span class="w"> </span><span class="nv">WATCOM</span><span class="o">=</span>/Users/navanchauhan/Developer/8088Stuff/open-watcom-v2/rel +<span class="nb">export</span><span class="w"> </span><span class="nv">PATH</span><span class="o">=</span><span class="nv">$PATH</span>:<span class="nv">$WATCOM</span>/armo64 +<span class="nb">export</span><span class="w"> </span><span class="nv">EDDAT</span><span class="o">=</span><span class="nv">$WATCOM</span>/eddat + +<span class="c1"># For DOS 8088/8086 development</span> +<span class="nb">export</span><span class="w"> </span><span class="nv">INCLUDE</span><span class="o">=</span><span class="nv">$WATCOM</span>/h +<span class="nb">export</span><span class="w"> </span><span class="nv">LIB</span><span class="o">=</span><span class="nv">$WATCOM</span>/lib286<span class="w"> </span><span class="c1"># You don't really need this</span> +</code></pre> +</div> + +<p>Then, when you need to load up these variables, you can simply run <code>source exportVarsForDOS.sh</code> or <code>. exportVarsForDOS.sh</code></p> + +<h2>Hello World</h2> + +<h3>Buliding without any Makefiles</h3> + +<p>Create a new file called <code>example1.c</code></p> + +<div class="codehilite"> +<pre><span></span><code><span class="cp">#include</span><span class="cpf"><stdio.h></span> + +<span class="kt">int</span><span class="w"> </span><span class="nf">main</span><span class="p">()</span><span class="w"> </span><span class="p">{</span> +<span class="w"> </span><span class="n">printf</span><span class="p">(</span><span class="s">"Hello World!"</span><span class="p">);</span> +<span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="mi">0</span><span class="p">;</span> +<span class="p">}</span> +</code></pre> +</div> + +<p>First we compile the code:</p> + +<div class="codehilite"> +<pre><span></span><code>$<span class="w"> </span>wcc<span class="w"> </span>example1.c +Open<span class="w"> </span>Watcom<span class="w"> </span>C<span class="w"> </span>x86<span class="w"> </span><span class="m">16</span>-bit<span class="w"> </span>Optimizing<span class="w"> </span>Compiler +Version<span class="w"> </span><span class="m">2</span>.0<span class="w"> </span>beta<span class="w"> </span>Mar<span class="w"> </span><span class="m">15</span><span class="w"> </span><span class="m">2024</span><span class="w"> </span><span class="m">13</span>:11:55 +Copyright<span class="w"> </span><span class="o">(</span>c<span class="o">)</span><span class="w"> </span><span class="m">2002</span>-2024<span class="w"> </span>The<span class="w"> </span>Open<span class="w"> </span>Watcom<span class="w"> </span>Contributors.<span class="w"> </span>All<span class="w"> </span>Rights<span class="w"> </span>Reserved. +Portions<span class="w"> </span>Copyright<span class="w"> </span><span class="o">(</span>c<span class="o">)</span><span class="w"> </span><span class="m">1984</span>-2002<span class="w"> </span>Sybase,<span class="w"> </span>Inc.<span class="w"> </span>All<span class="w"> </span>Rights<span class="w"> </span>Reserved. +Source<span class="w"> </span>code<span class="w"> </span>is<span class="w"> </span>available<span class="w"> </span>under<span class="w"> </span>the<span class="w"> </span>Sybase<span class="w"> </span>Open<span class="w"> </span>Watcom<span class="w"> </span>Public<span class="w"> </span>License. +See<span class="w"> </span>https://github.com/open-watcom/open-watcom-v2#readme<span class="w"> </span><span class="k">for</span><span class="w"> </span>details. +example1.c:<span class="w"> </span><span class="m">7</span><span class="w"> </span>lines,<span class="w"> </span>included<span class="w"> </span><span class="m">818</span>,<span class="w"> </span><span class="m">0</span><span class="w"> </span>warnings,<span class="w"> </span><span class="m">0</span><span class="w"> </span>errors +Code<span class="w"> </span>size:<span class="w"> </span><span class="m">19</span> +</code></pre> +</div> + +<p>Then, link to make an executable:</p> + +<div class="codehilite"> +<pre><span></span><code>$<span class="w"> </span>wlink<span class="w"> </span>name<span class="w"> </span>example1.exe<span class="w"> </span>system<span class="w"> </span>dos<span class="w"> </span>file<span class="w"> </span>example1.o +Open<span class="w"> </span>Watcom<span class="w"> </span>Linker<span class="w"> </span>Version<span class="w"> </span><span class="m">2</span>.0<span class="w"> </span>beta<span class="w"> </span>Mar<span class="w"> </span><span class="m">15</span><span class="w"> </span><span class="m">2024</span><span class="w"> </span><span class="m">13</span>:10:09 +Copyright<span class="w"> </span><span class="o">(</span>c<span class="o">)</span><span class="w"> </span><span class="m">2002</span>-2024<span class="w"> </span>The<span class="w"> </span>Open<span class="w"> </span>Watcom<span class="w"> </span>Contributors.<span class="w"> </span>All<span class="w"> </span>Rights<span class="w"> </span>Reserved. +Portions<span class="w"> </span>Copyright<span class="w"> </span><span class="o">(</span>c<span class="o">)</span><span class="w"> </span><span class="m">1985</span>-2002<span class="w"> </span>Sybase,<span class="w"> </span>Inc.<span class="w"> </span>All<span class="w"> </span>Rights<span class="w"> </span>Reserved. +Source<span class="w"> </span>code<span class="w"> </span>is<span class="w"> </span>available<span class="w"> </span>under<span class="w"> </span>the<span class="w"> </span>Sybase<span class="w"> </span>Open<span class="w"> </span>Watcom<span class="w"> </span>Public<span class="w"> </span>License. +See<span class="w"> </span>https://github.com/open-watcom/open-watcom-v2#readme<span class="w"> </span><span class="k">for</span><span class="w"> </span>details. +loading<span class="w"> </span>object<span class="w"> </span>files +searching<span class="w"> </span>libraries +creating<span class="w"> </span>a<span class="w"> </span>DOS<span class="w"> </span>executable<span class="w"> </span> +</code></pre> +</div> + +<p>If you want to test this executable, jump to the section titled <code>Testing with DOSBox-X</code> below.</p> + +<h3>Simple Makefile</h3> + +<div class="codehilite"> +<pre><span></span><code><span class="nv">obj</span><span class="w"> </span><span class="o">=</span><span class="w"> </span>main.o<span class="w"> </span>hello.o +<span class="nv">bin</span><span class="w"> </span><span class="o">=</span><span class="w"> </span>tizts.com + +<span class="nv">CC</span><span class="w"> </span><span class="o">=</span><span class="w"> </span>wcc +<span class="nv">CFLAGS</span><span class="w"> </span><span class="o">=</span><span class="w"> </span>-0 +<span class="nv">LD</span><span class="w"> </span><span class="o">=</span><span class="w"> </span>wlink + +<span class="nf">$(bin)</span><span class="o">:</span><span class="w"> </span><span class="k">$(</span><span class="nv">obj</span><span class="k">)</span> +<span class="w"> </span><span class="k">$(</span>LD<span class="k">)</span><span class="w"> </span>name<span class="w"> </span><span class="nv">$@</span><span class="w"> </span>system<span class="w"> </span>dos<span class="w"> </span>file<span class="w"> </span>main.o<span class="w"> </span>file<span class="w"> </span>hello.o<span class="w"> </span> + +<span class="nf">.c.o</span><span class="o">:</span> +<span class="w"> </span><span class="k">$(</span>CC<span class="k">)</span><span class="w"> </span><span class="k">$(</span>CFLAGS<span class="k">)</span><span class="w"> </span>$< + +<span class="nf">clean</span><span class="o">:</span> +<span class="w"> </span>rm<span class="w"> </span><span class="k">$(</span>obj<span class="k">)</span><span class="w"> </span><span class="k">$(</span>bin<span class="k">)</span> +</code></pre> +</div> + +<p>Where, <code>main.c</code></p> + +<div class="codehilite"> +<pre><span></span><code><span class="kt">void</span><span class="w"> </span><span class="nf">hello</span><span class="p">(</span><span class="kt">void</span><span class="p">);</span> + +<span class="kt">int</span><span class="w"> </span><span class="nf">main</span><span class="p">(</span><span class="kt">void</span><span class="p">)</span> +<span class="p">{</span> +<span class="w"> </span><span class="n">hello</span><span class="p">();</span> +<span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="mi">0</span><span class="p">;</span> +<span class="p">}</span> +</code></pre> +</div> + +<p>and <code>hello.c</code></p> + +<div class="codehilite"> +<pre><span></span><code><span class="cm">/* hello.c */</span> +<span class="cp">#include</span><span class="w"> </span><span class="cpf"><stdio.h></span> + +<span class="kt">void</span><span class="w"> </span><span class="nf">hello</span><span class="p">(</span><span class="kt">void</span><span class="p">)</span> +<span class="p">{</span> +<span class="w"> </span><span class="n">printf</span><span class="p">(</span><span class="s">"Hello!"</span><span class="p">);</span> +<span class="p">}</span> +</code></pre> +</div> + +<p>To compile into <code>tizts.com</code> simply run <code>wmake</code></p> + +<div class="codehilite"> +<pre><span></span><code>$<span class="w"> </span>wmake +➜<span class="w"> </span>simple-cpp<span class="w"> </span>wmake +Open<span class="w"> </span>Watcom<span class="w"> </span>Make<span class="w"> </span>Version<span class="w"> </span><span class="m">2</span>.0<span class="w"> </span>beta<span class="w"> </span>Mar<span class="w"> </span><span class="m">15</span><span class="w"> </span><span class="m">2024</span><span class="w"> </span><span class="m">13</span>:10:16 +Copyright<span class="w"> </span><span class="o">(</span>c<span class="o">)</span><span class="w"> </span><span class="m">2002</span>-2024<span class="w"> </span>The<span class="w"> </span>Open<span class="w"> </span>Watcom<span class="w"> </span>Contributors.<span class="w"> </span>All<span class="w"> </span>Rights<span class="w"> </span>Reserved. +Portions<span class="w"> </span>Copyright<span class="w"> </span><span class="o">(</span>c<span class="o">)</span><span class="w"> </span><span class="m">1988</span>-2002<span class="w"> </span>Sybase,<span class="w"> </span>Inc.<span class="w"> </span>All<span class="w"> </span>Rights<span class="w"> </span>Reserved. +Source<span class="w"> </span>code<span class="w"> </span>is<span class="w"> </span>available<span class="w"> </span>under<span class="w"> </span>the<span class="w"> </span>Sybase<span class="w"> </span>Open<span class="w"> </span>Watcom<span class="w"> </span>Public<span class="w"> </span>License. +See<span class="w"> </span>https://github.com/open-watcom/open-watcom-v2#readme<span class="w"> </span><span class="k">for</span><span class="w"> </span>details. +<span class="w"> </span>wcc<span class="w"> </span>-0<span class="w"> </span>main.c +Open<span class="w"> </span>Watcom<span class="w"> </span>C<span class="w"> </span>x86<span class="w"> </span><span class="m">16</span>-bit<span class="w"> </span>Optimizing<span class="w"> </span>Compiler +Version<span class="w"> </span><span class="m">2</span>.0<span class="w"> </span>beta<span class="w"> </span>Mar<span class="w"> </span><span class="m">15</span><span class="w"> </span><span class="m">2024</span><span class="w"> </span><span class="m">13</span>:11:55 +Copyright<span class="w"> </span><span class="o">(</span>c<span class="o">)</span><span class="w"> </span><span class="m">2002</span>-2024<span class="w"> </span>The<span class="w"> </span>Open<span class="w"> </span>Watcom<span class="w"> </span>Contributors.<span class="w"> </span>All<span class="w"> </span>Rights<span class="w"> </span>Reserved. +Portions<span class="w"> </span>Copyright<span class="w"> </span><span class="o">(</span>c<span class="o">)</span><span class="w"> </span><span class="m">1984</span>-2002<span class="w"> </span>Sybase,<span class="w"> </span>Inc.<span class="w"> </span>All<span class="w"> </span>Rights<span class="w"> </span>Reserved. +Source<span class="w"> </span>code<span class="w"> </span>is<span class="w"> </span>available<span class="w"> </span>under<span class="w"> </span>the<span class="w"> </span>Sybase<span class="w"> </span>Open<span class="w"> </span>Watcom<span class="w"> </span>Public<span class="w"> </span>License. +See<span class="w"> </span>https://github.com/open-watcom/open-watcom-v2#readme<span class="w"> </span><span class="k">for</span><span class="w"> </span>details. +main.c<span class="o">(</span><span class="m">8</span><span class="o">)</span>:<span class="w"> </span>Warning!<span class="w"> </span>W138:<span class="w"> </span>No<span class="w"> </span>newline<span class="w"> </span>at<span class="w"> </span>end<span class="w"> </span>of<span class="w"> </span>file +main.c:<span class="w"> </span><span class="m">8</span><span class="w"> </span>lines,<span class="w"> </span>included<span class="w"> </span><span class="m">53</span>,<span class="w"> </span><span class="m">1</span><span class="w"> </span>warnings,<span class="w"> </span><span class="m">0</span><span class="w"> </span>errors +Code<span class="w"> </span>size:<span class="w"> </span><span class="m">12</span> +<span class="w"> </span>wcc<span class="w"> </span>-0<span class="w"> </span>hello.c +Open<span class="w"> </span>Watcom<span class="w"> </span>C<span class="w"> </span>x86<span class="w"> </span><span class="m">16</span>-bit<span class="w"> </span>Optimizing<span class="w"> </span>Compiler +Version<span class="w"> </span><span class="m">2</span>.0<span class="w"> </span>beta<span class="w"> </span>Mar<span class="w"> </span><span class="m">15</span><span class="w"> </span><span class="m">2024</span><span class="w"> </span><span class="m">13</span>:11:55 +Copyright<span class="w"> </span><span class="o">(</span>c<span class="o">)</span><span class="w"> </span><span class="m">2002</span>-2024<span class="w"> </span>The<span class="w"> </span>Open<span class="w"> </span>Watcom<span class="w"> </span>Contributors.<span class="w"> </span>All<span class="w"> </span>Rights<span class="w"> </span>Reserved. +Portions<span class="w"> </span>Copyright<span class="w"> </span><span class="o">(</span>c<span class="o">)</span><span class="w"> </span><span class="m">1984</span>-2002<span class="w"> </span>Sybase,<span class="w"> </span>Inc.<span class="w"> </span>All<span class="w"> </span>Rights<span class="w"> </span>Reserved. +Source<span class="w"> </span>code<span class="w"> </span>is<span class="w"> </span>available<span class="w"> </span>under<span class="w"> </span>the<span class="w"> </span>Sybase<span class="w"> </span>Open<span class="w"> </span>Watcom<span class="w"> </span>Public<span class="w"> </span>License. +See<span class="w"> </span>https://github.com/open-watcom/open-watcom-v2#readme<span class="w"> </span><span class="k">for</span><span class="w"> </span>details. +hello.c:<span class="w"> </span><span class="m">8</span><span class="w"> </span>lines,<span class="w"> </span>included<span class="w"> </span><span class="m">818</span>,<span class="w"> </span><span class="m">0</span><span class="w"> </span>warnings,<span class="w"> </span><span class="m">0</span><span class="w"> </span>errors +Code<span class="w"> </span>size:<span class="w"> </span><span class="m">17</span> +<span class="w"> </span>wlink<span class="w"> </span>name<span class="w"> </span>tizts.com<span class="w"> </span>system<span class="w"> </span>dos<span class="w"> </span>file<span class="w"> </span>main.o<span class="w"> </span>file<span class="w"> </span>hello.o +Open<span class="w"> </span>Watcom<span class="w"> </span>Linker<span class="w"> </span>Version<span class="w"> </span><span class="m">2</span>.0<span class="w"> </span>beta<span class="w"> </span>Mar<span class="w"> </span><span class="m">15</span><span class="w"> </span><span class="m">2024</span><span class="w"> </span><span class="m">13</span>:10:09 +Copyright<span class="w"> </span><span class="o">(</span>c<span class="o">)</span><span class="w"> </span><span class="m">2002</span>-2024<span class="w"> </span>The<span class="w"> </span>Open<span class="w"> </span>Watcom<span class="w"> </span>Contributors.<span class="w"> </span>All<span class="w"> </span>Rights<span class="w"> </span>Reserved. +Portions<span class="w"> </span>Copyright<span class="w"> </span><span class="o">(</span>c<span class="o">)</span><span class="w"> </span><span class="m">1985</span>-2002<span class="w"> </span>Sybase,<span class="w"> </span>Inc.<span class="w"> </span>All<span class="w"> </span>Rights<span class="w"> </span>Reserved. +Source<span class="w"> </span>code<span class="w"> </span>is<span class="w"> </span>available<span class="w"> </span>under<span class="w"> </span>the<span class="w"> </span>Sybase<span class="w"> </span>Open<span class="w"> </span>Watcom<span class="w"> </span>Public<span class="w"> </span>License. +See<span class="w"> </span>https://github.com/open-watcom/open-watcom-v2#readme<span class="w"> </span><span class="k">for</span><span class="w"> </span>details. +loading<span class="w"> </span>object<span class="w"> </span>files +searching<span class="w"> </span>libraries +creating<span class="w"> </span>a<span class="w"> </span>DOS<span class="w"> </span>executable +</code></pre> +</div> + +<h3>Using CMake</h3> + +<p>Create a file called <code>CMakeLists.txt</code></p> + +<div class="codehilite"> +<pre><span></span><code><span class="nb">project</span><span class="p">(</span><span class="s">hello</span><span class="p">)</span> + +<span class="nb">set</span><span class="p">(</span><span class="s">SOURCES</span><span class="w"> </span><span class="s">abc.c</span><span class="p">)</span> + +<span class="nb">add_executable</span><span class="p">(</span><span class="s">hello</span><span class="w"> </span><span class="o">${</span><span class="nv">SOURCES</span><span class="o">}</span><span class="p">)</span> +</code></pre> +</div> + +<p>Where, <code>abc.c</code> is:</p> + +<div class="codehilite"> +<pre><span></span><code><span class="cp">#include</span><span class="w"> </span><span class="cpf"><stdio.h></span> + +<span class="kt">int</span><span class="w"> </span><span class="nf">main</span><span class="p">()</span><span class="w"> </span><span class="p">{</span> +<span class="w"> </span><span class="n">printf</span><span class="p">(</span><span class="s">"Does this work?"</span><span class="p">);</span> +<span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="mi">0</span><span class="p">;</span> +<span class="p">}</span> +</code></pre> +</div> + +<div class="codehilite"> +<pre><span></span><code>mkdir<span class="w"> </span>build +<span class="nb">cd</span><span class="w"> </span>build +</code></pre> +</div> + +<p>And build using CMake</p> + +<pre><code>cmake -DCMAKE_SYSTEM_NAME=DOS -DCMAKE_SYSTEM_PROCESSOR=I86 -DCMAKE_C_FLAGS="-0 -bt=dos -d0 -oaxt" -G "Watcom WMake" ../.. +</code></pre> + +<p>There you have it. Three different ways to compile a C program on a macOS device in 2024 that can run on an IBM PC 5150 (which was released in 1981!)</p> + +<h2>Testing with DOSBox-X</h2> + +<div class="codehilite"> +<pre><span></span><code>cp<span class="w"> </span>example1.exe<span class="w"> </span>~/Downloads +/Applications/dosbox-x.app/Contents/MacOS/dosbox-x +</code></pre> +</div> + +<p>In DOSBox-X we now mount the <code>~/Downloads</code> folder as our <code>C:</code> drive</p> + +<pre><code>mount C ~/Downloads +</code></pre> + +<p>Switch to the C drive</p> + +<pre><code>C: +</code></pre> + +<p>Run the program:</p> + +<pre><code>example1 +</code></pre> + +<p><img src="/assets/posts/dosbox/hello-world.png" alt="Running our program in DOSBox-X" /></p> + +<p><em>My DOSBox setup might look slightly different than yours...</em></p> + + <blockquote>If you have scrolled this far, consider subscribing to my mailing list <a href="https://listmonk.navan.dev/subscription/form">here.</a> You can subscribe to either a specific type of post you are interested in, or subscribe to everything with the "Everything" list.</blockquote> + <script data-isso="https://comments.navan.dev/" + src="https://comments.navan.dev/js/embed.min.js"></script> + <section id="isso-thread"> + <noscript>Javascript needs to be activated to view comments.</noscript> + </section> +</main> + + <script src="assets/manup.min.js"></script> + <script src="/pwabuilder-sw-register.js"></script> +</body> +</html>
\ No newline at end of file diff --git a/docs/posts/index.html b/docs/posts/index.html index 4194100..2d9d613 100644 --- a/docs/posts/index.html +++ b/docs/posts/index.html @@ -52,6 +52,21 @@ <ul> + <li><a href="/posts/2024-03-15-setting-up-macos-for-8088-dos-dev.html">Cross-Compiling Hello World for DOS on macOS</a></li> + <ul> + <li>This goes through compiling Open Watcom 2 and creating simple hello-world exampls</li> + <li>Published On: 2024-03-15 13:16</li> + <li>Tags: + + <a href='/tags/DOS.html'>DOS</a>, + + <a href='/tags/x86.html'>x86</a>, + + <a href='/tags/macOS.html'>macOS</a> + + </ul> + + <li><a href="/posts/2024-02-26-control-element-under-another-element-html-css.html">Interacting with underlying element in HTML</a></li> <ul> <li>With CSS you can disable any interactions with an element and directly control the underlying element</li> diff --git a/docs/tags/DOS.html b/docs/tags/DOS.html new file mode 100644 index 0000000..3a75f5b --- /dev/null +++ b/docs/tags/DOS.html @@ -0,0 +1,73 @@ +<!DOCTYPE html> +<html lang="en"> +<head> + + <link rel="stylesheet" href="https://unpkg.com/latex.css/style.min.css" /> + <link rel="stylesheet" href="/assets/main.css" /> + <meta charset="utf-8"> + <meta name="viewport" content="width=device-width, initial-scale=1.0"> + <title>"DOS"</title> + <meta name="og:site_name" content="Navan Chauhan" /> + <link rel="canonical" href="https://web.navan.dev" /> + <meta name="twitter:url" content="https://web.navan.dev /> + <meta name="og:url" content="https://web.navan.dev" /> + <meta name="twitter:title" content="Hey - Home" /> + <meta name="og:title" content="Hey - Home" /> + <meta name="description" content="code snippets, long-form rants, and tutorials" /> + <meta name="twitter:description" content="code snippets, long-form rants, and tutorials" /> + <meta name="og:description" content="code snippets, long-form rants, and tutorials" /> + <meta name="twitter:card" content="summary_large_image" /> + <meta name="viewport" content="width=device-width, initial-scale=1.0" /> + <link rel="shortcut icon" href="/images/favicon.png" type="image/png" /> + <link rel="alternate" href="/feed.rss" type="application/rss+xml" title="Subscribe to Navan Chauhan" /> + <meta name="twitter:image" content="https://web.navan.dev/images/logo.png" /> + <meta name="og:image" content="https://web.navan.dev/images/logo.png" /> + <meta name="google-site-verification" content="LVeSZxz-QskhbEjHxOi7-BM5dDxTg53x2TwrjFxfL0k" /> + <script data-goatcounter="https://navanchauhan.goatcounter.com/count" + async src="//gc.zgo.at/count.js"></script> + <script defer data-domain="web.navan.dev" src="https://plausible.io/js/plausible.js"></script> + <link rel="manifest" href="/manifest.json" /> + +</head> +<body> + <center><nav style="display: block;"> +| +<a href="/">home</a> | +<a href="/about/">about/links</a> | +<a href="/posts/">posts</a> | +<a href="/3D-Designs/">3D designs</a> | +<!--<a href="/publications/">publications</a> |--> +<!--<a href="/repo/">iOS repo</a> |--> +<a href="/feed.rss">RSS Feed</a> | +</nav> +</center> + + +<main> + <h1>DOS</h1><p>Posts tagged 'DOS'</p> +</main> + +<ul> + + <li><a href="/posts/2024-03-15-setting-up-macos-for-8088-dos-dev.html">Cross-Compiling Hello World for DOS on macOS</a></li> + <ul> + <li>This goes through compiling Open Watcom 2 and creating simple hello-world exampls</li> + <li>Published On: 2024-03-15 13:16</li> + <li>Tags: + + <a href='/tags/DOS.html'>DOS</a>, + + <a href='/tags/x86.html'>x86</a>, + + <a href='/tags/macOS.html'>macOS</a> + + </ul> + + +</ul> + + + <script src="assets/manup.min.js"></script> + <script src="/pwabuilder-sw-register.js"></script> +</body> +</html>
\ No newline at end of file diff --git a/docs/tags/JS.html b/docs/tags/JS.html new file mode 100644 index 0000000..b01594b --- /dev/null +++ b/docs/tags/JS.html @@ -0,0 +1,73 @@ +<!DOCTYPE html> +<html lang="en"> +<head> + + <link rel="stylesheet" href="https://unpkg.com/latex.css/style.min.css" /> + <link rel="stylesheet" href="/assets/main.css" /> + <meta charset="utf-8"> + <meta name="viewport" content="width=device-width, initial-scale=1.0"> + <title>"JS"</title> + <meta name="og:site_name" content="Navan Chauhan" /> + <link rel="canonical" href="https://web.navan.dev" /> + <meta name="twitter:url" content="https://web.navan.dev /> + <meta name="og:url" content="https://web.navan.dev" /> + <meta name="twitter:title" content="Hey - Home" /> + <meta name="og:title" content="Hey - Home" /> + <meta name="description" content="code snippets, long-form rants, and tutorials" /> + <meta name="twitter:description" content="code snippets, long-form rants, and tutorials" /> + <meta name="og:description" content="code snippets, long-form rants, and tutorials" /> + <meta name="twitter:card" content="summary_large_image" /> + <meta name="viewport" content="width=device-width, initial-scale=1.0" /> + <link rel="shortcut icon" href="/images/favicon.png" type="image/png" /> + <link rel="alternate" href="/feed.rss" type="application/rss+xml" title="Subscribe to Navan Chauhan" /> + <meta name="twitter:image" content="https://web.navan.dev/images/logo.png" /> + <meta name="og:image" content="https://web.navan.dev/images/logo.png" /> + <meta name="google-site-verification" content="LVeSZxz-QskhbEjHxOi7-BM5dDxTg53x2TwrjFxfL0k" /> + <script data-goatcounter="https://navanchauhan.goatcounter.com/count" + async src="//gc.zgo.at/count.js"></script> + <script defer data-domain="web.navan.dev" src="https://plausible.io/js/plausible.js"></script> + <link rel="manifest" href="/manifest.json" /> + +</head> +<body> + <center><nav style="display: block;"> +| +<a href="/">home</a> | +<a href="/about/">about/links</a> | +<a href="/posts/">posts</a> | +<a href="/3D-Designs/">3D designs</a> | +<!--<a href="/publications/">publications</a> |--> +<!--<a href="/repo/">iOS repo</a> |--> +<a href="/feed.rss">RSS Feed</a> | +</nav> +</center> + + +<main> + <h1>JS</h1><p>Posts tagged 'JS'</p> +</main> + +<ul> + + <li><a href="/posts/2024-03-04-opencvjs-video-processing.html">Video Processing W/ OpenCV.js</a></li> + <ul> + <li>Real time video processing with OpenCV.js in the browser</li> + <li>Published On: 2024-03-04 12:01</li> + <li>Tags: + + <a href='/tags/HTML.html'>HTML</a>, + + <a href='/tags/JS.html'>JS</a>, + + <a href='/tags/OpenCV.html'>OpenCV</a> + + </ul> + + +</ul> + + + <script src="assets/manup.min.js"></script> + <script src="/pwabuilder-sw-register.js"></script> +</body> +</html>
\ No newline at end of file diff --git a/docs/tags/OpenCV.html b/docs/tags/OpenCV.html new file mode 100644 index 0000000..ddaa485 --- /dev/null +++ b/docs/tags/OpenCV.html @@ -0,0 +1,73 @@ +<!DOCTYPE html> +<html lang="en"> +<head> + + <link rel="stylesheet" href="https://unpkg.com/latex.css/style.min.css" /> + <link rel="stylesheet" href="/assets/main.css" /> + <meta charset="utf-8"> + <meta name="viewport" content="width=device-width, initial-scale=1.0"> + <title>"OpenCV"</title> + <meta name="og:site_name" content="Navan Chauhan" /> + <link rel="canonical" href="https://web.navan.dev" /> + <meta name="twitter:url" content="https://web.navan.dev /> + <meta name="og:url" content="https://web.navan.dev" /> + <meta name="twitter:title" content="Hey - Home" /> + <meta name="og:title" content="Hey - Home" /> + <meta name="description" content="code snippets, long-form rants, and tutorials" /> + <meta name="twitter:description" content="code snippets, long-form rants, and tutorials" /> + <meta name="og:description" content="code snippets, long-form rants, and tutorials" /> + <meta name="twitter:card" content="summary_large_image" /> + <meta name="viewport" content="width=device-width, initial-scale=1.0" /> + <link rel="shortcut icon" href="/images/favicon.png" type="image/png" /> + <link rel="alternate" href="/feed.rss" type="application/rss+xml" title="Subscribe to Navan Chauhan" /> + <meta name="twitter:image" content="https://web.navan.dev/images/logo.png" /> + <meta name="og:image" content="https://web.navan.dev/images/logo.png" /> + <meta name="google-site-verification" content="LVeSZxz-QskhbEjHxOi7-BM5dDxTg53x2TwrjFxfL0k" /> + <script data-goatcounter="https://navanchauhan.goatcounter.com/count" + async src="//gc.zgo.at/count.js"></script> + <script defer data-domain="web.navan.dev" src="https://plausible.io/js/plausible.js"></script> + <link rel="manifest" href="/manifest.json" /> + +</head> +<body> + <center><nav style="display: block;"> +| +<a href="/">home</a> | +<a href="/about/">about/links</a> | +<a href="/posts/">posts</a> | +<a href="/3D-Designs/">3D designs</a> | +<!--<a href="/publications/">publications</a> |--> +<!--<a href="/repo/">iOS repo</a> |--> +<a href="/feed.rss">RSS Feed</a> | +</nav> +</center> + + +<main> + <h1>OpenCV</h1><p>Posts tagged 'OpenCV'</p> +</main> + +<ul> + + <li><a href="/posts/2024-03-04-opencvjs-video-processing.html">Video Processing W/ OpenCV.js</a></li> + <ul> + <li>Real time video processing with OpenCV.js in the browser</li> + <li>Published On: 2024-03-04 12:01</li> + <li>Tags: + + <a href='/tags/HTML.html'>HTML</a>, + + <a href='/tags/JS.html'>JS</a>, + + <a href='/tags/OpenCV.html'>OpenCV</a> + + </ul> + + +</ul> + + + <script src="assets/manup.min.js"></script> + <script src="/pwabuilder-sw-register.js"></script> +</body> +</html>
\ No newline at end of file diff --git a/docs/tags/macOS.html b/docs/tags/macOS.html index 8b70731..028aef3 100644 --- a/docs/tags/macOS.html +++ b/docs/tags/macOS.html @@ -49,6 +49,21 @@ <ul> + <li><a href="/posts/2024-03-15-setting-up-macos-for-8088-dos-dev.html">Cross-Compiling Hello World for DOS on macOS</a></li> + <ul> + <li>This goes through compiling Open Watcom 2 and creating simple hello-world exampls</li> + <li>Published On: 2024-03-15 13:16</li> + <li>Tags: + + <a href='/tags/DOS.html'>DOS</a>, + + <a href='/tags/x86.html'>x86</a>, + + <a href='/tags/macOS.html'>macOS</a> + + </ul> + + <li><a href="/posts/2023-02-08-Interact-with-siri-from-the-terminal.html">Interacting with Siri using the command line</a></li> <ul> <li>Code snippet to interact with Siri by issuing commands from the command-line.</li> diff --git a/docs/tags/x86.html b/docs/tags/x86.html new file mode 100644 index 0000000..dab538b --- /dev/null +++ b/docs/tags/x86.html @@ -0,0 +1,73 @@ +<!DOCTYPE html> +<html lang="en"> +<head> + + <link rel="stylesheet" href="https://unpkg.com/latex.css/style.min.css" /> + <link rel="stylesheet" href="/assets/main.css" /> + <meta charset="utf-8"> + <meta name="viewport" content="width=device-width, initial-scale=1.0"> + <title>"x86"</title> + <meta name="og:site_name" content="Navan Chauhan" /> + <link rel="canonical" href="https://web.navan.dev" /> + <meta name="twitter:url" content="https://web.navan.dev /> + <meta name="og:url" content="https://web.navan.dev" /> + <meta name="twitter:title" content="Hey - Home" /> + <meta name="og:title" content="Hey - Home" /> + <meta name="description" content="code snippets, long-form rants, and tutorials" /> + <meta name="twitter:description" content="code snippets, long-form rants, and tutorials" /> + <meta name="og:description" content="code snippets, long-form rants, and tutorials" /> + <meta name="twitter:card" content="summary_large_image" /> + <meta name="viewport" content="width=device-width, initial-scale=1.0" /> + <link rel="shortcut icon" href="/images/favicon.png" type="image/png" /> + <link rel="alternate" href="/feed.rss" type="application/rss+xml" title="Subscribe to Navan Chauhan" /> + <meta name="twitter:image" content="https://web.navan.dev/images/logo.png" /> + <meta name="og:image" content="https://web.navan.dev/images/logo.png" /> + <meta name="google-site-verification" content="LVeSZxz-QskhbEjHxOi7-BM5dDxTg53x2TwrjFxfL0k" /> + <script data-goatcounter="https://navanchauhan.goatcounter.com/count" + async src="//gc.zgo.at/count.js"></script> + <script defer data-domain="web.navan.dev" src="https://plausible.io/js/plausible.js"></script> + <link rel="manifest" href="/manifest.json" /> + +</head> +<body> + <center><nav style="display: block;"> +| +<a href="/">home</a> | +<a href="/about/">about/links</a> | +<a href="/posts/">posts</a> | +<a href="/3D-Designs/">3D designs</a> | +<!--<a href="/publications/">publications</a> |--> +<!--<a href="/repo/">iOS repo</a> |--> +<a href="/feed.rss">RSS Feed</a> | +</nav> +</center> + + +<main> + <h1>x86</h1><p>Posts tagged 'x86'</p> +</main> + +<ul> + + <li><a href="/posts/2024-03-15-setting-up-macos-for-8088-dos-dev.html">Cross-Compiling Hello World for DOS on macOS</a></li> + <ul> + <li>This goes through compiling Open Watcom 2 and creating simple hello-world exampls</li> + <li>Published On: 2024-03-15 13:16</li> + <li>Tags: + + <a href='/tags/DOS.html'>DOS</a>, + + <a href='/tags/x86.html'>x86</a>, + + <a href='/tags/macOS.html'>macOS</a> + + </ul> + + +</ul> + + + <script src="assets/manup.min.js"></script> + <script src="/pwabuilder-sw-register.js"></script> +</body> +</html>
\ No newline at end of file |