TIP: Click on subject to list as thread! ANSI
echo: 80xxx
to: ALL
from: BARRY BLOCK
date: 1997-05-20 19:12:00
subject: implode (cls)

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)

SOURCE: echomail via exec-pc

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.