XXIIVV

Drifblim is a Uxntal assembler, written in Uxntal.

The assembler is written in 400 lines of Uxntal, it's designed to help bootstrap the Uxn ecosystem. The goal is for Driflim's source code to be released as a print-friendly document, along with its assembled hexadecimal data and the napkin definition of the virtual machine.

80 a b c M[PC+1] 08 a b?c             10 a b M[c8]      18 a b+c
01 a b c+1       09 a b!c             11 a {M[c8]=b}    19 a b-c
02 a b           0a a b>c             12 a b M[PC+c8]   1a a b*c
03 a c           0b a b<c             13 a {M[PC+c8]=b} 1b a b/c
04 a c b         0c a b {PC+=c}       14 a b M[c16]     1c a b&c
05 b c a         0d a {(b8)PC+=c}     15 a {M[c16]=b}   1d a b|c
06 a b c c       0e a b {rs.PC PC+=c} 16 a b D[c8]      1e a b^c
07 a b c b       0f a b {rs.c}        17 a {D[c8]=b}    1f a b>>c8l<<c8h

2x a16 b16+c16   4x a b c {rs.b+rs.c} 8x a b c b+c

Since this assembler is written in the language it is assembling, it creates a chicken-and-egg problem. You have two choices, download a pre-assembled drifblim.rom(1.7kb), or assemble it with uxnasm.c.

Drifblim styleguide

Drawing by Rekka Bellum

Drifblim is strong enough to lift Pokémon or people but has no control over its flight. This causes it to drift with the wind and end up anywhere.

drifblim.tal

drifblim.rom

This is the hexadecimal data of the drifblim assembler, I am keeping a copy of it here just in case.

a001 0e80 1037 a007 65a0 059c 2e00 8012 1680 00a0 05e3 2e80 010d 00a0 0129 8010
37a0 0773 a005 9c2e 0080 1216 8030 a005 e32e 8001 0d00 a00a 1817 8035 0ea0 0702
a002 0235 a006 dea0 0205 3580 00a0 0438 1580 f030 a004 4635 a000 3080 b837 a000
0180 ba37 800b 0ea0 04ef 2ea0 0101 800e 3700 a000 60a0 00a0 a005 f82e a000 0080
a837 a000 0180 aa37 a001 9980 ac37 80a2 36a0 0000 2880 080d 8000 8017 0e80 e80c
80f6 1280 0008 8001 0d6c a000 00a0 07e5 a005 7b2c 8020 8a03 801a 0d02 a000 c026
a005 c92e 1d80 020d 226c 2680 0e0e a000 30a0 05f8 2ca0 00c0 a005 be2c 9480 2808
8013 0d94 8029 0880 0c0d 8000 800f 0d26 800d 0e21 342c 1480 2919 80ee 136c 226c
2fa0 06d5 a006 b194 ef14 0880 1f0d 2121 21aa 80f2 0d22 226f 26a0 0479 2e80 100d
26a0 0639 2e80 0d0d 22a0 06d5 6c23 626c 22a0 06d8 6c22 a006 db6c 226c 21a0 0623
2e80 f230 ab80 050d 39a0 0462 2c22 80f2 316c 21a0 0623 2ea0 0462 2c21 a002 d72e
a003 302c 21a0 0366 2ea0 0330 2c21 94a0 0430 2e21 9480 f60d 226c 21a0 03af 2ca0
0483 2ea0 0430 2ca0 03e8 2ca0 07d2 a005 7b2c 2280 ffa0 0421 2c22 a0ff ffa0 0427
2c22 a0ff ffa0 042c 2c21 a002 d72e 226c 2180 540e 3403 a004 212c 2180 4a0e 8027
0ea0 0421 2c21 803f 0e34 a004 272c 2180 360e 34a0 042c 2ca0 0090 afa0 0030 a005
f82e 266f a005 d32c b480 f230 39a0 0003 3926 a000 8038 0280 030d 2303 6c22 2121
21a0 07ec a005 7b2c 9480 2609 8005 0d21 a003 662e a003 872e 26a0 ffff 2880 080d
a121 9401 0505 156c 22a0 07df a005 7b2c 26a0 0387 2ea0 ffff 2880 070d a007 c2a0
057b 2c80 f230 a007 f4af 3561 6161 26ef a005 d32e a005 c92e 6f38 2180 e933 a000
0021 80fa 336c a000 60af a000 30a0 05f8 2ea0 0090 efa0 05d3 2e80 2fef a005 be2e
efa0 05d0 2e6f 6c2f a007 f421 2121 26ef a006 0a2e 8012 0da0 05b2 2e21 a121 2114
80e8 0d22 62a0 ffff 6ca0 0003 3962 6c26 a006 392e 8000 0880 270d 26a0 05c9 2ea0
0004 2980 070d a006 232e 805a 0c26 a005 c92e a000 0229 8008 0da0 0623 2e03 8040
0ca0 07d8 a005 7b2c 26a0 0639 2e80 0008 8027 0d26 a005 c92e a000 0429 8007 0da0
0623 2e80 260c 26a0 05c9 2ea0 0002 2980 080d a006 232e 0380 160c a007 d8a0 057b
2c80 8004 8005 0c80 a080 040e 0480 000e 0680 2d13 80f2 3080 0180 160d 26a0 0100
2b80 0e0d 26a0 0000 2a80 060d a004 6180 be37 2180 f231 8001 0d6c 80f2 3080 f031
6c00 a000 00a8 800d 0d80 0080 c20e 21aa 80f6 0d22 226c 2222 6c26 a007 6280 5d0e
8031 0d2f a020 0080 0007 8003 1aa0 0702 38ef 8048 0e80 0a0d 018a 80ea 0d22 6280
006c 0306 8000 0880 701f 186f 2121 2180 060e 186c 2280 016c c000 9480 3208 8050
1f0f 5894 8072 0880 601f 0f58 9480 6b08 8070 1f0f 5821 9480 e00d 224f 6cb4 2f21
2124 b42f 2121 6814 0f14 0f48 5c4f 6ca0 07f4 a121 2114 0680 400a 0480 5b0b 1c80
190d a121 1480 130d a007 a6a0 059c 2e21 2121 26a0 059c 2ea0 0a18 17a0 05b2 2e21
a121 2114 80cb 0d22 a007 82a0 059c 2ea0 0000 a005 9c2e a007 8da0 059c 2ea0 0030
a005 9c2e a007 92a0 059c 2e80 f030 a001 0039 a006 742e a007 97a0 059c 2e80 2880
1817 a003 5f34 a006 742e a007 9ea0 059c 2e80 2980 1817 a00a 1817 6ca0 07b8 a005
a72e a005 a72e 803a 8019 17a0 2019 17a0 05a7 2ea0 0a19 17a0 010f 1700 9480 1817
2194 80f7 0d22 6c94 8019 1721 9480 f70d 226c 9480 0009 0c6c 2194 80fb 0d6c 80f1
0ea1 8000 0505 1515 6c26 80e5 0e24 396c 80df 0e2f 94ef 1561 2194 80f7 0d22 8000
6f15 6c07 8021 0b80 0a0d 8000 04a0 05be 2e80 006c 2280 016c 2738 24af a000 006f
3521 21aa 80f4 0d22 226c 2f94 d44f 9c80 0008 800a 0d89 8006 0d22 2161 80ec 0c23
6208 6ce0 0000 c040 7fc0 0094 8021 0e0f 7821 9480 f00d 226f 6c94 8013 0e80 ff09
8004 0d22 8000 6c21 9480 ed0d 2280 016c 0680 2f0a 0780 3a0b 1c80 100d 0680 600a
0780 670b 1c80 080d 0280 ff6c 8030 196c 8057 196c 8000 8023 13a0 2710 801a 0ea0
03e8 8014 0ea0 0064 800e 0ea0 000a 8008 0e03 8030 1880 1817 6cbb 8680 0008 800c
0d06 8030 1880 1817 80ff 80ef 1302 3a39 6c7c 023c 2402 5240 025b 2602 642e 0292
2c02 923b 0299 3a02 a15b 023a 5d02 3a23 027a 2202 6d00 028b 0002 7f00 0287 7c02
3c24 0252 4002 a926 023a 2e02 b02c 02ba 3b02 c53a 02ce 5b02 3a5d 023a 2302 7a22
026d 4c49 5449 4e43 504f 504e 4950 5357 5052 4f54 4455 504f 5652 4551 554e 4551
4754 484c 5448 4a4d 504a 434e 4a53 5253 5448 4c44 5a53 545a 4c44 5253 5452 4c44
4153 5441 4445 4944 454f 4144 4453 5542 4d55 4c44 4956 414e 444f 5241 454f 5253
4654 4252 4b49 6e70 7574 282e 7461 6c29 3a20 004f 7574 7075 7428 2e72 6f6d 293a
2000 4173 7365 6d62 6c65 6420 0020 2d3e 2000 2069 6e20 0020 6279 7465 7300 206c
6162 656c 7300 2d2d 2055 6e75 7365 6420 6c61 6265 6c3a 2000 2121 2045 7272 6f72
2000 4475 706c 6963 6174 6520 4c61 6265 6c00 546f 6b65 6e00 4e75 6d62 6572 004c
6162 656c 0053 6f75 7263 6500 546f 6f20 4661 7200

Incoming: uxn devlog oscean