Software Tools in Pascal (Part 1 of 6)

sources-request at genrad.UUCP sources-request at genrad.UUCP
Fri Jul 12 22:19:44 AEST 1985


Mod.sources:  Volume 2, Issue 7
Submitted by: ihnp4!mnetor!clewis (Chris Lewis)

#!/bin/sh
echo 'Start of pack.out, part 01 of 06:'
echo 'x - deskcalc.pascal'
sed 's/^X//' > deskcalc.pascal << '/'
X{
X	Copyright (c) 1982
X	By:	Chris Lewis
X
X	Right is hereby granted to freely distribute or duplicate this
X	software, providing distribution or duplication is not for profit
X	or other commerical gain and that this copyright notice remains 
X	intact.
X}
Xprogram DeskCalculator;
X%include swtools
Xconst
X    maxStackIndex = 500;
X    maxRegisterIndex = 500;
Xtype
X    StackIndexType      = 0..maxStackIndex;
X    StackElementType    = Real;
X    RegisterIndexType   = 0..maxRegisterIndex;
Xvar
X    stack: array [StackIndexType] of StackElementType;
X    stackPointer: StackIndexType;
X    registers: array [RegisterIndexType] of StackElementType;
X%page
Xprocedure StackPush(const val: Real);
Xbegin
X    if stackPointer < maxStackIndex then begin
X        stack[stackPointer] := val;
X        stackPointer := Succ(stackPointer)
X    end {then}
X    else
X        Message('Stack overflow, value ignored');
Xend; {StackPush}
X
X
Xprocedure StackPop(var val: Real);
Xbegin
X    if stackPointer > Lowest(StackIndexType) then begin
X        stackPointer := Pred(stackPointer);
X        val := stack[stackPointer]
X    end {then}
X    else begin
X        Message('Stack Underflow, replaced with zero');
X        val := 0
X    end {if};
Xend; {StackPop}
X%page
XProcedure PrintHelp;
Xbegin
X    MPutStr('Desk Calculator HELP:$N$N$N$E', STDOUT);
X    MPutStr('DeskCalc implements a reverse Polish calculator$N' ||
X           '(or RPN) similar to a Hewlett Packard Calculator$N$E',
X           STDOUT);
X    MPutStr('There are the basic operators as well as a stack of$N' ||
X           'up to 500 deep and 500 registers for SAVE/READ$N$N$E',
X           STDOUT);
X    MPutStr('*   Multiply$N$E',STDOUT);
X    MPutStr('/   Divide$N$E', STDOUT);
X    MPutStr('+   Plus$N$E', STDOUT);
X    MPutStr('-   Minus$N$E', STDOUT);
X    MPutStr('%   Modulo (integer)$N$E', STDOUT);
X    MPutStr('_   Unary negate$N$N$E',STDOUT);
X    MPutStr('Other commands, only first letter significant$N$N$E',
X        STDOUT);
X    MPutStr('Print   Print top of stack$N$E',STDOUT);
X    MPutStr('Clear   Clear stack$N$E',STDOUT);
X    MPutStr('Quit    Quit$N$E', STDOUT);
X    MPutStr('Help    Help (you''re reading it)$N$E',STDOUT);
X    MPutStr('Save    Save TOS-1 in register TOS,$N$E' ||
X           '        pops TOS-1 and TOS$N$E', STDOUT);
X    MPutStr('Read    Read register TOS into TOS$N$E', STDOUT);
X    MPutStr('Drop    Pop and ignore top of stack$N$E', STDOUT);
X    MPutStr('Trace   If TOS 0, turn off tracing, else on$N$E', STDOUT);
X    MPutStr('Wap     sWap TOS and TOS-1$N$E', STDOUT);
Xend {PrintHelp};
X%page
Xfunction Calculate(const arg: StringType):Boolean;
X
Xvar
X    val, left, right: StackElementType;
X    temp: String(MAXSTR);
X    outVal: StringType;
X    i,j,k: Integer;
X
Xstatic
X    traceFlag: Boolean;
Xvalue
X    traceFlag := false;
X
X
Xbegin
X    Calculate := true;
X
X    if traceFlag then begin
X        PutDec(stackPointer, 4);
X        PutC(BLANK);
X        PutStr(arg, STDOUT);
X        PutC(NEWLINE);
X    end;
X
X    if arg[1] in [DIG0..DIG9,PERIOD] then begin
X        ReadStr(Str(arg), val);
X        StackPush(val)
X    end
X
X    else begin
X        case arg[1] of
X            STAR, MINUS, PLUS, SLASH, PERCENT: begin
X                StackPop(right);
X                StackPop(left);
X                case arg[1] of
X                    STAR:
X                        left := left * right;
X                    MINUS:
X                        left := left - right;
X                    PLUS:
X                        left := left + right;
X                    SLASH:
X                        left := left / right;
X                    PERCENT:
X                        left := Round(left) mod Round(right)
X                end {case};
X                StackPush(left)
X            end; { Dyadic operators }
X
X            UNDERLINE: begin
X                StackPop(left);
X                StackPush(- left)
X            end {UNDERLINE (unary negate)};
X
X            LETD, BIGD: StackPop(left);
X
X            LETC, BIGC: stackPointer :=
X                            Lowest(StackIndexType);
X
X            LETH, BIGH: PrintHelp;
X
X            LETW, BIGW: begin
X                StackPop(right);
X                StackPop(left);
X                StackPush(right);
X                StackPush(left);
X            end {LETW, BIGW};
X
X            LETQ, BIGQ: Calculate := false;
X
X            LETP, BIGP: begin
X                StackPop(left);
X                StackPush(left);
X                if (left > 1.0e11) or (left < 1.0e-5) then
X                    WriteStr(temp, left:20)
X                else
X                    WriteStr(temp, left:20:10);
X                outVal := temp;
X                outVal[Length(temp) + 1] := ENDSTR;
X                PutStr(outVal, STDOUT);
X                PutC(NEWLINE)
X            end {LETP, BIGP};
X
X            LETT, BIGT: begin
X                StackPop(left);
X                if left = 0 then
X                    traceFlag := false
X                else
X                    traceFlag := true
X            end {LETT, BIGT};
X
X            LETR, BIGR: begin
X                StackPop(right);
X                j := Round(right);
X                if (j >= Lowest(RegisterIndexType)) and
X                  (j <= Highest(RegisterIndexType)) then
X                    StackPush(registers[j])
X                else begin
X                    Message('READ: Bad register number');
X                    StackPush(0.0)
X                end
X            end {LETR, BIGR};
X
X            LETS, BIGS: begin
X                StackPop(right);
X                StackPop(left);
X                j := Round(right);
X                if (j >= Lowest(RegisterIndexType)) and
X                  (j <= Highest(RegisterIndexType)) then
X                    registers[j] := left
X                else
X                    Message('SAVE: Bad register number');
X            end {LETR, BIGR}
X
X            otherwise begin
X                PutCF(NEWLINE, STDERR);
X                PutCF(SQUOTE, STDERR);
X                PutStr(arg, STDERR);
X                Message('''is illegal input.');
X            end {otherwise}
X
X        end {case}
X
X    end {if};
X
Xend {Calculate};
X%page
Xvar
X    lin: StringType;
X    arg: StringType;
X    lineIndex, nextLineIndex: 0..MAXSTR;
X    argNumber: Integer;
X    notDone: Boolean;
X
Xbegin
X    ToolInit;
X    stackPointer := 0;
X    notDone := true;
X    if NArgs> 0 then begin
X        argNumber := 1;
X        while notDone and GetArg(argNumber, lin, MAXSTR) do begin
X        /*  PutDec(argNumber, 1); PutC(BLANK);
X            PutStr(lin, STDOUT);
X            PutC(NEWLINE);  */
X            notDone := Calculate(lin);
X            argNumber := argNumber + 1
X        end {while}
X    end
X    else begin
X        MPutStr('Desk Calculator V0.00 (type H for help)$N$E', STDOUT);
X        while notDone and GetLine(lin, STDIN, MAXSTR) do begin
X            lineIndex := 1;
X            nextLineIndex := GetWord(lin, lineIndex, arg);
X            while notDone and (nextLineIndex > 0) do begin
X                notDone := Calculate(arg);
X                lineIndex := nextLineIndex;
X                nextLineIndex := GetWord(lin, lineIndex, arg)
X            end {while}
X        end {while}
X    end {if}
Xend.
/
echo 'x - fontinit.B'
sed 's/^X//' > fontinit.B << '/'
X{'d'}
X        '0000000000000000'B,'0000000000000000'B,'0000000000000000'B,
X        '0000000000000000'B,'0000000000000000'B,'0000000000000000'B,
X        '0000000000000000'B,'0000000000000000'B,'0000000000000000'B,
X        '0000000000000000'B,'0000000000000000'B,'0000000000000000'B,
X        '0000000000000000'B,'0000000000000000'B,'0000000000000000'B,
X        '0000000000000000'B,'0000000000000000'B,'0000000000000000'B,
X        '0000000000000000'B,'0000000000000000'B,'0001111111000000'B,
X        '0000000000000000'B,'0001111110000000'B,'0001111111100000'B,
X        '0000000000000000'B,'0001111111000000'B,'0000110001100000'B,
X        '0001111100000000'B,'0000100011000000'B,'0000110001100000'B,
X        '0000100010000000'B,'0000100011000000'B,'0000110001100000'B,
X        '0000100010000000'B,'0000100011000000'B,'0000110001100000'B,
X        '0000100010000000'B,'0001111111000000'B,'0001111111100000'B,
X        '0001111100000000'B,'0001111110000000'B,'0001111111000000'B,
X{'e'}
X        '0000000000000000'B,'0000000000000000'B,'0000000000000000'B,
X        '0000000000000000'B,'0000000000000000'B,'0000000000000000'B,
X        '0000000000000000'B,'0000000000000000'B,'0000000000000000'B,
X        '0000000000000000'B,'0000000000000000'B,'0000000000000000'B,
X        '0000000000000000'B,'0000000000000000'B,'0000000000000000'B,
X        '0000000000000000'B,'0000000000000000'B,'0000000000000000'B,
X        '0000000000000000'B,'0000000000000000'B,'0001111111100000'B,
X        '0000000000000000'B,'0001111111000000'B,'0001111111100000'B,
X        '0000000000000000'B,'0001111111000000'B,'0001100000000000'B,
X        '0001111110000000'B,'0001100000000000'B,'0001111110000000'B,
X        '0001000000000000'B,'0001111100000000'B,'0001111110000000'B,
X        '0001111000000000'B,'0001100000000000'B,'0001100000000000'B,
X        '0001000000000000'B,'0001111111000000'B,'0001111111100000'B,
X        '0001111110000000'B,'0001111111000000'B,'0001111111100000'B,
X{'f'}
X        '0000000000000000'B,'0000000000000000'B,'0000000000000000'B,
X        '0000000000000000'B,'0000000000000000'B,'0000000000000000'B,
X        '0000000000000000'B,'0000000000000000'B,'0000000000000000'B,
X        '0000000000000000'B,'0000000000000000'B,'0000000000000000'B,
X        '0000000000000000'B,'0000000000000000'B,'0000000000000000'B,
X        '0000000000000000'B,'0000000000000000'B,'0000000000000000'B,
X        '0000000000000000'B,'0000000000000000'B,'0001111111100000'B,
X        '0000000000000000'B,'0001111111000000'B,'0001111111100000'B,
X        '0000000000000000'B,'0001111111000000'B,'0001100000000000'B,
X        '0001111110000000'B,'0001100000000000'B,'0001111110000000'B,
X        '0001000000000000'B,'0001111100000000'B,'0001111110000000'B,
X        '0001111000000000'B,'0001100000000000'B,'0001100000000000'B,
X        '0001000000000000'B,'0001100000000000'B,'0001100000000000'B,
X        '0001000000000000'B,'0001100000000000'B,'0001100000000000'B,
X%PAGE
X{'g'}
X        '0000000000000000'B,'0000000000000000'B,'0000000000000000'B,
X        '0000000000000000'B,'0000000000000000'B,'0000000000000000'B,
X        '0000000000000000'B,'0000000000000000'B,'0000000000000000'B,
X        '0000000000000000'B,'0000000000000000'B,'0000000000000000'B,
X        '0000000000000000'B,'0000000000000000'B,'0000000000000000'B,
X        '0000000000000000'B,'0000000000000000'B,'0000000000000000'B,
X        '0000000000000000'B,'0000000000000000'B,'0000111111000000'B,
X        '0000000000000000'B,'0000111110000000'B,'0001111111100000'B,
X        '0000000000000000'B,'0001111111000000'B,'0001100001100000'B,
X        '0000111110000000'B,'0001100000000000'B,'0001100000000000'B,
X        '0001000000000000'B,'0001101111000000'B,'0001100111100000'B,
X        '0001001110000000'B,'0001100011000000'B,'0001100001100000'B,
X        '0001000010000000'B,'0001111111000000'B,'0001111111100000'B,
X        '0000111100000000'B,'0000111110000000'B,'0000111111000000'B,
X{'h'}
X        '0000000000000000'B,'0000000000000000'B,'0000000000000000'B,
X        '0000000000000000'B,'0000000000000000'B,'0000000000000000'B,
X        '0000000000000000'B,'0000000000000000'B,'0000000000000000'B,
X        '0000000000000000'B,'0000000000000000'B,'0000000000000000'B,
X        '0000000000000000'B,'0000000000000000'B,'0000000000000000'B,
X        '0000000000000000'B,'0000000000000000'B,'0000000000000000'B,
X        '0000000000000000'B,'0000000000000000'B,'0001100001100000'B,
X        '0000000000000000'B,'0001100011000000'B,'0001100001100000'B,
X        '0000000000000000'B,'0001100011000000'B,'0001100001100000'B,
X        '0001000100000000'B,'0001100011000000'B,'0001111111100000'B,
X        '0001000100000000'B,'0001111111000000'B,'0001111111100000'B,
X        '0001111100000000'B,'0001100011000000'B,'0001100001100000'B,
X        '0001000100000000'B,'0001100011000000'B,'0001100001100000'B,
X        '0001000100000000'B,'0001100011000000'B,'0001100001100000'B,
X{'i'}
X        '0000000000000000'B,'0000000000000000'B,'0000000000000000'B,
X        '0000000000000000'B,'0000000000000000'B,'0000000000000000'B,
X        '0000000000000000'B,'0000000000000000'B,'0000000000000000'B,
X        '0000000000000000'B,'0000000000000000'B,'0000000000000000'B,
X        '0000000000000000'B,'0000000000000000'B,'0000000000000000'B,
X        '0000000000000000'B,'0000000000000000'B,'0000000000000000'B,
X        '0000000000000000'B,'0000000000000000'B,'0001111110000000'B,
X        '0000000000000000'B,'0001111110000000'B,'0001111110000000'B,
X        '0000000000000000'B,'0001111110000000'B,'0000011000000000'B,
X        '0001110000000000'B,'0000011000000000'B,'0000011000000000'B,
X        '0000100000000000'B,'0000011000000000'B,'0000011000000000'B,
X        '0000100000000000'B,'0000011000000000'B,'0000011000000000'B,
X        '0000100000000000'B,'0001111110000000'B,'0001111110000000'B,
X        '0001110000000000'B,'0001111110000000'B,'0001111110000000'B,
X%PAGE
X{'j'}
X        '0000000000000000'B,'0000000000000000'B,'0000000000000000'B,
X        '0000000000000000'B,'0000000000000000'B,'0000000000000000'B,
X        '0000000000000000'B,'0000000000000000'B,'0000000000000000'B,
X        '0000000000000000'B,'0000000000000000'B,'0000000000000000'B,
X        '0000000000000000'B,'0000000000000000'B,'0000000000000000'B,
X        '0000000000000000'B,'0000000000000000'B,'0000111111110000'B,
X        '0000000000000000'B,'0000000000000000'B,'0000111111110000'B,
X        '0000000000000000'B,'0000011111100000'B,'0000000110000000'B,
X        '0000000000000000'B,'0000000110000000'B,'0000000110000000'B,
X        '0000011100000000'B,'0000000110000000'B,'0000000110000000'B,
X        '0000001000000000'B,'0000000110000000'B,'0000000110000000'B,
X        '0000001000000000'B,'0001100110000000'B,'0001100110000000'B,
X        '0001001000000000'B,'0001100110000000'B,'0001100110000000'B,
X        '0000110000000000'B,'0000111100000000'B,'0000111100000000'B,
X{'k'}
X        '0000000000000000'B,'0000000000000000'B,'0000000000000000'B,
X        '0000000000000000'B,'0000000000000000'B,'0000000000000000'B,
X        '0000000000000000'B,'0000000000000000'B,'0000000000000000'B,
X        '0000000000000000'B,'0000000000000000'B,'0000000000000000'B,
X        '0000000000000000'B,'0000000000000000'B,'0000000000000000'B,
X        '0000000000000000'B,'0000000000000000'B,'0000000000000000'B,
X        '0000000000000000'B,'0000000000000000'B,'0001100011000000'B,
X        '0000000000000000'B,'0001100011000000'B,'0001100110000000'B,
X        '0000000000000000'B,'0001100110000000'B,'0001101100000000'B,
X        '0001001000000000'B,'0001101100000000'B,'0001111000000000'B,
X        '0001010000000000'B,'0001111000000000'B,'0001111000000000'B,
X        '0001100000000000'B,'0001101100000000'B,'0001101100000000'B,
X        '0001010000000000'B,'0001100110000000'B,'0001100110000000'B,
X        '0001001000000000'B,'0001100011000000'B,'0001100011000000'B,
X{'l'}
X        '0000000000000000'B,'0000000000000000'B,'0000000000000000'B,
X        '0000000000000000'B,'0000000000000000'B,'0000000000000000'B,
X        '0000000000000000'B,'0000000000000000'B,'0000000000000000'B,
X        '0000000000000000'B,'0000000000000000'B,'0000000000000000'B,
X        '0000000000000000'B,'0000000000000000'B,'0000000000000000'B,
X        '0000000000000000'B,'0000000000000000'B,'0000000000000000'B,
X        '0000000000000000'B,'0000000000000000'B,'0001100000000000'B,
X        '0000000000000000'B,'0001100000000000'B,'0001100000000000'B,
X        '0000000000000000'B,'0001100000000000'B,'0001100000000000'B,
X        '0001000000000000'B,'0001100000000000'B,'0001100000000000'B,
X        '0001000000000000'B,'0001100000000000'B,'0001100000000000'B,
X        '0001000000000000'B,'0001100000000000'B,'0001100000000000'B,
X        '0001000000000000'B,'0001111111000000'B,'0001111111000000'B,
X        '0001111000000000'B,'0001111111000000'B,'0001111111000000'B,
X%PAGE
X{'m'}
X        '0000000000000000'B,'0000000000000000'B,'0000000000000000'B,
X        '0000000000000000'B,'0000000000000000'B,'0000000000000000'B,
X        '0000000000000000'B,'0000000000000000'B,'0000000000000000'B,
X        '0000000000000000'B,'0000000000000000'B,'0000000000000000'B,
X        '0000000000000000'B,'0000000000000000'B,'0000000000000000'B,
X        '0000000000000000'B,'0000000000000000'B,'0000000000000000'B,
X        '0000000000000000'B,'0000000000000000'B,'0001100000110000'B,
X        '0000000000000000'B,'0001100000110000'B,'0001110001110000'B,
X        '0000000000000000'B,'0001110001110000'B,'0001111011110000'B,
X        '0001100110000000'B,'0001111011110000'B,'0001101110110000'B,
X        '0001011010000000'B,'0001101110110000'B,'0001100100110000'B,
X        '0001000010000000'B,'0001100100110000'B,'0001100000110000'B,
X        '0001000010000000'B,'0001100000110000'B,'0001100000110000'B,
X        '0001000010000000'B,'0001100000110000'B,'0001100000110000'B,
X{'n'}
X        '0000000000000000'B,'0000000000000000'B,'0000000000000000'B,
X        '0000000000000000'B,'0000000000000000'B,'0000000000000000'B,
X        '0000000000000000'B,'0000000000000000'B,'0000000000000000'B,
X        '0000000000000000'B,'0000000000000000'B,'0000000000000000'B,
X        '0000000000000000'B,'0000000000000000'B,'0000000000000000'B,
X        '0000000000000000'B,'0000000000000000'B,'0000000000000000'B,
X        '0000000000000000'B,'0000000000000000'B,'0001100000110000'B,
X        '0000000000000000'B,'0001100001100000'B,'0001110000110000'B,
X        '0000000000000000'B,'0001110001100000'B,'0001111000110000'B,
X        '0001000100000000'B,'0001111001100000'B,'0001101100110000'B,
X        '0001100100000000'B,'0001101101100000'B,'0001100110110000'B,
X        '0001010100000000'B,'0001100111100000'B,'0001100011110000'B,
X        '0001001100000000'B,'0001100011100000'B,'0001100001110000'B,
X        '0001000100000000'B,'0001100001100000'B,'0001100000110000'B,
X{'o'}
X        '0000000000000000'B,'0000000000000000'B,'0000000000000000'B,
X        '0000000000000000'B,'0000000000000000'B,'0000000000000000'B,
X        '0000000000000000'B,'0000000000000000'B,'0000000000000000'B,
X        '0000000000000000'B,'0000000000000000'B,'0000000000000000'B,
X        '0000000000000000'B,'0000000000000000'B,'0000000000000000'B,
X        '0000000000000000'B,'0000000000000000'B,'0000000000000000'B,
X        '0000000000000000'B,'0000000000000000'B,'0000111111000000'B,
X        '0000000000000000'B,'0000111110000000'B,'0001111111100000'B,
X        '0000000000000000'B,'0001111111000000'B,'0001100001100000'B,
X        '0001111100000000'B,'0001100011000000'B,'0001100001100000'B,
X        '0001000100000000'B,'0001100011000000'B,'0001100001100000'B,
X        '0001000100000000'B,'0001100011000000'B,'0001100001100000'B,
X        '0001000100000000'B,'0001111111000000'B,'0001111111100000'B,
X        '0001111100000000'B,'0000111110000000'B,'0000111111000000'B,
X%PAGE
X{'p'}
X        '0000000000000000'B,'0000000000000000'B,'0000000000000000'B,
X        '0000000000000000'B,'0000000000000000'B,'0000000000000000'B,
X        '0000000000000000'B,'0000000000000000'B,'0000000000000000'B,
X        '0000000000000000'B,'0000000000000000'B,'0000000000000000'B,
X        '0000000000000000'B,'0000000000000000'B,'0000000000000000'B,
X        '0000000000000000'B,'0000000000000000'B,'0000000000000000'B,
X        '0000000000000000'B,'0000000000000000'B,'0001111111000000'B,
X        '0000000000000000'B,'0001111110000000'B,'0001111111100000'B,
X        '0000000000000000'B,'0001111111000000'B,'0001100001100000'B,
X        '0001111000000000'B,'0001100011000000'B,'0001111111100000'B,
X        '0001000100000000'B,'0001111110000000'B,'0001111111000000'B,
X        '0001111000000000'B,'0001100000000000'B,'0001100000000000'B,
X        '0001000000000000'B,'0001100000000000'B,'0001100000000000'B,
X        '0001000000000000'B,'0001100000000000'B,'0001100000000000'B,
X{'q'}
X        '0000000000000000'B,'0000000000000000'B,'0000000000000000'B,
X        '0000000000000000'B,'0000000000000000'B,'0000000000000000'B,
X        '0000000000000000'B,'0000000000000000'B,'0000000000000000'B,
X        '0000000000000000'B,'0000000000000000'B,'0000000000000000'B,
X        '0000000000000000'B,'0000000000000000'B,'0000000000000000'B,
X        '0000000000000000'B,'0000000000000000'B,'0000000000000000'B,
X        '0000000000000000'B,'0000000000000000'B,'0000111111000000'B,
X        '0000000000000000'B,'0000111110000000'B,'0001111111100000'B,
X        '0000000000000000'B,'0001100011000000'B,'0001100001100000'B,
X        '0000111100000000'B,'0001100011000000'B,'0001100001100000'B,
X        '0001000010000000'B,'0001101011000000'B,'0001101101100000'B,
X        '0001001010000000'B,'0001100111000000'B,'0001100111000000'B,
X        '0001000100000000'B,'0001100010000000'B,'0001111111000000'B,
X        '0000111010000000'B,'0000111101000000'B,'0000111101100000'B,
X{'r'}
X        '0000000000000000'B,'0000000000000000'B,'0000000000000000'B,
X        '0000000000000000'B,'0000000000000000'B,'0000000000000000'B,
X        '0000000000000000'B,'0000000000000000'B,'0000000000000000'B,
X        '0000000000000000'B,'0000000000000000'B,'0000000000000000'B,
X        '0000000000000000'B,'0000000000000000'B,'0000000000000000'B,
X        '0000000000000000'B,'0000000000000000'B,'0000000000000000'B,
X        '0000000000000000'B,'0000000000000000'B,'0001111111000000'B,
X        '0000000000000000'B,'0001111110000000'B,'0001111111100000'B,
X        '0000000000000000'B,'0001111111000000'B,'0001100001100000'B,
X        '0001111000000000'B,'0001100011000000'B,'0001111111100000'B,
X        '0001000100000000'B,'0001111110000000'B,'0001111111000000'B,
X        '0001111000000000'B,'0001101100000000'B,'0001100110000000'B,
X        '0001001000000000'B,'0001100110000000'B,'0001100011000000'B,
X        '0001000100000000'B,'0001100011000000'B,'0001100001100000'B,
X%PAGE
X{'s'}
X        '0000000000000000'B,'0000000000000000'B,'0000000000000000'B,
X        '0000000000000000'B,'0000000000000000'B,'0000000000000000'B,
X        '0000000000000000'B,'0000000000000000'B,'0000000000000000'B,
X        '0000000000000000'B,'0000000000000000'B,'0000000000000000'B,
X        '0000000000000000'B,'0000000000000000'B,'0000000000000000'B,
X        '0000000000000000'B,'0000000000000000'B,'0000000000000000'B,
X        '0000000000000000'B,'0000000000000000'B,'0000111111000000'B,
X        '0000000000000000'B,'0000111111000000'B,'0001111111100000'B,
X        '0000000000000000'B,'0001100001100000'B,'0001100000100000'B,
X        '0001111100000000'B,'0001100000000000'B,'0000111100000000'B,
X        '0001000000000000'B,'0000111111000000'B,'0000001111000000'B,
X        '0001111100000000'B,'0000000001100000'B,'0001000001100000'B,
X        '0000000100000000'B,'0001100001100000'B,'0001111111100000'B,
X        '0001111100000000'B,'0000111111000000'B,'0000111111000000'B,
X{'t'}
X        '0000000000000000'B,'0000000000000000'B,'0000000000000000'B,
X        '0000000000000000'B,'0000000000000000'B,'0000000000000000'B,
X        '0000000000000000'B,'0000000000000000'B,'0000000000000000'B,
X        '0000000000000000'B,'0000000000000000'B,'0000000000000000'B,
X        '0000000000000000'B,'0000000000000000'B,'0000000000000000'B,
X        '0000000000000000'B,'0000000000000000'B,'0000000000000000'B,
X        '0000000000000000'B,'0000000000000000'B,'0001111111100000'B,
X        '0000000000000000'B,'0001111111100000'B,'0001111111100000'B,
X        '0000000000000000'B,'0001111111100000'B,'0000001100000000'B,
X        '0001111100000000'B,'0000001100000000'B,'0000001100000000'B,
X        '0000010000000000'B,'0000001100000000'B,'0000001100000000'B,
X        '0000010000000000'B,'0000001100000000'B,'0000001100000000'B,
X        '0000010000000000'B,'0000001100000000'B,'0000001100000000'B,
X        '0000010000000000'B,'0000001100000000'B,'0000001100000000'B,
X{'u'}
X        '0000000000000000'B,'0000000000000000'B,'0000000000000000'B,
X        '0000000000000000'B,'0000000000000000'B,'0000000000000000'B,
X        '0000000000000000'B,'0000000000000000'B,'0000000000000000'B,
X        '0000000000000000'B,'0000000000000000'B,'0000000000000000'B,
X        '0000000000000000'B,'0000000000000000'B,'0000000000000000'B,
X        '0000000000000000'B,'0000000000000000'B,'0000000000000000'B,
X        '0000000000000000'B,'0000000000000000'B,'0001100001100000'B,
X        '0000000000000000'B,'0001100001100000'B,'0001100001100000'B,
X        '0000000000000000'B,'0001100001100000'B,'0001100001100000'B,
X        '0001000100000000'B,'0001100001100000'B,'0001100001100000'B,
X        '0001000100000000'B,'0001100001100000'B,'0001100001100000'B,
X        '0001000100000000'B,'0001100001100000'B,'0001100001100000'B,
X        '0001000100000000'B,'0001111111100000'B,'0001111111100000'B,
X        '0000111000000000'B,'0000111111000000'B,'0000111111000000'B,
X%PAGE
X{'v'}
X        '0000000000000000'B,'0000000000000000'B,'0000000000000000'B,
X        '0000000000000000'B,'0000000000000000'B,'0000000000000000'B,
X        '0000000000000000'B,'0000000000000000'B,'0000000000000000'B,
X        '0000000000000000'B,'0000000000000000'B,'0000000000000000'B,
X        '0000000000000000'B,'0000000000000000'B,'0000000000000000'B,
X        '0000000000000000'B,'0000000000000000'B,'0000000000000000'B,
X        '0000000000000000'B,'0000000000000000'B,'0001100000011000'B,
X        '0000000000000000'B,'0001100001100000'B,'0001100000011000'B,
X        '0000000000000000'B,'0001100001100000'B,'0001100000011000'B,
X        '0001000100000000'B,'0001100001100000'B,'0001100000011000'B,
X        '0001000100000000'B,'0001100001100000'B,'0000110000110000'B,
X        '0001000100000000'B,'0000110011000000'B,'0000011001100000'B,
X        '0000101000000000'B,'0000011110000000'B,'0000001111000000'B,
X        '0000010000000000'B,'0000001100000000'B,'0000000110000000'B,
X{'w'}
X        '0000000000000000'B,'0000000000000000'B,'0000000000000000'B,
X        '0000000000000000'B,'0000000000000000'B,'0000000000000000'B,
X        '0000000000000000'B,'0000000000000000'B,'0000000000000000'B,
X        '0000000000000000'B,'0000000000000000'B,'0000000000000000'B,
X        '0000000000000000'B,'0000000000000000'B,'0000000000000000'B,
X        '0000000000000000'B,'0000000000000000'B,'0000000000000000'B,
X        '0000000000000000'B,'0000000000000000'B,'0001100000011000'B,
X        '0000000000000000'B,'0001100000011000'B,'0001100000011000'B,
X        '0000000000000000'B,'0001100000011000'B,'0001100000011000'B,
X        '0001000001000000'B,'0001100000011000'B,'0001100000011000'B,
X        '0001000001000000'B,'0001100000011000'B,'0001100000011000'B,
X        '0001001001000000'B,'0001100110011000'B,'0001100110011000'B,
X        '0000111110000000'B,'0000111111110000'B,'0000111111110000'B,
X        '0000010100000000'B,'0000011001100000'B,'0000011001100000'B,
X{'x'}
X        '0000000000000000'B,'0000000000000000'B,'0000000000000000'B,
X        '0000000000000000'B,'0000000000000000'B,'0000000000000000'B,
X        '0000000000000000'B,'0000000000000000'B,'0000000000000000'B,
X        '0000000000000000'B,'0000000000000000'B,'0000000000000000'B,
X        '0000000000000000'B,'0000000000000000'B,'0000000000000000'B,
X        '0000000000000000'B,'0000000000000000'B,'0000000000000000'B,
X        '0000000000000000'B,'0000000000000000'B,'0001100000110000'B,
X        '0000000000000000'B,'0001100001100000'B,'0000110001100000'B,
X        '0000000000000000'B,'0000110011000000'B,'0000011011000000'B,
X        '0001000100000000'B,'0000011110000000'B,'0000001110000000'B,
X        '0000101000000000'B,'0000001100000000'B,'0000001110000000'B,
X        '0000010000000000'B,'0000011110000000'B,'0000011011000000'B,
X        '0000101000000000'B,'0000110011000000'B,'0000110001100000'B,
X        '0001000100000000'B,'0001100001100000'B,'0001100000110000'B,
X%PAGE
X{'y'}
X        '0000000000000000'B,'0000000000000000'B,'0000000000000000'B,
X        '0000000000000000'B,'0000000000000000'B,'0000000000000000'B,
X        '0000000000000000'B,'0000000000000000'B,'0000000000000000'B,
X        '0000000000000000'B,'0000000000000000'B,'0000000000000000'B,
X        '0000000000000000'B,'0000000000000000'B,'0000000000000000'B,
X        '0000000000000000'B,'0000000000000000'B,'0000000000000000'B,
X        '0000000000000000'B,'0000000000000000'B,'0001100000011000'B,
X        '0000000000000000'B,'0001100000011000'B,'0000110000110000'B,
X        '0000000000000000'B,'0000110000110000'B,'0000011001100000'B,
X        '0001000100000000'B,'0000011001100000'B,'0000001111000000'B,
X        '0000101000000000'B,'0000001111000000'B,'0000000110000000'B,
X        '0000010000000000'B,'0000000110000000'B,'0000000110000000'B,
X        '0000010000000000'B,'0000000110000000'B,'0000000110000000'B,
X        '0000010000000000'B,'0000000110000000'B,'0000000110000000'B,
X{'z'}
X        '0000000000000000'B,'0000000000000000'B,'0000000000000000'B,
X        '0000000000000000'B,'0000000000000000'B,'0000000000000000'B,
X        '0000000000000000'B,'0000000000000000'B,'0000000000000000'B,
X        '0000000000000000'B,'0000000000000000'B,'0000000000000000'B,
X        '0000000000000000'B,'0000000000000000'B,'0000000000000000'B,
X        '0000000000000000'B,'0000000000000000'B,'0000000000000000'B,
X        '0000000000000000'B,'0000000000000000'B,'0001111111000000'B,
X        '0000000000000000'B,'0001111110000000'B,'0001111111000000'B,
X        '0000000000000000'B,'0001111110000000'B,'0000000110000000'B,
X        '0001111100000000'B,'0000001100000000'B,'0000001100000000'B,
X        '0000001000000000'B,'0000011000000000'B,'0000011000000000'B,
X        '0000010000000000'B,'0000110000000000'B,'0000110000000000'B,
X        '0000100000000000'B,'0001111110000000'B,'0001111111000000'B,
X        '0001111100000000'B,'0001111110000000'B,'0001111111000000'B,
X%PAGE
X{'0'}
X        '0000000000000000'B,'0000000000000000'B,'0000011111111100'B,
X        '0000000000000000'B,'0000000000000000'B,'0000111111111110'B,
X        '0000000000000000'B,'0000111111000000'B,'0001110000000111'B,
X        '0000000000000000'B,'0001111111100000'B,'0001110000000111'B,
X        '0000111111000000'B,'0001100001100000'B,'0001110000000111'B,
X        '0001111111100000'B,'0001100001100000'B,'0001110000000111'B,
X        '0001100001100000'B,'0001100001100000'B,'0001110000000111'B,
X        '0001100001100000'B,'0001100001100000'B,'0001110000000111'B,
X        '0001100001100000'B,'0001100001100000'B,'0001110000000111'B,
X        '0001100001100000'B,'0001100001100000'B,'0001110000000111'B,
X        '0001100001100000'B,'0001100001100000'B,'0001110000000111'B,
X        '0001100001100000'B,'0001100001100000'B,'0001110000000111'B,
X        '0001111111100000'B,'0001111111100000'B,'0000111111111110'B,
X        '0000111111000000'B,'0000111111000000'B,'0000011111111100'B,
X{'1'}
X        '0000000000000000'B,'0000000000000000'B,'0000011100000000'B,
X        '0000000000000000'B,'0000000000000000'B,'0000111100000000'B,
X        '0000000000000000'B,'0000011000000000'B,'0001111100000000'B,
X        '0000000000000000'B,'0000111000000000'B,'0000011100000000'B,
X        '0000011000000000'B,'0001111000000000'B,'0000011100000000'B,
X        '0000111000000000'B,'0000011000000000'B,'0000011100000000'B,
X        '0001111000000000'B,'0000011000000000'B,'0000011100000000'B,
X        '0000011000000000'B,'0000011000000000'B,'0000011100000000'B,
X        '0000011000000000'B,'0000011000000000'B,'0000011100000000'B,
X        '0000011000000000'B,'0000011000000000'B,'0000011100000000'B,
X        '0000011000000000'B,'0000011000000000'B,'0000011100000000'B,
X        '0000011000000000'B,'0000011000000000'B,'0000011100000000'B,
X        '0001111110000000'B,'0001111110000000'B,'0001111111000000'B,
X        '0001111110000000'B,'0001111110000000'B,'0001111111000000'B,
X{'2'}
X        '0000000000000000'B,'0000000000000000'B,'0000011111111100'B,
X        '0000000000000000'B,'0000000000000000'B,'0000111111111110'B,
X        '0000000000000000'B,'0000011111100000'B,'0001110000000111'B,
X        '0000000000000000'B,'0000111111110000'B,'0001110000000111'B,
X        '0000111100000000'B,'0001100000110000'B,'0000000000000111'B,
X        '0001111110000000'B,'0000000000110000'B,'0000000000000111'B,
X        '0001100011000000'B,'0000000001100000'B,'0000000000111110'B,
X        '0000000011000000'B,'0000000011000000'B,'0000000011111000'B,
X        '0000000110000000'B,'0000000110000000'B,'0000001110000000'B,
X        '0000001100000000'B,'0000001100000000'B,'0000011100000000'B,
X        '0000011000000000'B,'0000011000000000'B,'0000111000000000'B,
X        '0000110000000000'B,'0000110000000000'B,'0001110000000000'B,
X        '0001111111000000'B,'0001111111110000'B,'0001111111111111'B,
X        '0001111111000000'B,'0001111111110000'B,'0001111111111111'B,
X%PAGE
X{'3'}
X        '0000000000000000'B,'0000000000000000'B,'0000011111111100'B,
X        '0000000000000000'B,'0000000000000000'B,'0000111111111110'B,
X        '0000000000000000'B,'0000011110000000'B,'0001110000000111'B,
X        '0000000000000000'B,'0000111111000000'B,'0001110000000111'B,
X        '0000011110000000'B,'0001100001100000'B,'0000000000000111'B,
X        '0000111111000000'B,'0000000001100000'B,'0000000000000111'B,
X        '0001100001100000'B,'0000000001100000'B,'0000000011111110'B,
X        '0000000001100000'B,'0000011111000000'B,'0000000011111110'B,
X        '0000011111000000'B,'0000011111000000'B,'0000000000000111'B,
X        '0000011111000000'B,'0000000001100000'B,'0000000000000111'B,
X        '0000000001100000'B,'0000000001100000'B,'0001110000000111'B,
X        '0001100001100000'B,'0001100001100000'B,'0001110000000111'B,
X        '0000111111000000'B,'0000111111000000'B,'0000111111111110'B,
X        '0000011110000000'B,'0000011110000000'B,'0000011111111100'B,
X{'4'}
X        '0000000000000000'B,'0000000000000000'B,'0000000000000100'B,
X        '0000000000000000'B,'0000000000000000'B,'0000000000001100'B,
X        '0000000000000000'B,'0000000001100000'B,'0000000000011100'B,
X        '0000000000000000'B,'0000000011100000'B,'0000000000111100'B,
X        '0000000011000000'B,'0000000111100000'B,'0000000001111100'B,
X        '0000000111000000'B,'0000001101100000'B,'0000000011111100'B,
X        '0000001111000000'B,'0000011001100000'B,'0000000111011100'B,
X        '0000011011000000'B,'0000110001100000'B,'0000001110011100'B,
X        '0000110011000000'B,'0001111111111000'B,'0000011100011100'B,
X        '0001111111110000'B,'0001111111111000'B,'0000111000011100'B,
X        '0001111111110000'B,'0000000001100000'B,'0001111111111111'B,
X        '0000000011000000'B,'0000000001100000'B,'0001111111111111'B,
X        '0000000011000000'B,'0000000001100000'B,'0000000000011100'B,
X        '0000000011000000'B,'0000000001100000'B,'0000000000011100'B,
X{'5'}
X        '0000000000000000'B,'0000000000000000'B,'0001111111111111'B,
X        '0000000000000000'B,'0000000000000000'B,'0001111111111111'B,
X        '0000000000000000'B,'0001111111110000'B,'0001110000000000'B,
X        '0000000000000000'B,'0001111111110000'B,'0001110000000000'B,
X        '0001111111100000'B,'0001100000000000'B,'0001111111111100'B,
X        '0001111111100000'B,'0001100000000000'B,'0001111111111110'B,
X        '0001100000000000'B,'0001111111100000'B,'0000000000000111'B,
X        '0001111111000000'B,'0001111111110000'B,'0000000000000111'B,
X        '0001111111100000'B,'0000000000110000'B,'0000000000000111'B,
X        '0000000001100000'B,'0000000000110000'B,'0000000000000111'B,
X        '0000000001100000'B,'0000000000110000'B,'0001110000000111'B,
X        '0001100001100000'B,'0001100000110000'B,'0001110000000111'B,
X        '0001111111000000'B,'0001111111110000'B,'0000111111111110'B,
X        '0000111110000000'B,'0000111111100000'B,'0000011111111100'B,
X%PAGE
X{'6'}
X        '0000000000000000'B,'0000000000000000'B,'0000011111111100'B,
X        '0000000000000000'B,'0000000000000000'B,'0000111111111110'B,
X        '0000000000000000'B,'0000111111111000'B,'0001110000000111'B,
X        '0000000000000000'B,'0001111111111100'B,'0001110000000111'B,
X        '0000111111000000'B,'0001100000001100'B,'0001110000000000'B,
X        '0001111111100000'B,'0001100000000000'B,'0001110000000000'B,
X        '0001100001100000'B,'0001100000000000'B,'0001111111111100'B,
X        '0001100000000000'B,'0001111111111000'B,'0001111111111110'B,
X        '0001111111000000'B,'0001111111111100'B,'0001110000000111'B,
X        '0001111111100000'B,'0001100000001100'B,'0001110000000111'B,
X        '0001100001100000'B,'0001100000001100'B,'0001110000000111'B,
X        '0001100001100000'B,'0001100000001100'B,'0001110000000111'B,
X        '0001111111100000'B,'0001111111111100'B,'0000111111111110'B,
X        '0000111111000000'B,'0000111111111000'B,'0000011111111100'B,
X{'7'}
X        '0000000000000000'B,'0000000000000000'B,'0001111111111111'B,
X        '0000000000000000'B,'0000000000000000'B,'0001111111111111'B,
X        '0000000000000000'B,'0001111111111100'B,'0000000000000111'B,
X        '0000000000000000'B,'0001111111111100'B,'0000000000001110'B,
X        '0001111111110000'B,'0000000000011000'B,'0000000000011100'B,
X        '0001111111110000'B,'0000000000110000'B,'0000000000111000'B,
X        '0000000001100000'B,'0000000001100000'B,'0000000001110000'B,
X        '0000000011000000'B,'0000000011000000'B,'0000000011100000'B,
X        '0000000110000000'B,'0000000110000000'B,'0000000111000000'B,
X        '0000001100000000'B,'0000001100000000'B,'0000001110000000'B,
X        '0000011000000000'B,'0000011000000000'B,'0000011100000000'B,
X        '0000110000000000'B,'0000110000000000'B,'0000111000000000'B,
X        '0001100000000000'B,'0001100000000000'B,'0001110000000000'B,
X        '0001100000000000'B,'0001100000000000'B,'0001110000000000'B,
X{'8'}
X        '0000000000000000'B,'0000000000000000'B,'0000011111111100'B,
X        '0000000000000000'B,'0000000000000000'B,'0000111111111110'B,
X        '0000000000000000'B,'0000111111111000'B,'0001110000000111'B,
X        '0000000000000000'B,'0001111111111100'B,'0001110000000111'B,
X        '0000111111100000'B,'0001100000001100'B,'0001110000000111'B,
X        '0001111111110000'B,'0001100000001100'B,'0001110000000111'B,
X        '0001100000110000'B,'0001100000001100'B,'0000011111111100'B,
X        '0001100000110000'B,'0000111111111000'B,'0000011111111100'B,
X        '0000111111100000'B,'0000111111111000'B,'0001110000000111'B,
X        '0000111111100000'B,'0001100000001100'B,'0001110000000111'B,
X        '0001100000110000'B,'0001100000001100'B,'0001110000000111'B,
X        '0001100000110000'B,'0001100000001100'B,'0001110000000111'B,
X        '0001111111110000'B,'0001111111111100'B,'0000111111111110'B,
X        '0000111111100000'B,'0000111111111000'B,'0000011111111100'B,
X{'9'}
X        '0000000000000000'B,'0000000000000000'B,'0000011111111100'B,
X        '0000000000000000'B,'0000000000000000'B,'0000111111111110'B,
X        '0000000000000000'B,'0000111111111000'B,'0001110000000111'B,
X        '0000000000000000'B,'0001111111111100'B,'0001110000000111'B,
X        '0000111111100000'B,'0001100000001100'B,'0001110000000111'B,
X        '0001111111110000'B,'0001100000001100'B,'0001110000000111'B,
X        '0001100000110000'B,'0001100000001100'B,'0000111111111111'B,
X        '0001100000110000'B,'0001111111111100'B,'0000011111111111'B,
X        '0001111111110000'B,'0000111111111100'B,'0000000000000111'B,
X        '0000111111110000'B,'0000000000001100'B,'0000000000000111'B,
X        '0000000000110000'B,'0000000000001100'B,'0001110000000111'B,
X        '0001100000110000'B,'0001100000001100'B,'0001110000000111'B,
X        '0001111111110000'B,'0001111111111100'B,'0000111111111110'B,
X        '0000111111100000'B,'0000111111111000'B,'0000011111111100'B,
X%PAGE
X{'.'}
X        '0000000000000000'B,'0000000000000000'B,'0000000000000000'B,
X        '0000000000000000'B,'0000000000000000'B,'0000000000000000'B,
X        '0000000000000000'B,'0000000000000000'B,'0000000000000000'B,
X        '0000000000000000'B,'0000000000000000'B,'0000000000000000'B,
X        '0000000000000000'B,'0000000000000000'B,'0000000000000000'B,
X        '0000000000000000'B,'0000000000000000'B,'0000000000000000'B,
X        '0000000000000000'B,'0000000000000000'B,'0000000000000000'B,
X        '0000000000000000'B,'0000000000000000'B,'0000000000000000'B,
X        '0000000000000000'B,'0000000000000000'B,'0000000000000000'B,
X        '0000000000000000'B,'0000000000000000'B,'0000000000000000'B,
X        '0000000000000000'B,'0000000000000000'B,'0001111110000000'B,
X        '0001111000000000'B,'0001111100000000'B,'0001111110000000'B,
X        '0001111000000000'B,'0001111100000000'B,'0001111110000000'B,
X        '0001111000000000'B,'0001111100000000'B,'0001111110000000'B,
X{':'}
X        '0000000000000000'B,'0000000000000000'B,'0000000000000000'B,
X        '0000000000000000'B,'0000000000000000'B,'0000000000000000'B,
X        '0000000000000000'B,'0000000000000000'B,'0001111110000000'B,
X        '0000000000000000'B,'0000000000000000'B,'0001111110000000'B,
X        '0000000000000000'B,'0000000000000000'B,'0001111110000000'B,
X        '0000000000000000'B,'0000000000000000'B,'0001111110000000'B,
X        '0001111000000000'B,'0001111100000000'B,'0000000000000000'B,
X        '0001111000000000'B,'0001111100000000'B,'0001111110000000'B,
X        '0001111000000000'B,'0001111100000000'B,'0001111110000000'B,
X        '0000000000000000'B,'0000000000000000'B,'0001111110000000'B,
X        '0000000000000000'B,'0000000000000000'B,'0001111110000000'B,
X        '0001111000000000'B,'0001111100000000'B,'0000000000000000'B,
X        '0001111000000000'B,'0001111100000000'B,'0000000000000000'B,
X        '0001111000000000'B,'0001111100000000'B,'0000000000000000'B,
X{'/'}
X        '0000000000000000'B,'0000000000000000'B,'0000000000000000'B,
X        '0000000000000000'B,'0000000000000000'B,'0000000000000000'B,
X        '0000000000000000'B,'0000000011000000'B,'0000000000000000'B,
X        '0000000000000000'B,'0000000011000000'B,'0000000000000111'B,
X        '0000000110000000'B,'0000000110000000'B,'0000000000001110'B,
X        '0000000110000000'B,'0000000110000000'B,'0000000000011100'B,
X        '0000001100000000'B,'0000001100000000'B,'0000000000111000'B,
X        '0000001100000000'B,'0000001100000000'B,'0000000001110000'B,
X        '0000001100000000'B,'0000001100000000'B,'0000000011100000'B,
X        '0000011000000000'B,'0000011000000000'B,'0000000111000000'B,
X        '0000011000000000'B,'0000011000000000'B,'0000001110000000'B,
X        '0000110000000000'B,'0000110000000000'B,'0000011100000000'B,
X        '0001100000000000'B,'0001100000000000'B,'0000111000000000'B,
X        '0001100000000000'B,'0001100000000000'B,'0001110000000000'B,
X%PAGE
X{'$'}
X        '0000000000000000'B,'0000000000000000'B,'0000001111110000'B,
X        '0000000000000000'B,'0000000000000000'B,'0000111111111110'B,
X        '0000000000000000'B,'0000000110000000'B,'0001110011100111'B,
X        '0000000000000000'B,'0000111111110000'B,'0001110011100111'B,
X        '0000001100000000'B,'0001111111111000'B,'0000111011100000'B,
X        '0000111111000000'B,'0001100110011000'B,'0000011111100000'B,
X        '0001101101100000'B,'0001100110000000'B,'0000000111100000'B,
X        '0001101100000000'B,'0001111111110000'B,'0000000011110000'B,
X        '0001111111000000'B,'0000111111111000'B,'0000000011111100'B,
X        '0000111111100000'B,'0000000110011000'B,'0000000011101110'B,
X        '0000001101100000'B,'0001100110011000'B,'0001110011100111'B,
X        '0001101101100000'B,'0001111111111000'B,'0001110011100111'B,
X        '0000111111000000'B,'0000111111110000'B,'0000111111111110'B,
X        '0000001100000000'B,'0000000110000000'B,'0000001111110000'B,
X{'@'}
X        '0000000000000000'B,'0000000000000000'B,'0000011111111100'B,
X        '0000000000000000'B,'0000000000000000'B,'0000111111111110'B,
X        '0000000000000000'B,'0000111111111000'B,'0001110000000111'B,
X        '0000000000000000'B,'0001111111111100'B,'0001110000000111'B,
X        '0000111111100000'B,'0001100000001100'B,'0001110001100111'B,
X        '0001111111110000'B,'0001100011111100'B,'0001110011110111'B,
X        '0001100000110000'B,'0001100110001100'B,'0001110110010111'B,
X        '0001100111110000'B,'0001100110001100'B,'0001110110011110'B,
X        '0001101100110000'B,'0001100111111100'B,'0001110011111100'B,
X        '0001101111110000'B,'0001100011111000'B,'0001110001100000'B,
X        '0001100111100000'B,'0001100000000000'B,'0001110000000000'B,
X        '0001100000010000'B,'0001100000001100'B,'0001110000000001'B,
X        '0001111111110000'B,'0001111111111100'B,'0000111111111110'B);
X%PAGE
X    fontWidth := FontWidthType (
X    06,06,06,   {' '}
X    12,14,16,   {'A'}
X    12,14,16,   {'B'}
X    12,14,16,   {'C'}
X    12,14,16,   {'D'}
X    12,14,16,   {'E'}
X    12,14,16,   {'F'}
X    12,14,16,   {'G'}
X    12,14,16,   {'H'}
X    09,09,16,   {'I'}
X    10,12,16,   {'J'}
X    11,12,16,   {'K'}
X    12,14,16,   {'L'}
X    13,15,16,   {'M'}
X    13,15,16,   {'N'}
X    12,14,16,   {'O'}
X    12,14,16,   {'P'}
X    12,14,16,   {'Q'}
X    12,14,16,   {'R'}
X    12,13,16,   {'S'}
X    13,15,16,   {'T'}
X    12,14,16,   {'U'}
X    13,15,16,   {'V'}
X    12,14,16,   {'W'}
X    14,16,16,   {'X'}
X    15,16,16,   {'Y'}
X    12,14,16,   {'Z'}
X    09,10,11,   {'a'}
X    09,10,11,   {'b'}
X    09,10,11,   {'c'}
X    09,10,11,   {'d'}
X    09,10,11,   {'e'}
X    09,10,11,   {'f'}
X    09,10,11,   {'g'}
X    08,10,11,   {'h'}
X    06,09,09,   {'i'}
X    07,09,09,   {'j'}
X    07,10,10,   {'k'}
X    07,10,10,   {'l'}
X    09,12,12,   {'m'}
X    08,11,12,   {'n'}
X    08,10,11,   {'o'}
X    08,10,11,   {'p'}
X    09,10,11,   {'q'}
X    08,10,11,   {'r'}
X    08,10,11,   {'s'}
X    08,11,11,   {'t'}
X    08,11,11,   {'u'}
X    08,11,13,   {'v'}
X    10,13,13,   {'w'}
X    08,11,12,   {'x'}
X    08,11,13,   {'y'}
X    08,09,10,   {'z'}
X    11,11,16,   {'0'}
X    09,09,16,   {'1'}
X    10,11,16,   {'2'}
X    11,11,16,   {'3'}
X    12,15,16,   {'4'}
X    11,12,16,   {'5'}
X    11,14,16,   {'6'}
X    12,14,16,   {'7'}
X    12,14,16,   {'8'}
X    12,14,16,   {'9'}
X    07,08,16,   {'.'}
X    07,08,16,   {':'}
X    09,10,16,   {'/'}
X    11,13,16,   {'$'}
X    12,14,16    {'@'}
X    );
X{ Initialize font descriptions }
Xprocedure FontInit;
Xbegin
X    CvtSST(' ABCDEFGHIJKLMNOPQRSTUVWXYZ'||
X           'abcdefghijklmnopqrstuvwxyz'||
X           '0123456789.:/$@', transArray);
X    fontFirst[0] := 4;
X    fontFirst[1] := 2;
X    fontFirst[2] := 0;
Xend;
/
echo 'x - hashfind.pascal'
sed 's/^X//' > hashfind.pascal << '/'
X{
X	Copyright (c) 1981
X	By:	Bell Telephone Laboratories, Inc. and
X		Whitesmiths, Ltd.,
X
X	This software is derived from the book
X		"Software Tools In Pascal", by
X		Brian W. Kernighan and P.J. Plauger
X		Addison-Wesley, 1981
X		ISBN 0-201-10342-7
X
X	Right is hereby granted to freely distribute or duplicate this
X	software, providing distribution or duplication is not for profit
X	or other commerical gain and that this copyright notice remains 
X	intact.
X}
X{ HashFind -- find name in hash table }
Xsegment HashFind;
X%include swtools
X%include defdef
X%include defref
X%include defproc
Xfunction HashFind;
Xvar
X    p: NDPtr;
X    tempName: StringType;
X    found: Boolean;
Xbegin
X    found := false;
X    p := hashTab[Hash(name)];
X    while (not found) and (p <> nil) do begin
X        CSCopy(NDTable, p->.name, tempName);
X        if (Equal(name, tempName)) then
X            found := true
X        else
X            p := p->.nextPtr
X    end;
X    HashFind := p
Xend;
/
echo 'Part 01 of pack.out complete.'
exit



More information about the Mod.sources mailing list