(* >>>>>>>> KERMIT.TEXT ***********************************************) (*$S+*) (*$I-*) (*$R-*) (*$V-*) PROGRAM kermit; USES kermglob, kermacia, kermutil, kermpack, kermsetshw, sender, receiver, helper, kerminit, parser; PROCEDURE kermterm(BS_to_DEL, Esc_Char, Xon_Char, Xoff_Char : CHAR; Xoff_W_Time : INTEGER; No_Ffeed,Print, Half_Duplex , Reject_Cntrl_Char, Emulate : BOOLEAN); FORWARD; SEGMENT PROCEDURE Connect; VAR Close_Term, Print : BOOLEAN; Ch : CHAR; SSC_pass : PACKED ARRAY[0..1] OF CHAR; PROCEDURE Switch_Printer; BEGIN IF Print_enable THEN BEGIN WRITE('Screendump is '); IF Ch = 'P' THEN BEGIN Print := TRUE; WRITELN('on'); END ELSE BEGIN WRITELN(Pr); WRITELN('off'); Print := FALSE; END; END; END; PROCEDURE Show_List; BEGIN WRITELN; WRITELN(' Show this list.'); WRITELN(' Show all current Kermit parameter settings.'); WRITELN(' Close connection and return to Kermit UCSD command level.'); Write_Ctl( Esc_Char ); WRITELN(' Send escape character itself to the remote host.'); IF ( Acia_implem = A6551 ) OR ( Acia_implem = A6850 ) THEN BEGIN IF Acia_implem = A6551 THEN BEGIN WRITE(' Tell Super Serial Card to pass <^A> to host for '); WRITELN('correct file transfer.'); END; WRITELN(' Send a break signal to the remote host.'); WRITELN(' Hit any key to turn off break signal.'); END; IF Print_enable THEN BEGIN WRITELN; WRITELN('

Screen output also to printer.'); WRITELN(' Turnoff screendump.'); END; END; BEGIN Close_Term := FALSE; Print := FALSE; Ch := ' '; SSC_pass[0] := CHR(1); SSC_pass[1] := 'Z'; PAGE( Output ); WRITE('>Kermterm connecting to host (type '); Write_Ctl(Esc_Char); WRITELN(' to exit)'); UNITCLEAR( Inport ); REPEAT UNITCLEAR( Keyport ); Kermterm(BS_to_DEL, Esc_Char, Xon_Char, Xoff_Char, Xoff_W_Time, No_Ffeed, Print, Half_Duplex, Reject_Cntrl_Char, Emulate ); REPEAT WRITELN; WRITE('>Kermterm (

) =>'); UNITCLEAR( Keyport ); UNITREAD( Keyport, Ch, 1 ); WRITELN; IF Ch IN ['a'..'z'] THEN Ch := CHR( ORD(Ch) - ORD('a') + ORD('A') ); IF Ch IN ['B','C','P','Q','S','Z','?' ] THEN CASE Ch OF 'B' : Send_Break( Acia_Comm_Reg ); 'C' : Close_Term := TRUE; 'P','Q' : Switch_Printer; 'S' : BEGIN Noun := All_Sym; Show_Parms END; 'Z' : UNITWRITE( Outport, SSC_pass, 2,, 12); '?' : Show_List; END; (* of then case *) UNTIL Ch <> '?'; IF Ch = Esc_Char THEN UNITWRITE( Outport, Ch, 1,, 12 ); IF NOT Close_Term THEN WRITELN('Back to host.'); UNTIL Close_Term; WRITELN('Back to Apple Kermit UCSD') END; PROCEDURE Kermterm; EXTERNAL; PROCEDURE closeup; begin check_apple_char( all_sp_char ); page( output ) end; (* closeup *) begin (* main kermit program *) {$N+} {$R kermglob,kermacia,kermutil,kermpack,kermsetshw,parser } initialize; repeat write('Kermit-UCSD> '); read_str(line); case parse of unconfirmed : writeln('Unconfirmed'); parm_expected : writeln('Parameter expected'); ambiguous : writeln('Ambiguous'); unrec : writeln('Unrecognized command'); fn_expected : writeln('File name expected'); pn_expected : writeln('Volume name expected'); ch_expected : writeln('Single character expected'); num_expected : writeln('Number > 0 expected'); null : case verb of consym : connect; phelpsym, helpsym : help; recsym : begin rec_sw( rec_ok ); write( chr(bell) ); gotoxy( 0, prompt_line - 1 ); if not rec_ok then write('Un'); write( 'succesfull receive' ); close( rec_file, lock ); gotoxy( 0, prompt_line ); end; sendsym : begin send_sw( send_ok ); write( chr(bell) ); gotoxy( 0, prompt_line - 1 ); if not send_ok then write('Un'); write('succesfull send'); close( applefile ); gotoxy( 0, prompt_line ); end; setsym : set_parms; dirsym, pdirsym, pshowsym, show_sym : show_parms; end; (* case verb *) end; (* case parse *) until (verb = exitsym) or (verb = quitsym); closeup end. (* kermit *)