Category : Modula II Source Code
Archive   : M2TUTOR.ZIP
Filename : PC.MOD

 
Output of file : PC.MOD contained in archive : M2TUTOR.ZIP
MODULE PC;

(* The codes in this program are for an EPSON RX-80. You may have *)
(* to adjust the codes for your printer. *)

FROM InOut IMPORT WriteString, WriteLn, Read, Write;
FROM FileSystem IMPORT Lookup, WriteChar, Close, File;

VAR InputChar, Char0, Char1 : CHAR;
PrintFile : File;

BEGIN
WriteString("F Formfeed"); WriteLn;
WriteString("C/N Compressed/Normal"); WriteLn;
WriteString("D/S DoubleStrike/SingleStrike"); WriteLn;
WriteString("E/R Emphasized/Regular"); WriteLn;
WriteLn;
WriteString("Enter Selection --> ");
Read(InputChar);
Write(InputChar);
InputChar := CAP(InputChar);

(* Character input - now output the code *)

CASE InputChar OF
'F' : Char0 := 14C; (* Formfeed *)
Char1 := 0C; |
'C' : Char0 := 17C; (* Compressed mode *)
Char1 := 0C; |
'N' : Char0 := 22C; (* Normal width *)
Char1 := 0C; |
'D' : Char0 := 33C; (* Double Strike - esc-'G' *)
Char1 := 107C; |
'S' : Char0 := 33C; (* Single Strike - esc-'H' *)
Char1 := 110C; |
'E' : Char0 := 33C; (* Emphasized Print - esc-'E' *)
Char1 := 105C; |
'R' : Char0 := 33C; (* Emphasized Off - esc-'@' *)
Char1 := 100C;
ELSE
WriteString("Invalid Character.");
END;

Lookup(PrintFile,"PRN",TRUE); (* Open print file *)
WriteChar(PrintFile,Char0);
IF Char1 > 0C THEN
WriteChar(PrintFile,Char1);
END;
Close(PrintFile);

END PC.


  3 Responses to “Category : Modula II Source Code
Archive   : M2TUTOR.ZIP
Filename : PC.MOD

  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/