Category : Pascal Source Code
Archive   : WXTERMSR.ZIP
Filename : WXTMDIAL.INC

 
Output of file : WXTMDIAL.INC contained in archive : WXTERMSR.ZIP
{$U-,C-,R-,K-}
Const
MASTER_FILE_NAME = 'WXTERM.MST';
Type
MasterRec = record
mdbits : 7..8;
mparity : parity_set;
mstop_bits : 1..2;
mcom_port : com1..com2;
mspeed : integer;
mjropt : boolean;
end;
Var
msrecord : MasterRec;
msfile : file of MasterRec;

procedure setup;
{initialize most stuff - you may want to replace this routine completely}

begin
with msrecord do
begin
assign(msfile,MASTER_FILE_NAME);
if exists(MASTER_FILE_NAME) then
begin
reset(msfile);
read(msfile, msrecord)
end
else
begin
rewrite(msfile);
mdbits := 7;
mparity := EVEN;
mstop_bits := 1;
mcom_port := com1;
mspeed := DEFAULT_BAUD;
mjropt := false;
write(msfile, msrecord);
flush(msfile);
end;
dbits := mdbits;
parity := mparity;
stop_bits := mstop_bits;
speed := mspeed;
Cport := mcom_port;
pcjrmode := mjropt;
close(msfile);
end;
end;


procedure GetParms;
var
p : string[4];
yy: string[2];
cp: string[5];
begin
writeln('Current Parameters:');
writeln('Baud Rate:',speed:6);
writeln('Data Bits:',dbits:6);
writeln('Stop Bits:',stop_bits:6);
case parity of
even : p := 'EVEN';
none : p := 'NONE';
else p := '????'
end;
writeln('Parity: ',p:6);
if Cport = com1 then cp := 'COM1'
else cp := 'COM2';
writeln('Comm Port: ',cp);
writeln('PcJr Mode: ',pcjrmode);
writeln;
write('Change? (Y/N) ');
readln(p);
if length(p) > 0 then
if upcase(p) = 'Y' then
begin
write('New Baud Rate ( to keep): ');
readln(speed);
write('New Data Bits ( to keep): ');
readln(dbits);
write('New Stop Bits ( to keep): ');
readln(stop_bits);
write('New Parity (E or N or to keep): ');
readln(p);
write('New com port (1 or 2 or to keep: ');
readln(cp);
write('New PcJr mode (Y or N or to keep: ');
readln(yy);
if length(p) > 0 then
case upcase(p) of
'E' : parity := even;
else parity := none;
end;
if length(yy) > 0 then
begin
if upcase(yy) = 'Y' then
pcjrmode := true
else
pcjrmode := false;
end;
if length(cp) > 0 then
begin
remove_port;
if cp = '1' then
Cport := com1;
if cp = '2' then
Cport := com2;
init_port;
term_ready(true);
end;
write('Save changes? (Enter Y if yes): ');
readln(yy);
if length(yy) > 0 then
if upcase(yy) = 'Y' then
begin
with msrecord do
begin
mdbits := dbits;
mparity := parity;
mstop_bits := stop_bits;
mspeed := speed;
mcom_port := Cport;
mjropt := pcjrmode;
reset(msfile);
write(msfile, msrecord);
close(msfile);
end;
end;
end
end;

procedure NewParms;
begin
OpenTemp(15,3,60,23,2);
GetParms;
CloseTemp;
update_uart;
New_Baud(speed)
end;


  3 Responses to “Category : Pascal Source Code
Archive   : WXTERMSR.ZIP
Filename : WXTMDIAL.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/