-=> Quoting Frank Topping to All <=-
FT> Does anyone remember the "hello world" in the little blue box that
FT> scrolled off to the left of the screen? ...kinda cute.
FT> ...any chance I could ask for a repost if anyone still has a copy?
I *think* you are referring to the following:
----- Quote
; Text.Asm- simple animation demos a 'Print' macro.
;
cseg segment
assume cs:cseg,ds:cseg
org 100h ; .COM format
Print macro
Local lo1,skip1,Alldone
;;------------------------------------------------------------------
;; Call this macro with video address in BX, source address of text
;; in SI, destination in DI, and (color) attribute in AH.
;;------------------------------------------------------------------
mov es,bx
mov cx,di
cld
lo1: lodsb ;; Load AL with text.
or al,al ;; ASCIIZ- exit on zero.
je Alldone
cmp al,0Dh ;; Look for line feed.
jne skip1
add cx,160d ;; add 160 bytes for line feed to
mov di,cx ;; starting column, next line.
jmp lo1
skip1: stosw ;; Put the word in AX on the screen.
jmp lo1
Alldone:
endm
;------------------------------------------------------------------
Begin:
mov bx,0B800h ; Start of CGA+ video memory.
mov si,offset Msg1 ; Source of our text for Print macro.
mov cx,25 ; Move it 25 places.
mov ah,31h ; Blue on Cyan
call lo2 ; Print, leaving a trail...
mov si,offset Msg2 ; More text, just spaces this time.
mov cx,24 ; Move it 24 places, erase the trail.
mov ah,1eh ; White on black, default DOS colors.
call lo2
int 20h ; Exit to DOS.
;------------------------------------------------------------------
lo2: mov di,80*15*2 ; Start on line 16
lo1: push di
push si
push cx
Print ; Print message.
mov cx,0900h ; Set up a delay otherwise
lo3: in al,4Fh ; movement will be too fast.
loop lo3 ; 4F is an unused port.
pop cx
pop si
pop di
add di,2 ; Move pointer to next cell.
loop lo1
ret
;------------------------------------------------------------------
Msg1 db 218,30 dup (196),191,13
db 179,'Hmmm.. A sliding text window!',179,13
db 192,30 dup (196),217,0
Msg2 db 32,13,32,13,32,0
cseg ends
end Begin
----- Unquote
Peter
... And god said "Windows 95" and the whole world crashed...
--- EBO-BBS Diemen - NL
---------------
* Origin: EBO-BBS Diemen (http://www.worldonline.nl/~biginski) (2:280/901)
|