Hello all, I saw a shareware implode screen (cls) using way to many bytes,
so I tried to see what I could do. This is a first, maybe last draft :-)
One problem is, a single timer tick is too long.
What else can I use as a timer so that the speed is the same on all machines?
===cut===
;Implode.com v1 - Barry Block 5-97 - assemble w/A86
;slowly fills a mode3 screen with space characters, black on black (CLS)
mode3 equ 0B800h
srn_end equ 0BFD0h
space_on_black equ 0720h
first_pass equ 512
mov ax,mode3
mov es,ax ;screen seg.
mov dx,first_pass ;hold data for di increments
L1: xor di,di
mov ax,dx
shr ax,1
mov dx,ax
cmp ax,1 ;di must be even
ja L2
xor ax,ax
L2: add di,ax
cmp di,srn_end
ja L3
push ax
mov ax,space_on_black
stosw
pop ax
call delay
jmp short L2
L3: cmp ax,0
ja L1
mov ax,4c00h
int 21h
delay: ;Loop DX times 4
mov cx,dx
shl cx,1
shl cx,1
L3: loop L3
ret
===cut===
Kind regards, Barry
---------------
* Origin: EBO-BBS A'dam +31-20-6002828 (2:280/901.42)
|