Skip to content

Commit

Permalink
*
Browse files Browse the repository at this point in the history
  • Loading branch information
neauoire committed Jan 18, 2025
1 parent b551917 commit 999837a
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 45 deletions.
2 changes: 1 addition & 1 deletion site/drifblim.html
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ <h4>cat.rom</h4>
<style>
iframe { height:400px; background:#eee; border:2px solid black; border-radius:3px }
</style>
<ul></ul><p class="incoming"><b>incoming</b> <a href="symbols.html">symbols</a> <a href="oscean.html">oscean</a> <a href="uxntal_devlog.html">uxntal devlog</a> </p></main>
<ul></ul><p class="incoming"><b>incoming</b> <a href="symbols.html">symbols</a> <a href="uxn.html">uxn</a> <a href="oscean.html">oscean</a> <a href="uxntal_devlog.html">uxntal devlog</a> </p></main>
<footer>
<a href="ethics.html"><img src="../media/icon/3arrows.svg" alt="NoNazis!"/></a>
<a href="https://webring.xxiivv.com/" target="_blank"><img src="../media/icon/webring.svg" alt="Webring"/></a>
Expand Down
39 changes: 17 additions & 22 deletions site/uxn.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ <h2>Uxn is the virtual machine powering the Hundred Rabbits software.</h2>
<li><b>Varvara Devices</b>: <a href='varvara.html'>Reference</a>, <a href='https://git.sr.ht/~rabbits/uxn/tree/main/item/projects/examples/devices' target='_blank'>Tests</a></li>
</ul>

<p>This <a href='about.html'>wiki</a> along with most of the audio-visual projects
documented on it are running on Uxn.</p>
<p>This <a href='about.html'>wiki</a> along with most of the audio-visual
projects documented on it are running on Uxn.</p>

<h3>Memory</h3>

Expand All @@ -30,8 +30,8 @@ <h3>Memory</h3>
back, and 64kb of addressable <a href='uxntal_memory.html'>working memory</a>.
It can interface with up to <a href='uxntal_devices.html'>16 peripherals</a>,
such as <a href='varvara.html#screen'>screens</a> and <a
href='varvara.html#controller'>controllers</a>. Uxn's has no undefined behaviors,
and cannot error. </p>
href='varvara.html#controller'>controllers</a>. Uxn's has no registers, no
undefined behaviors, and cannot error.</p>

<table border='1'>
<tr><th><i>Shared</i></th><th>Memory</th><td>RAM</td><td>Data</td><td>64kb pages</td></tr>
Expand All @@ -42,35 +42,30 @@ <h3>Memory</h3>
<tr><th>IO</th><td>Devices</td><td>Data</td><td>256 bytes</td></tr>
</table>

<h3>Basic Emulator</h3>
<h3>Emulator</h3>

<p>Here is an implementation of a basic Uxn emulator in <a
href='../etc/uxnmin.c.txt' target='_blank'>150 lines of C</a> which includes
the <a href='varvara.html#console'>Console device</a> and passes the opcode
tests. The complete emulator used to build this wiki can be found <a
href='../etc/uxncli.c.txt' target='_blank'>here</a>.</p>
<p>Here is an implementation of a basic Uxn emulator in C89 which includes the
<a href='varvara.html#console'>Console device</a> and passes the opcode
tests:</p>

<div class='codeview'>
<iframe src='../etc/uxnmin.c.txt'></iframe>
<pre>cc uxnmin.c -o uxnmin <a href='../etc/uxnmin.c.txt' target='_blank'>view raw</a></pre>
</div>

<h3>Basic Assembler</h3>
<h3>Compiler</h3>

<p>Here is a self-hosted implementation of the assembler in <a
href='../etc/drifloon.tal.txt' target='_blank'>400 lines of Uxntal</a>, capable
of assembling itself.</p>
<p>A self-hosted compiler is one written in the language it compiles. A
pre-compiled <a href='https://rabbits.srht.site/drifblim/drifloon.rom'
target='_blank'>rom</a> is available, a new one can be created with <a
href='../etc/uxnasm.c.txt' target='_blank'>uxnasm.c</a> and a <a
href='../etc/drifloon.rom.txt' target='_blank'>hexdump</a> can also be
transformed into a rom with <a href='drifblim.html#bootstrap'>bootstrapping
tools</a>.</p>

<div class='codeview'>
<iframe src='../etc/drifloon.tal.txt'></iframe>
<pre>cat uxnasm.tal | uxncli uxnasm.bin > uxnasm-bootstrap.rom <a href='../etc/drifloon.tal.txt' target='_blank'>view raw</a></pre>
</div>

<p>Here is the 1.4kb binary data of the assembler above, alternatively, a new one can be created with <a href='../etc/uxnasm.c.txt' target='_blank'>uxnasm.c</a>.</p>

<div class='codeview'>
<iframe src='../etc/drifloon.rom.txt' style='height:200px'></iframe>
<pre>xxd -r -p uxnasm.rom uxnasm.tal <a href='../etc/drifloon.rom.txt' target='_blank'>view raw</a></pre>
<pre>cat drifloon.tal | uxncli drifloon.rom > res.rom <a href='../etc/drifloon.tal.txt' target='_blank'>view raw</a></pre>
</div>

<p>Stack-machines programming make for an habitable bedrock abstraction for this
Expand Down
39 changes: 17 additions & 22 deletions src/htm/uxn.htm
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ <h2>Uxn is the virtual machine powering the Hundred Rabbits software.</h2>
<li><b>Varvara Devices</b>: <a href='varvara.html'>Reference</a>, <a href='https://git.sr.ht/~rabbits/uxn/tree/main/item/projects/examples/devices' target='_blank'>Tests</a></li>
</ul>

<p>This <a href='about.html'>wiki</a> along with most of the audio-visual projects
documented on it are running on Uxn.</p>
<p>This <a href='about.html'>wiki</a> along with most of the audio-visual
projects documented on it are running on Uxn.</p>

<h3>Memory</h3>

Expand All @@ -23,8 +23,8 @@ <h3>Memory</h3>
back, and 64kb of addressable <a href='uxntal_memory.html'>working memory</a>.
It can interface with up to <a href='uxntal_devices.html'>16 peripherals</a>,
such as <a href='varvara.html#screen'>screens</a> and <a
href='varvara.html#controller'>controllers</a>. Uxn's has no undefined behaviors,
and cannot error. </p>
href='varvara.html#controller'>controllers</a>. Uxn's has no registers, no
undefined behaviors, and cannot error.</p>

<table border='1'>
<tr><th><i>Shared</i></th><th>Memory</th><td>RAM</td><td>Data</td><td>64kb pages</td></tr>
Expand All @@ -35,35 +35,30 @@ <h3>Memory</h3>
<tr><th>IO</th><td>Devices</td><td>Data</td><td>256 bytes</td></tr>
</table>

<h3>Basic Emulator</h3>
<h3>Emulator</h3>

<p>Here is an implementation of a basic Uxn emulator in <a
href='../etc/uxnmin.c.txt' target='_blank'>150 lines of C</a> which includes
the <a href='varvara.html#console'>Console device</a> and passes the opcode
tests. The complete emulator used to build this wiki can be found <a
href='../etc/uxncli.c.txt' target='_blank'>here</a>.</p>
<p>Here is an implementation of a basic Uxn emulator in C89 which includes the
<a href='varvara.html#console'>Console device</a> and passes the opcode
tests:</p>

<div class='codeview'>
<iframe src='../etc/uxnmin.c.txt'></iframe>
<pre>cc uxnmin.c -o uxnmin <a href='../etc/uxnmin.c.txt' target='_blank'>view raw</a></pre>
</div>

<h3>Basic Assembler</h3>
<h3>Compiler</h3>

<p>Here is a self-hosted implementation of the assembler in <a
href='../etc/drifloon.tal.txt' target='_blank'>400 lines of Uxntal</a>, capable
of assembling itself.</p>
<p>A self-hosted compiler is one written in the language it compiles. A
pre-compiled <a href='https://rabbits.srht.site/drifblim/drifloon.rom'
target='_blank'>rom</a> is available, a new one can be created with <a
href='../etc/uxnasm.c.txt' target='_blank'>uxnasm.c</a> and a <a
href='../etc/drifloon.rom.txt' target='_blank'>hexdump</a> can also be
transformed into a rom with <a href='drifblim.html#bootstrap'>bootstrapping
tools</a>.</p>

<div class='codeview'>
<iframe src='../etc/drifloon.tal.txt'></iframe>
<pre>cat uxnasm.tal | uxncli uxnasm.bin > uxnasm-bootstrap.rom <a href='../etc/drifloon.tal.txt' target='_blank'>view raw</a></pre>
</div>

<p>Here is the 1.4kb binary data of the assembler above, alternatively, a new one can be created with <a href='../etc/uxnasm.c.txt' target='_blank'>uxnasm.c</a>.</p>

<div class='codeview'>
<iframe src='../etc/drifloon.rom.txt' style='height:200px'></iframe>
<pre>xxd -r -p uxnasm.rom uxnasm.tal <a href='../etc/drifloon.rom.txt' target='_blank'>view raw</a></pre>
<pre>cat drifloon.tal | uxncli drifloon.rom > res.rom <a href='../etc/drifloon.tal.txt' target='_blank'>view raw</a></pre>
</div>

<p>Stack-machines programming make for an habitable bedrock abstraction for this
Expand Down

0 comments on commit 999837a

Please sign in to comment.