Viewing: TESTPS.TXT

% This is a PostScript program that will printout the current
% communications settings of a PostScript printer that supports
% the sccbatch operator.
%
% To use: copy this file to the port connected to the PostScript printer.
%
% Copyright (C) 1991, Microsoft Corp.
%
/buf 10 string def
/Courier findfont 10 scalefont setfont
/Parity [ (None) (Odd) (Even) (None) ] def
/Flow   [ (Xon/Xoff) (Hardware) (Hardware) ] def
statusdict /sccbatch known {
    statusdict begin 25 sccbatch end    % get comm settings

    72 144 moveto                       % print baud rate
    (Baud Rate:) show
    222 144 moveto
    exch buf cvs show

    72 129 moveto                       % print data bits
    (Data Bits:) show
    222 129 moveto
    dup -5 bitshift 3 and               % isolate data bits
    1 eq { (7) } { (8) } ifelse         % translate to string
    show

    72 114 moveto                       % print parity
    (Parity:) show
    222 114 moveto
    dup 3 and                           % isolate parity bits
    Parity exch get                     % look up in string table
    show

    72 99 moveto                        % print stop bits
    (Stop Bits:) show
    222 99 moveto
    dup -7 bitshift                     % isolate stop bits
    1 eq { (2) } { (1) } ifelse         % translate to string
    show

    72 84 moveto                        % print flow control
    (Flow Control:) show
    222 84 moveto
    -2 bitshift 3 and                   % isolate flow control bits
    Flow exch get                       % look up in string table
    show
} {
    72 144 moveto
    (Could not determine printer settings.  If printer is connected) show
    72 129 moveto
    (to a parallel port (LPTx) no configuration is necessary.  If) show
    72 114 moveto
    (printer is connected to a serial port (COMx) find the DOS MODE) show
    72 99 moveto
    (command for this port and use those settings.  This is usually) show
    72 84 moveto
    (found in your autoexec.bat file.) show
} ifelse

{ vmreclaim } stopped pop           % if this is Level 2 printer force
                                    % garbage collection so vmstatus is
                                    % accurate

vmstatus exch sub exch pop          % get maximum - used on TOS

72 174 moveto                       % display maximum VM 
(Max Printer VM (KB):) show
222 174 moveto
dup 1024 div truncate buf cvs show

72 159 moveto
(Max Suggested VM (KB):) show            % display maximum suggested VM (85%)
222 159 moveto
0.85 mul 1024 div truncate buf cvs show

showpage