Declare Function MatchCount Lib "WSPRTERM.DLL" (ByVal attrStr$, ByVal colorStr$, ByVal attr$, ByVal Color$, ByVal maxLen%) As Integer
Declare Function IsCharUpper Lib "User" (ByVal cChar As Integer) As Integer
Declare Function GetBkColor Lib "GDI" (ByVal hDC As Integer) As Long
Declare Function SetBkColor Lib "GDI" (ByVal hDC As Integer, ByVal crColor As Long) As Long
Declare Function GetSysColor Lib "User" (ByVal nIndex As Integer) As Long
Declare Function SetBkMode Lib "GDI" (ByVal hDC As Integer, ByVal nBkMode As Integer) As Integer
Declare Function GetTextColor Lib "GDI" (ByVal hDC As Integer) As Long
Declare Function SetTextColor Lib "GDI" (ByVal hDC As Integer, ByVal crColor As Long) As Long
Declare Function GetProfileString Lib "Kernel" (ByVal lpAppName$, ByVal lpKeyName As Any, ByVal lpDefault$, ByVal lpReturnedString$, ByVal nSize%) As Integer
Declare Function WriteProfileString Lib "Kernel" (ByVal lpApplicationName$, ByVal lpKeyName$, ByVal lpString$) As Integer
Declare Function SndPlaySound Lib "MMSYSTEM.DLL" (ByVal lpszSoundName As Any, ByVal wFlags%) As Integer
Const SND_SYNC = &H0
Const SND_ASYNC = &H1
Const SND_NODEFAULT = &H2
Const SND_LOOP = &H8
Const SND_NOSTOP = &H10
Declare Sub ScrollWindow Lib "User" (ByVal hWnd As Integer, ByVal XAmount As Integer, ByVal YAmount As Integer, lpRect As RECT, lpClipRect As RECT)
Declare Function ScrollDC Lib "User" (ByVal hDC As Integer, ByVal dx As Integer, ByVal dy As Integer, lprcScroll As RECT, lprcClip As RECT, ByVal hRgnUpdate As Integer, lprcUpdate As RECT) As Integer
Dim lprcScroll As RECT
Dim liveClip As RECT
Dim fullClip As RECT
Dim hRgnUpdate As Integer
Dim lprcUpdate As RECT
Dim rollCnt As Integer
Dim scrollLR As Integer
Dim windowWidth As Integer
Dim lastWindowState As Integer
Dim mouseDwnX As Integer
Dim mouseDwnY As Integer
Dim mouseUpX As Integer
Dim mouseUpY As Integer
Dim dataEnd As Integer
Dim dataIndex As Integer
Static Sub BldScrn (Dta$)
' This routine parses the incoming data stream.
' Most codes received are for a Datapoint 735x terminal type. I have
' left most of them in to demonstrate what functions are used for the