pouët.net

FPGA by Řrřola [web]

;\   ___  FPGA
; \ /   \ a 32-byte intro by Rrrola <rrrola@gmail.com>
;  \| \_/ greets to everyone who likes spiral octagons
;   +-------------------------------------------------

; This is an older branch of Poprask without the multiplication.
; The blocking shape is a narrow rectangle that gets wider over time.
; The main effect (blinking) is just aliasing.

org 100h
S:mov al,0x13  ; b0 13
  int 10h      ; cd 10
  les bp,[bx]  ; c4 2f | bp=20cd es=~9fff

; Overlapping code:
; 13 cd | adc cx,bp | cf=1, so cx = cx+1
; 10 c4 | adc ah,al
; 2f    | das
  
M:mov bl,16 ; max 16 iters

L mov al,dh ; 45-degree rotation
  add dh,dl
  sub dl,al
  sub dx,cx ; [x, y] -> [x-y + t, y+x + t/256], set cf
  dec bx    ; iters--, set zf
  jnbe L

E lea ax,[bx+0xcd10] ; ah=0xcd, al=10..1f
  stosb
  mul di   ; cf=1 usually
  dec bp   ; dl=x dh=y
  jnz M    ; bp=0
  
  hlt
  jmp S+1  ; jump to overlap