-; Lowest yet: 270
+; Lowest yet: 265
bits 16
%ifdef BOOTSECT
SIERP_PT equ code_end
RANDVAL equ code_end + 4
+SIERP_VERTS equ code_end + 8
%macro WAIT_VBLANK 0
mov di, sierp_verts
mov si, sierp_vel
.loop:
- mov ebx, 2
+ mov bx, 4
.xyloop:
mov ax, [di] ; grab vertex X
add ax, [si] ; add velocity X
jl .xout
- cmp ax, [ebx * 2 + bounds - 2]
+ cmp ax, [bx + bounds - 2]
jge .xout
jmp .skip_xflip
.xout:
; to do the same for Y increment edi and esi by 2
add di, 2
add si, 2
- dec bx
+ sub bx, 2
jnz .xyloop
dec cx