Boostrapping
The steps below recover a working assembler from a hexdump and verify it reproduces itself. Since the assembler is written in the language it is assembling, you have a few choices:
- Download a pre-assembled rom.
- Assemble your own with the live REPL.
- Bootstrap from a hexdump.
If you are unable to assemble your own copy of Drifblim, lost its source file, or simply want to make sure that the assembler is unaltered, you will need the hexadecimal data of drifblim.rom. Here are some portable tools to help with the bootstrapping process:
Step 1: Make Binaries
First off, you need a way to create binary files from hex dumps. If you don't have access to xxd, you can paste the following line in a text file, and run a hex dump through it:
FAFAFXFZFwfaalFBFAAFFZFZXVGfoAAFXFZFFXXfoKgaam&/$AAAFXJgaam&/AFAAFXFFZZDYJF$/FXAKF|Bgaam/AAFXFZFXgBFAYXFEF|BGGoGAFAFXFZDYFEF|B/DAAFX_gBAGYgDAAFXFXAXZEEZXGPgBAAFXFFZZ_]GQFAPGA^GAQFAPgaamFPGAAFXFXFFXXW
cat drifblim.rom.txt | uxncli xh.txt > drifblim.rom
Step 2: Create Copies
At this point, you have recovered your own drifblim.rom from a hex dump. The next step is to make a new drifblim.rom from its source code, using the newly assembled rom.
uxncli drifblim.rom drifblim.tal.txt drifblim2.rom
Note that in Uxntal, hexadecimal numbers are valid code and so any rom can be recovered from a hex dump with a working assembler.
Step 3: Compare Results
Finally, we should have two identical roms of the assembler, where one was assembled from the textual source. If for some reason you do not have access to the unix diff command, you can compare the two hexadecimal dumps with the checksum, which takes two filepaths and compare their content.
uxncli drifblim.rom checksum.tal.txt checksum.rom uxncli checksum.rom drifblim.rom drifblim2.rom
1fa03ffb drifblim.rom 1fa03ffb drifblim2.rom
Alternatively, if your Varvara implementation does not support the File device, use the Drifloon assembler(tal/rom). To validate your own assembler, see the tests, and disassemble the result with uxndis.
Step 4: Deep Validation
At this point, you have verified that Drifblim assembles itself correctly, assuming that uxncli is trustworthy. Now, let's remove that assumption. uxnmin.tal is a complete Uxn virtual machine, written in Uxntal. It's small enough to audit from its hexdump against the Uxn specification:
cat uxnmin.rom.txt | uxncli xh.txt > uxnmin.rom
Next, we'll use Drifloon for this part, let's assemble it:
cat drifloon.rom.txt | uxncli xh.txt > drifloon.rom
Run Drifloon inside uxnmin and verify that it produces an identical assembler:
cat drifloon.tal.txt | uxncli uxnmin.rom drifloon.rom > drifloon2.rom uxncli checksum.rom drifloon.rom drifloon2.rom
566fd630 drifloon.rom 566fd630 drifloon2.rom
Lastly, verify that uxnmin assembles itself through that inner assembler:
cat uxnmin.tal.txt | uxncli uxnmin.rom drifloon.rom > uxnmin2.rom uxncli checksum.rom uxnmin.rom uxnmin2.rom
8f815450 uxnmin.rom 8f815450 uxnmin2.rom
The assembler and the virtual machine are each a witness to the other. If both comparisons pass, the trust boundary is the hexdump of uxnmin.rom(1kb). Everything above it is verified by the chain.
incoming: drifblim uxn devlog 2026