| TIP: Click on subject to list as thread! | ANSI |
| echo: | |
|---|---|
| to: | |
| from: | |
| date: | |
| subject: | scroller |
Hello all,
Here is a simple scroller I found. I don't know how it works, but tried to
make it as readable as possible. A86 can handle it.
===cut===
;scrollr.asm
.Radix 16
Org 100h
Mov Al,13h
Int 10h ;CRT:BIOS Video Services
Mov Bp,0100h
Cli
L0: Mov Dx,03dah
L1: In Al,Dx ;CGA adapter; XT & AT;
; video subsystem PS/2
Test Al,08
Je L1
Mov Ax,0a000h
Mov Es,Ax
Mov Ds,Ax
Mov Cl,09
Mov Bx,6402h
L2: Push Cx
Mov Si,Bx
Add Si,04
Mov Di,Bx
Mov Cl,9fh
Rep Movsw
Add Bx,0500h
Pop Cx
Loop L2
Xor Si,Si
Mov Es,Word Ptr Cs:D2 ;
L3: Mov Bx,0fa6eh
Add Bx,Bp
Mov Al,Byte Ptr Es:[Bx+Si]
And Al,Byte Ptr Cs:D1
Je L5
Mov Bx,653fh
Xor Di,Di
L4: Add Bx,0500h
Inc Di
Cmp Si,Di
Jge L4
Mov Cx,Si
Add Cl,19h
Mov Byte Ptr [Bx],Cl
L5: Inc Si
Cmp Si,08
Jne L3
Push Cs
Pop Ds
Ror Byte Ptr Ds:D1,1
Cmp Byte Ptr Ds:D1,80h
Jne L8
L6: Inc Word Ptr Ds:D3
Mov Si,Word Ptr Ds:D3
Mov Al,Byte Ptr Ds:text[Si]
Cmp Al,00 ;end of text?
Jne L7
Xor Word Ptr Ds:D3,Si
Jmp Short L6
L7: Mov Bl,08
Mul Bl
Mov Bp,Ax
L8: In Al,60h ;AT & PS/2=keyboard
Cmp Al,01 ;is ESC pressed?
Je L9 ; yes
Jmp Near Ptr L0 ; no
L9: Sti
Mov Ax,0003h ;mode 3
Int 10h ;CRT:BIOS Video Services
Mov Ah,4ch ;DOS:terminate program
Int 21h
;-----------------------------------------------------
D1 Db 80
D2 Dw 0f000
D3 Dw 00
text Db ' Hello Folks......'
Db 'Lots more text......'
Db 'Well,...See Ya! '
Db 00 ;end of text marker
===cut===
Kind regards, Barry
--- Terminate 4.00/Pro
---------------
* 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™.