Rename the tape control program to tapectl

This commit is contained in:
CrazyEttin 2022-08-22 12:55:43 +03:00
parent 6c2f866b01
commit be38167923
2 changed files with 8 additions and 8 deletions

View File

@ -96,8 +96,8 @@ and an emulated punched tape reader and punch with the arguments
-dprinter and -dtape respectively. The printer is mapped to address FFFE -dprinter and -dtape respectively. The printer is mapped to address FFFE
and the tape reader and punch to FFFD. The printer prints into and the tape reader and punch to FFFD. The printer prints into
/dev/usb/lp0 and the tape files read from and punched to are (re)set /dev/usb/lp0 and the tape files read from and punched to are (re)set
using the program tape. If you wish to use a different setup you have to using the program tapectl. If you wish to use a different setup you have
modify the code yourself. to modify the code yourself.
Initial Program Loader Initial Program Loader
---------------------- ----------------------

View File

@ -1,4 +1,4 @@
program Tape; program TapeCtl;
{$MODE OBJFPC} {$MODE OBJFPC}
@ -6,22 +6,22 @@ uses SysUtils;
type type
//Tape file path and reset state //Tape file path and reset state
TapeState = record Tape = record
Path: shortstring; Path: shortstring;
Reset: boolean; Reset: boolean;
Pos: integer; Pos: integer;
end; end;
var var
Reader, Punch: TapeState; //States of the reader and punch Reader, Punch: Tape; //States of the reader and punch
State: file of TapeState; //File storing the states of the reader and punch State: file of Tape; //File storing the states of the reader and punch
DoRead, DoPunch: boolean; //Whether to reset the reader or the punch DoRead, DoPunch: boolean; //Whether to reset the reader or the punch
begin begin
//Check whether to set the reader, the punch, or both //Check whether to set the reader, the punch, or both
if ParamCount <> 1 then begin if ParamCount <> 1 then begin
writeln ('Usage: tape reader/punch/both'); writeln ('Usage: tapectl reader/punch/both');
halt; halt;
end; end;
if ParamStr (1) = 'reader' then begin if ParamStr (1) = 'reader' then begin
@ -37,7 +37,7 @@ begin
DoPunch := true; DoPunch := true;
end end
else begin else begin
writeln ('Usage: tape reader/punch/both'); writeln ('Usage: tapectl reader/punch/both');
halt; halt;
end; end;