XXIIVV

Drifblim is a Uxntal assembler, written in Uxntal.

The assembler is written in less than 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.

00 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.2kb), or use uxnasm.c.

It will not support macros or includes. Instead, a separate pre-processor rom might be considered.

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 0780 1037 00a0 0000 2f80 1216 0680 200b 0780 7f0a 1d80 130d efa0 053a 2ea0
003f 2a80 070d efa0 054d 2e62 0002 ef80 a837 a000 0180 aa37 a001 3f80 ac37 8000
8015 0e80 a236 1d80 ee0d a001 fd2e 6fa0 02b3 2ea0 010f 1700 8028 8803 8023 0d80
2988 0380 1c0d 8000 8015 0d80 208a 0380 170d a000 4026 8017 0ea0 0030 a005 2a2e
026c 8029 1980 df13 6ca0 0040 a005 4d2c a005 3a2e 1d80 010d 6ca0 0677 a006 5094
a000 4014 0880 330d 2121 21aa 80f0 0d22 22a0 0040 26a0 0451 2e80 280d 26a0 053a
2ea0 0004 2880 240d 26a0 053a 2ea0 0002 2880 200d a006 3da0 05a2 2c23 a000 4021
2421 342c a004 5b2e a004 3e2c a004 c72e a004 3a2c a004 c72e 03a0 043e 2c80 d230
1d80 010d 6ca0 3677 2680 0f0e 2121 a005 412e 21a1 2114 80ef 0d22 6caf 2121 a180
6e0e 26a0 ffff 2880 1e0d 342f 9480 2e08 8021 0d94 802c 0880 200d 9480 3b08 8040
0d94 803a 0880 3e0d 226f 2121 62a0 0639 a005 a22c 6f03 6f80 1f0c 6fef 3439 a000
0239 26a0 0080 3802 8000 0880 090d 2721 a006 35a0 05a2 2e03 6f34 a066 7738 1522
6c6f 6f80 020c 6f6f 34a0 6677 3835 226c 2fa0 0677 a121 efa0 0567 2e80 130d 2121
a005 412e 21a1 2114 80e9 0d22 62a0 ffff 6c62 6ca0 0641 27a0 0541 2ea0 0003 39a0
0557 2e26 80a8 3780 d630 a001 0039 80aa 37a0 6777 80ae 37a0 0645 a005 bb2e a005
bb2e a028 1817 80d6 30a0 0585 2e80 2f80 1817 a000 00a0 6677 39a0 0585 2ea0 2918
17a0 0a18 176c 26a0 053a 2ea0 0004 2880 130d 26a0 053a 2ea0 0002 2880 0f0d a006
2da0 05a2 2ca0 04c7 2ea0 0435 2ca0 04c7 2e03 a004 2f2c 26a0 0290 2ea0 ffff 2880
080d 26a0 0631 a005 a22e 80d4 30a0 0677 80d0 30af 3835 6161 26a0 0677 ef38 a005
572e a005 3a2e 2f78 616f 80d0 316c a000 70af a000 30a0 052a 2e26 6fa0 0557 2ca0
04c7 2e80 d431 6ca0 04c7 2e80 d430 3880 d431 6c80 d80e 809d 0c80 3e0e 8097 0c80
d430 2180 550e 80ff a004 2f2c 80d4 3021 8048 0ea0 ffff a004 352c 80d4 3080 3b0e
a0ff ffa0 043a 2c14 a004 3e2c 94a0 043e 2e21 9480 f60d 226c 226c a000 a0af a000
30a0 052a 2ea0 0070 efa0 0557 2e80 2fef a005 4d2e efa0 0552 2e6f 6ca0 3677 80d2
3038 af35 6161 26a0 0001 3914 ef15 6194 8026 0980 040d 2180 c00e 26ef a005 572e
a005 3a2e 6f38 a036 7739 2180 d231 6c80 8004 8005 0c80 a080 040e 0480 000e a066
7780 d430 af38 1561 ef80 d431 6f80 d631 6c26 a006 2680 5d0e 8031 0d2f a020 0080
0007 8003 1aa0 05c6 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 6c26 8024 0e80 0b0d a006 29a0 05a2 2ea0 0000 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 2738 24af 8000 6f15 21aa 80f6 0d22 226c 2680 030e 2439
6c94 8000 090c 6c21 9480 fb0d 6c80 f10e 156c 2680 e40e 382f 94ef 1561 2194 80f7
0d22 8000 6f15 6c2f 94d4 4f09 8011 0d94 d44f 1d80 050d 2262 8001 6c21 6180 e80c
2262 8000 6c04 8000 0e06 8004 1f80 000e 800f 1c06 8009 0a80 271a 1880 3018 8018
176c a005 b780 130e 8010 0ea0 2018 1780 090e a00a 1817 6c2d 2d20 0094 8018 1721
9480 f70d 226c 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 4b68 6578 006c 6974 0064 7570 0066 6172 0072 6566 006b 6579
0072 6f6d 0041 7373 656d 626c 6564 2000 7c03 7f24 0387 4003 9326 0399 2e03 9f2c
039f 3b03 ac3a 03ba 2703 c722 03cc 5b03 d85d 03d8 2303 06

Incoming: uxn uxn devlog 2022 oscean