TIP: Click on subject to list as thread! ANSI
echo: 80xxx
to: FRANK TOPPING
from: JAMES VAHN
date: 1997-02-16 09:53:00
subject: Hello examples

 FT> Does anyone remember the "hello world" in the little blue
 FT> box that  scrolled off to the left of the screen?  ...kinda
 FT> cute.
Maybe this?  By yours truely, as an exercise in macros.
I remember a VGA scroll in one of the 80XXX files, umm 1994?    
Called scrolly.asm if I recollect.
;-------------------------------------------------------------------
; 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,0B000h            ; 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,07h               ; 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.
        ;out 4Fh,al
        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
--- timEd 1.01
---------------
* Origin: James Vahn (jvahn@short.circuit.com) (1:346/15.1)

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™.