Home
Admin | Edit

Memph32 - DOS 32 bytes

link

A follow-up of Archismall on DOS (16 bits, Intel 80186+), the idea goes back to HyperSpace and even earlier Linux procedural gfx, it was shown at Lovebyte 2025.

This program size category is challenging, it is easy to do something that looks like raw noise / void at this size... tried anyway with the main goal of getting away from noise as much as possible.

The first step was to port a simplified variant (skewed) of the Archismall algorithm, couldn't get a pretty version down to 32 bytes unfortunately (~35 bytes), the raw algorithm looks best at square resolution (not the case of VGA Mode 13) or require scaling / alignment / overdraw which i was not satisfied with. May still be achievable with tricks.

After some iterations i got a flattened version down to as low as 29 bytes, it was ok but was a tad boring, i kept iterating and stumbled upon the final version, single byte instructions helped a lot to spice things up, result has a bit of layout so that it looks like a composition. (also hide the res. issue :P)

The result reminds me of 80s / 90s graphics design especially Memphis ones due to the colors / tone and the few recognizable shapes plus XOR "compositing".


glitchy early port ~35 bytes, note the res. issue (overflowing) and too wide stepping

The 32b compo is always quite amazing for all the diversity peoples can pack at this size, in high end category i especially liked Lensical as it is a well done implementation of a classic "plasma" effect for this size, also liked the ones with sound / glitching such as Assault or Triphony, some effects were offshoot of previous years. (Fractured was great !)

the boring version ~30b (not taking up all the screen space !)

x86 code

bits 16

org 100h

mov al,13h
l:
  ; skewed HAKMEM 149 with a twist (adc, sbb)
  mov bp,dx
  sar bp,1
  adc cx,bp
  sub dx,cx
  sbb cx,ax

  pusha
  ; downscale
  shr cx,8
  shr dx,9
  ; "compo"
  xor dh,al

  int 10h
  popa
  mov ah,0x0c
  aas ; affect colors
  loop l
inc ax ; affect colors and "compo"
jmp short l

back to topLicence Creative Commons