A reverse engineering challenge: an intricate visual pattern in 39 bytes

The following intricate visual pattern has been generated by a DOS program of 39 bytes size (19 assembly instructions):

Get it: 1.com. Run it under DOSEMU (press Ctrl-Alt-PageDown to exit) or DosBox. This demo/intro run in infinite loop, because it doesn't wait for keypress, to save some bytes...

A slightly tuned version. 57 bytes (29 assembly instructions):

Get it: 2.com.

Now the challenge: try to understand, how it works, and why... the answer will be posted into my blog a month later...

Or try to reduce its size.

My book has another demo of such type. Ctrl-F "Mandelbrot".


Update.

Follow up