Category : Communication (modem) tools and utilities
Archive   : ASPHST.ZIP
Filename : ASCIIXF.INC

 
Output of file : ASCIIXF.INC contained in archive : ASPHST.ZIP
;**************************************************************************
;* *
;* ASCIIXF.ASP (C) 1992 DATASTORM TECHNOLOGIES, INC. *
;* *
;* An ASPECT header file containing procedures facilitating ASCII file *
;* transfers in the 2.0x scripted host mode. *
;* *
;**************************************************************************

proc GetAscii
strparm FName
integer Elt,LinesOut, CharIn = 0
integer RCount = 0, AEcho, Lastline
string Timein

LastLine = $SCRNROWS - 1 ; Calculate last line -
; (depends upon video mode)
fetch ASCII ECHO AEcho ; get ascii echo
time Timein 0 ; set timein
clear CNorm ; clear screen
fopen 0 FName "WT" ; create file
if FAILURE ; problem?
return ; return
endif

if AnsiOn ; If Ansi sequences on
transmit ClrStr ; send out clear screen
endif

Call HostPuts with "`r`nBegin Your ASCII Transfer Procedure (CTRL-X aborts)`r`n"
Call HostPuts with "`r`n`r`n(Press twice to end)`r`n"

set KEYS ON ; Set keys on
set RXDATA ON ; Set rxdata on
LinesOut = 1 ; set LinesOut to 1

statmsg "DOWNLOAD IN PROGRESS - PRESS ESC TO END"

while 1 ; loop forever
comgetc CharIn ; Check Port
if CharIn < 0 ; No Char?
call Elapsed with &Elt TimeIn $TIME0 ; Check for Elapsed Time Since
; Last Char Received
inc Elt ; Add 1 to Elapsed Time
; Prevents having 0 Elapsed
if Elt > ATimeout ;
exitwhile ; If Elapsed > ASCII Timout
endif ; Head on out
endif

if HITKEY ; HitKey?
keyget N9 ; What Key?
if N9 == 0x1B ; ESC - Headout
exitwhile
endif
endif

if CharIn > -1 ; Char at Port?
time TimeIn 0 ; Reset Time

if CharIn != 26 ; Disregard LineFeed & EOF
fputc 0 CharIn ; Write Char to File
if CharIn==13 ; Is Char a ?
fputc 0 10 ; Write LF to File
if AEcho ; Display?
message $NULL
endif
LinesOut++ ; Inc Lines Written
RCount++ ; Inc check
fatsay LastLine 2 14 "Line: %d" LinesOut ; Display Line Count
else
RCount=0 ; Not ?
if AEcho
termwrt CharIn ; Reset Count
endif
endif ; Write Char
endif

if RCount==2 ; If 2 CR's
exitwhile ; Move 'em out
endif
endif
fatsay LastLine 67 14 "Timeout: %d" elt ; Display Timeout Count
endwhile ; loop
fclose 0 ; close file
call HostPutS with "**** TRANSFER COMPLETE ****"
call SetSuccess ; set success
call FlushIt ; call flush_it
clear
set STATLINE ON ; turn status line back on
endproc


  3 Responses to “Category : Communication (modem) tools and utilities
Archive   : ASPHST.ZIP
Filename : ASCIIXF.INC

  1. Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!

  2. This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.

  3. But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/