home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.barnyard.co.uk
/
2015.02.ftp.barnyard.co.uk.tar
/
ftp.barnyard.co.uk
/
cpm
/
walnut-creek-CDROM
/
CPM
/
TURBOPAS
/
PRINT120.LBR
/
CONFIG1.PQS
/
CONFIG1.PAS
Wrap
Pascal/Delphi Source File
|
2000-06-30
|
5KB
|
175 lines
{ CONFIG1.PAS for PRINT version 1.20 }
{ for GEMINI-10x printer }
procedure INIT_PRINT;
var
i : integer;
begin
{ The following line is the PRINTER INITIALIZATION SEQUENCE}
{ In this sequence, the initial PAGE OFFSET is set }
write(lst,chr($0D),chr(27),'@',chr(27)+'M'+chr(8));
for i := 1 to 26 do
Def_Status[i] := off;
Def_Status[14] := on;
{**********************************************************}
TwoLine_Ctrl := 'XR'; {Printer controls that require
two lines of printing }
Page_Offset := 8; {Also set in INIT_PRINT above}
Line_Spacing := 8; {init at 8/48 inch LF}
{ BE SURE TO SET THE PAGE_OFFSET (LEFT MARGIN) AND THE LINE
SPACING COMMANDS IN DOTCMD.PAS ! }
{**********************************************************}
for i := 1 to length(TwoLine_Ctrl) do
TwoLine_Ctrl[i] := chr(ord(TwoLine_Ctrl[i]) - $40);
end;
procedure UNINIT_PRINT;
begin
write(lst,chr($0D),chr(27),'@');
end;
procedure Ctrl_Printer(funct : integer; state : boolean; var flag : FlagBank);
var
key : char;
begin
case funct of
1 : if state then { ^A - Elite print (12CPI) }
begin
write(lst,chr(27)+'B'+chr(2));
flag[1] := on;
flag[14] := off;
flag[25] := off;
end;
2 : begin { ^B - Boldface }
if state then
write(lst,chr(27)+'E')
else
write(lst,chr(27)+'F');
flag[2] := state;
end;
3 : begin { ^C - print pause }
GotoXY(1,20);
write('Press Y to abandon print, any key to continue');
read(kbd,key);
if upcase(key) = 'Y' then
begin
close(Infile);
UnInit_Print;
halt;
end;
DelLine;
end;
4 : begin { ^D - Double Strike }
if state then
write(lst,chr(27)+'G')
else
write(lst,chr(27)+'H');
flag[4] := state;
end;
5 : begin { ^E - graphics }
if state then
write(lst,chr(27)+'>')
else
write(lst,chr(27)+'#');
flag[5] := state;
end;
8 : write(lst,chr(8)); { ^H - BackSpace }
9 : write(lst,chr(9)); { ^I - Tab }
10 : begin { ^J - Line Feed }
write(lst,chr(10));
Line_Num := Line_Num + 1;
GotoXY(Line_Num_X, Line_Num_Y);
write(Line_Num:3);
end;
13 : write(lst,chr(13)); { ^M - carriage return }
14 : if state then { ^N - pica print (10CPI) }
begin
write(lst,chr(27)+'B'+chr(1));
flag[1] := off;
flag[14] := on;
flag[25] := off;
end;
17 : begin { ^Q - italics }
if state then
write(lst,chr(27)+'4')
else
write(lst,chr(27)+'5');
flag[17] := state;
end;
18 : begin { ^R - download Char set }
if state then
write(lst,chr(27)+'$'+chr(1))
else
write(lst,chr(27)+'$'+chr(0));
end;
19 : if state then { ^S - underline }
write(lst,chr(27) + '-' + chr(1))
else
write(lst,chr(27) + '-' + chr(0));
20 : begin { ^T - superscript }
if state then
write(lst,chr(27)+'S'+chr(0))
else
write(lst,chr(27)+'T');
flag[20] := state;
end;
uniprt : begin { ^U - unidirectional print }
if state then
write(lst,chr(27)+'U'+chr(1))
else
write(lst,chr(27)+'U'+chr(0));
flag[21] := state;
end;
22 : begin { ^V - subscript }
if state then
write(lst,chr(27)+'S'+chr(1))
else
write(lst,chr(27)+'T');
flag[22] := state;
end;
23 : begin { ^W - WIDE print }
if state then
write(lst,chr(27)+'W'+chr(1))
else
write(lst,chr(27)+'W'+chr(0));
flag[23] := state;
end;
25 : if state then { ^Y - compressed print }
begin
write(lst,chr(27)+'B'+chr(3));
flag[1] := off;
flag[14] := off;
flag[25] := on;
end;
end; {*case*}
end;