home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Frostbyte's 1980s DOS Shareware Collection
/
floppyshareware.zip
/
floppyshareware
/
USCX
/
TURBO-06.ZIP
/
SENDASCI.INC
< prev
next >
Wrap
Text File
|
1985-02-23
|
2KB
|
85 lines
PROCEDURE send_asc;
VAR a:CHAR;
infile:TEXT;
file_name:STRING[20];
ok,go_back:BOOLEAN;
BEGIN
xcoord:=WHEREX;
go_back:=FALSE;
ycoord:=WHEREY;
MOVE(screen1,screen2,4000);
NORMVIDEO;
LOWVIDEO;
WINDOW(1,1,80,21);
NORMVIDEO;
TEXTCOLOR(cyan);
frame(14, 5,36,11);
LOWVIDEO;
WINDOW(15,6,35,10);
REPEAT
CLRSCR;
GOTOXY(1,1);
TEXTCOLOR(white);
WRITELN(' Send File (Ascii)');
beep;
TEXTCOLOR(7);
WRITELN;
WRITELN(' Enter File Name ');WRITE(' > ');
READLN(file_name);
IF LENGTH(file_name) > 0 THEN
BEGIN
ASSIGN(infile, file_name);
{$I-} RESET(infile) {$i+};
ok:=(IORESULT=0);
END ELSE
BEGIN
go_back:=TRUE;
ok:=TRUE;
END;
IF NOT ok THEN WRITELN('File Not found');
DELAY(2000);
UNTIL ok;
IF NOT go_back THEN
BEGIN
NORMVIDEO;
MOVE(screen2,screen1,4000);
LOWVIDEO;
WINDOW(1,1,80,21);
GOTOXY(1,1);
INSLINE;
TEXTCOLOR(white+blink);
WRITE(CHR(16):35);
TEXTCOLOR(7);
WRITE(' SEND FILE ');
TEXTCOLOR(white+blink);
WRITELN(CHR(17));
NORMVIDEO;
LOWVIDEO;
WINDOW(1,2,80,21);
CLRSCR;
GOTOXY(1,21);
TEXTCOLOR(maincolor);
REPEAT
READ(infile,a);
WRITE(a);
write_byte(a);
UNTIL EOF(infile);
WRITELN;WRITELN;WRITELN('DONE.');
DELAY(2000);beep;beep;
END;
NORMVIDEO;
MOVE(screen2,screen1,4000);
LOWVIDEO;
WINDOW(1,1,80,21);
TEXTCOLOR(maincolor);
GOTOXY(xcoord,ycoord);
END;
E(screen2,screen1,4000);
LOWVIDEO;
WINDOW(1,1,80,21);
TEXTCOLOR(maincolor);