;; Marquee ;; CS 312 ;; A W Smyth INCLUDE USEFUL.INC INCLUDE PCMAC.INC INCLUDE VIDEO.INC .MODEL SMALL .STACK 100h .DATA Space1 DB 90 dup (32) Msg DB "This is just a very long string of mostly garbage text that's only here because he insisted on a LONG message." Space2 DB 80 dup (32) EndMsg DB 32 .CODE Put80Chars PROC ; Print out 80 characters mov si, bx mov cx, 80 cmp bp, 1 je P8CLoop add si, 80 P8CLoop: mov al, [si] _PutCh al add si, bp loop P8CLoop ret Put80Chars ENDP Main PROC mov ax, @data mov ds, ax _CLS mov bp, 1 mov bx, OFFSET Space1 ; Init bx to the start While1: mov ah, 01h int 16h ; Check for a keypress jnz Out1 ; Exit if key pressed _Locate 11,0 ; Put the cursor where it should be call Put80Chars EndPrint: inc bx ; Next character cmp bx, OFFSET Space2 ; Are we out of the Msg? je Out2 jmp While1 Out2: mov bx, OFFSET Space1 neg bp jmp While1 Out1: mov ah, 00h ; Clear that character int 16h ; from the KB buffer _CLS mov al, 0 ; Return code of 0 mov ah, 4ch ; Exit back to DOS int 21h Main ENDP END Main