X: lds si,[bx+si]
add al,0xad
out 61h,al
jmp short X+1422 karma · joined September 8, 2018
X: lds si,[bx+si]
add al,0xad
out 61h,al
jmp short X+1the blank code for everbody who can read it ^^ you can paste it to http://twt86.co/ to run in a browser
org 100h
mov al,0x13
les bp,[bx]
int 0x10
X: sub dh,95
mov al,[bp+si]
add dl,al
imul al
sub dh,ah
mov bx,dx
mov al,bh
imul al
xchg ax,dx
imul al
add dx,ax
mov ch,7
imul ax,di,byte 102
sub ch,dh
jle F
mov al,bl
cbw
idiv ch
add al,[bp+si]
xor al,bh
and al,16
mov al,31
jnz F
add al,9
F: stosb
mov ax,0xCCCC
mul di
adc byte [bp+si],cl
jmp short Xhttps://www.pouet.net/prod.php?which=96105
https://2025.meteoriks.org/laureates/#nominees-ota
Features:
- Multithreading (using all CPU cores & hyper-threads)
- Full HD / HiColor (1920x1080 / 16 bpp)
- 128-iterative fractal on FPU
- Pure DOS (no drivers, no DPMI)https://www.pouet.net/prod.php?which=106205
Related to the Dragon Fractal, with a twist:)
Of course it's not the same, but "flying through a 3D grayscale orthogonal structure" is actually possible in 64
Sometimes, content to size ratio wins. Other times, not so much ;)
Actually, just a few days ago, i had the chance to run a modified CGA 8086 version of this on a real old piece of hardware https://youtu.be/XLrjChvJf0k
In hundreds of tiny experiments, this one stuck out, just by the sound of it. When i unfolded what's left and removed "the rest" i had a hard time to grasp what's really going on. i myself didnt expect that the explanation would go this deep for just these few bytes xD
https://www.pouet.net/prod.php?which=106206 https://www.youtube.com/watch?v=OVk-iP93ZEs
Video: https://youtu.be/MvycyU-kLjg | Pouet: https://www.pouet.net/prod.php?which=106210
The 16-Byte Code:
int 10h ; Init Video Mode 0
mov bh, 0xb8 ; Setup VRAM segment
mov ds, bx
L: lodsb ; Load [SI] to AL, inc SI
sub si, 57 ; Move pointer backward
xor [si], al ; Cellular Automaton
out 61h, al ; PC Speaker output
jmp short L ; Infinite loop
1. The Canvas: `int 10h` primes the 40x25 text grid uniformly with ASCII 0x20 and color 0x07. This stable, uniform void is necessary to prevent the cellular automaton from shattering into static.2. The Fractal (Rule 60): If this loop used `add`, it would create a binomial prefix sum:
A^(p)[k] = 2 \* C(k+p, p-1) mod 256
But substituting `add` with `xor` discards the arithmetic carry, isolating the bit-planes. This turns the math into a pure cellular automaton mapping to Wolfram's Rule 60: Cell^(p)[k] = Cell^(p-1)[k] XOR Cell^(p)[k-1]
Visualizing Bit 1 propagation over 5 passes (X = set): P1: X X X X X X X X
P2: . X . X . X . X
P3: X . . X X . . X
P4: . . . X . . . X
P5: X X X . . . . X
P6: . X . . . . . X
P7: X . . . . . . X
3. The Audio: Port `61h` uses Bit 1 to physically move the PC speaker cone. The Sierpinski geometry acts directly as a square-wave audio instruction: alternating bits (like P2) yield high frequencies, while sparse rows (P4) create rhythmic rests.4. The -56 Byte Step: The pointer's net movement is -56 bytes per loop. - Visuals: On an 80-byte wide grid, this offset shears the fractal diagonally into 10 evenly spaced, ascending vertical pillars. - Audio: 56 does not divide the 64KB segment evenly, requiring 8,192 steps (7 full wraps) to complete a cycle. Doubling the macro-cycle halves the fundamental frequency, dropping the audio exactly one octave.
5. Hardware Quirks: The theoretical math expects zeroed memory, but the XOR operation violently collides with the BIOS's 0x20/0x07 initialization. This mutates the pure triangles into a cascade of pseudo-random ASCII glyphs. Because it relies entirely on raw RAM states, the visual and auditory output is highly sensitive to the specific machine or emulator, turning a simple mathematical quirk into a unique audiovisual fingerprint.
and yes, your observations are spot on.
i'm thinking of making that interactive, remove (a bit of) sound and plot timing (which takes surprisingly many bytes!)
but i won't spoil anything until it's ready ;)
the source is right there ;)
https://www.pouet.net/prod.php?which=63538
But most people wouldn't find that visually satisfying
The technical details why this works are very interesting though :)
The "silent" version is only 219 bytes
A new version that adds new features into
the remaining bytes is in the works
For all lovers of 256Bb intros (and 128,64 and so on) there is a curated "best of" selection maintained by Demosceners : https://nanogems.demozoo.org/#256_byte_intros "A mind is born" is of course included there =)