bits 16
org 100h
+start:
; call video bios (10h) to set video mode (call 00h), to mode
; 13h (320x200 8bpp).
mov ax, 13h ; call number in ah (0), call argument in al (13h)
-; Lowest yet: 312
+; Lowest yet: 277
bits 16
%ifdef BOOTSECT
%macro WAIT_VBLANK 0
mov dx, 3dah
-.inblank:
- in al, dx
- and al, 8
- jnz .inblank ; loop while vblank bit is 1 (in vblank)
.notblank:
in al, dx
and al, 8
; - bg color (0)
; - shadow color (1)
; - fractal color (2)
- mov dx, 0x3c8
- xor al, al
- out dx, al
- inc dx
- mov al, 10 ; 0: 40, 40, 80
- out dx, al
- out dx, al
- shl al, 1
- out dx, al
- mov al, 4 ; 1: 16, 16, 32
- out dx, al
- out dx, al
- shl al, 1
- out dx, al
- mov al, 18h ; 2: 96, 192, 96
- out dx, al
- mov al, 48
- out dx, al
- mov al, 18h
- out dx, al
+
mainloop:
call animate
; clear the framebuffer
- xor al, al
+ mov al, 128
mov cx, 64000
xor di, di
rep stosb
; draw shadow
mov si, 5
- mov byte [setcol + 1], 1 ; shadow color
+ mov byte [setcol + 1], 199 ; shadow color
call drawsierp
; draw fractal
xor si, si