flat assembler
Message board for the users of flat assembler.

Index > DOS > 16 byte demo with graphics and sound

Author
Thread Post new topic Reply to topic
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 20996
Location: In your JS exploiting you and your system
revolution 18 May 2026, 16:58
In the demoscene, exploring what can be achieved within extreme constraints is a rewarding technical challenge. The following 16 bytes of x86 real-mode DOS assembly code represent a careful exercise in algorithmic density. When executed, it utilizes the computer's video memory as a calculation space to draw an infinite Sierpinski fractal, while simultaneously interpreting that geometry as audio data.
I converted it to fasm syntax.
Code:
        int 10h         ; 2 bytes
        mov bh, 0xb8    ; 2 bytes
        mov ds, bx      ; 2 bytes
L:      lodsb           ; 1 byte
        sub si, 57      ; 3 bytes
        xor [si], al    ; 2 bytes
        out 61h, al     ; 2 bytes
        jmp L           ; 2 bytes    
There is also a video of it running.

https://www.youtube.com/watch?v=MvycyU-kLjg
Post 18 May 2026, 16:58
View user's profile Send private message Visit poster's website Reply with quote
Picnic



Joined: 05 May 2007
Posts: 1466
Location: Piraeus, Greece
Picnic 19 May 2026, 09:02
Mind-blowing x86 optimization that's absolute fine art.
This could be an extra track on Moroder's Cat People OST. Smile

_________________
Hobby BASIC Interpreter
Post 19 May 2026, 09:02
View user's profile Send private message Visit poster's website Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 20996
Location: In your JS exploiting you and your system
revolution 19 May 2026, 13:44
I saw the video before reading the write-up, and I wondered if it could be a cheat that called a TSR to do the actual work.

But once I read the code I realised it was real.
Post 19 May 2026, 13:44
View user's profile Send private message Visit poster's website Reply with quote
bitdog2u



Joined: 31 Jan 2023
Posts: 70
bitdog2u 31 May 2026, 15:32
if you want exit code, this works, it adds 5 bytes, to make it 21 bytes total.
Code:
;  jmp L
   in  al,60h
   cmp al,129 ;ESC key released
   jnz L
   ret
    


I couldn't get a Sierpinski fractal out of it.
There was some random TEXT LETTERS on the screen,
but it ran out of letters and went blank in a couple minutes.
I rebooted a few times and wrote some exit code for it.
My mini pc speaker was able to make sound like a bearing running dry.
But I'm running a p4 in DOS.
TINYSIER.COM in the B256.ZIP is a real nice Sierpinski fractal for 55 bytes.
DISRUPT.COM is 14 bytes with exit code, & each key press changes the screen,
plus you don't need to oil your fan, then find out you didn't need to oil your fan.

Hellmood has some great work out there in the wild,
21 are in b256.zip use sstr.com found in dis104.zip in the \ASM\directory
SSTR "by hellmood"
will get you a list of them. Screen Grabber
sg.com will save it to a file
sg afile.txt
Post 31 May 2026, 15:32
View user's profile Send private message Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2026, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.