
PROCEDURE Top_Horz ;
VAR
   TX1, TX2   : Integer ;
   TY1, TY2   : Integer ;
BEGIN
   Line_Color( 3 );
   Line( DX+4,DY+1,DX+27,DY+1 );
   Line( DX+3,DY+2,DX+27,DY+2 );
   Line( DX+2,DY+3,DX+27,DY+3 );
   TX1 := DX+1 ; TX2 := DX+27 ;
   Line( TX1,DY+4,TX2,DY+4 );
   Line( TX1,DY+5,TX2,DY+5 );
   Line( TX1,DY+6,TX2,DY+6 );
   Line( TX1,DY+7,TX2,DY+7 );
   Line_Color( 2 );
   Line( DX,DY+4,DX+4,DY );
   Line( DX+4,DY,DX+28,DY );
   Line_To( DX+28,DY+8 );
   Line_To( DX,DY+8 );
   Line_To( DX,DY+5 );
   Line_Color( 1 );
   Line( DX,DY+3,DX+3,DY );
   Line( DX+29,DY+1,DX+29,DY+7 );
END ; { Top_Horz }

PROCEDURE Mid_Horz ;
BEGIN
   Line_Color( 3 );
   Line( DX+9,DY+32,DX+29,DY+32 );
   Line( DX+8,DY+33,DX+30,DY+33 );
   Line( DX+7,DY+34,DX+31,DY+34 );
   Line( DX+6,DY+35,DX+32,DY+35 );
   Line( DX+7,DY+36,DX+31,DY+36 );
   Line( DX+8,DY+37,DX+30,DY+37 );
   Line( DX+9,DY+38,DX+29,DY+38 );
   Line_Color( 2 );
   Line( DX+5,DY+35,DX+9,DY+31 );
   Line_To( DX+29,DY+31 );
   Line_To( DX+33,DY+35 );
   Line_To( DX+29,DY+39 );
   Line_To( DX+9,DY+39 );
   Line_To( DX+5,DY+35 );
   Line_Color( 1 );
   Line( DX+8,DY+39,DX+4,DY+35 );
   Line_To( DX+8,DY+31 );
   Line( DX+30,DY+31,DX+34,DY+35 );
   Line_To( DX+30,DY+39 );
END ; { Mid_Horz }

PROCEDURE Bot_Horz ;
VAR
   TX1, TX2   : Integer ;
BEGIN
   Line_Color( 3 );
   TX1 := DX+1 ; TX2 := DX+27 ;
   Line( TX1,DY+63,TX2,DY+63 );
   Line( TX1,DY+64,TX2,DY+64 );
   Line( TX1,DY+65,TX2,DY+65 );
   Line( TX1,DY+66,TX2,DY+66 );
   Line( DX+2,DY+67,TX2,DY+67 );
   Line( DX+3,DY+68,TX2,DY+68 );
   Line( DX+4,DY+69,TX2,DY+69 );
   Line_Color( 2 );
   Line( DX,DY+62,DX+28,DY+62 );
   Line_To( DX+28,DY+70 );
   Line_To( DX+4,DY+70 );
   Line_To( DX,DY+66 );
   Line_To( DX,DY+62 );
   Line_Color( 1 );
   Line( DX,DY+67,DX+3,DY+70 );
   Line( DX+29,DY+63,DX+29,DY+69 );
END ; { Bot_Horz }

PROCEDURE Left_Top ;
VAR
   TY1, TY2   : Integer ;
BEGIN
   Line_Color( 3 );
   TY1 := DY+11 ; TY2 := DY+33 ;
   Line( DX+1,TY1,DX+1,TY2 );
   Line( DX+2,TY1,DX+2,TY2 );
   Line( DX+3,TY1,DX+3,TY2 );
   Line( DX+4,TY1,DX+4,DY+32 );
   Line( DX+5,TY1,DX+5,DY+31 );
   Line( DX+6,TY1,DX+6,DY+30 );
   Line( DX+7,TY1,DX+7,DY+29 );
   Line_Color( 2 );
   Line( DX,DY+33,DX,DY+10 );
   Line_To( DX+8,DY+10 );
   Line_To( DX+8,DY+29 );
   Line_To( DX+3,DY+34 );
   Line_To( DX+1,DY+34 );
   Line_Color( 1 );
   Line( DX+8,DY+30,DX+3,DY+35 );
   Line_To( DX+1,DY+35 );
   Line_To( DX,DY+34 );
   Line( DX+1,DY+9,DX+7,DY+9 );
END ; { Left_Top }

PROCEDURE Left_Bot ;
VAR
   TY1, TY2   : Integer ;
BEGIN
   Line_Color( 3 );
   TY1 := DY+37 ; TY2 := DY+59 ;
   Line( DX+1,TY1,DX+1,TY2 );
   Line( DX+2,TY1,DX+2,TY2 );
   Line( DX+3,TY1,DX+3,TY2 );
   Line( DX+4,DY+38,DX+4,TY2 );
   Line( DX+5,DY+39,DX+5,TY2 );
   Line( DX+6,DY+40,DX+6,TY2 );
   Line( DX+7,DY+41,DX+7,TY2 );
   Line_Color( 2 );
   Line( DX,DY+37,DX,DY+60 );
   Line_To( DX+8,DY+60 );
   Line_To( DX+8,DY+41 );
   Line_To( DX+3,DY+36 );
   Line_To( DX+1,DY+36 );
   Line_Color( 1 );
   Line( DX+8,DY+40,DX+3,DY+35 );
   Line_To( DX+1,DY+35 );
   Line_To( DX,DY+36 );
   Line( DX+1,DY+61,DX+7,DY+61 );
END ; { Left_Bot }

PROCEDURE Right_Top ;
VAR
   TY1, TY2   : Integer ;
BEGIN
   Line_Color( 3 );
   TY1 := DY+1 ; TY2 := DY+33 ;
   Line( DX+31,TY1,DX+31,DY+29 );
   Line( DX+32,TY1,DX+32,DY+30 );
   Line( DX+33,TY1,DX+33,DY+31 );
   Line( DX+34,TY1,DX+34,DY+32 );
   Line( DX+35,DY+2,DX+35,TY2 );
   Line( DX+36,DY+3,DX+36,TY2 );
   Line( DX+37,DY+4,DX+37,TY2 );
   Line_Color( 2 );
   Line( DX+38,DY+33,DX+38,DY+4 );
   Line_To( DX+34,DY );
   Line_To( DX+30,DY );
   Line_To( DX+30,DY+29 );
   Line_To( DX+35,DY+34 );
   Line_To( DX+37,DY+34 );
   Line_Color( 1 );
   Line( DX+30,DY+30,DX+35,DY+35 );
   Line_To( DX+37,DY+35 );
   Line_To( DX+38,DY+34 );
   Line( DX+35,DY,DX+38,DY+3 );
END ; { Right_Top }


PROCEDURE Right_Bot ;
VAR
   TY1, TY2   : Integer ;
BEGIN
   Line_Color( 3 );
   TY1 := DY+37 ; TY2 := DY+69 ;
   Line( DX+31,DY+41,DX+31,TY2 );
   Line( DX+32,DY+40,DX+32,TY2 );
   Line( DX+33,DY+39,DX+33,TY2 );
   Line( DX+34,DY+38,DX+34,TY2 );
   Line( DX+35,TY1,DX+35,DY+68 );
   Line( DX+36,TY1,DX+36,DY+67 );
   Line( DX+37,TY1,DX+37,DY+66 );
   Line_Color( 2 );
   Line( DX+38,DY+37,DX+38,DY+66 );
   Line_To( DX+34,DY+70 );
   Line_To( DX+30,DY+70 );
   Line_To( DX+30,DY+41 );
   Line_To( DX+35,DY+36 );
   Line_To( DX+37,DY+36 );
   Line_Color( 1 );
   Line( DX+30,DY+40,DX+35,DY+35 );
   Line_To( DX+37,DY+35 );
   Line_To( DX+38,DY+36 );
   Line( DX+35,DY+70,DX+38,DY+67 );
END ; { Right_Bot }

PROCEDURE D_Hr_10 ;
BEGIN
   Paint_Color( 0 );
   Paint_Rect( 17,35,10,72 );
   DX := -12 ;
   IF Hr_10 = 1 THEN
   BEGIN
      Right_Top ;
      Right_Bot ;
   END;
END; { of D_Hr_10 }

PROCEDURE D_Mon_10 ;
BEGIN
   Paint_Color( 0 );
   Paint_Rect( 17,35,10,72 );
   DX := -12 ;
   IF Mon_10 = 1 THEN
   BEGIN
      Right_Top ;
      Right_Bot ;
   END;
END; { of D_Mon_10 }

PROCEDURE D_Digit ( Digit : Integer );
BEGIN
   Paint_Color( 0 );
   Paint_Rect( DX,DY,40,72 );
   CASE Digit OF
      0 : BEGIN
             Top_Horz ;
             Right_Top ;
             Right_Bot ;
             Bot_Horz ;
             Left_Bot ;
             Left_Top ;
          END;
      1 : BEGIN
             Right_Top ;
             Right_Bot ;
          END;
      2 : BEGIN
             Top_Horz ;
             Right_Top ;
             Mid_Horz ;
             Left_Bot ;
             Bot_Horz ;
          END;
      3 : BEGIN
             Top_Horz ;
             Right_Top ;
             Mid_Horz ;
             Right_Bot ;
             Bot_Horz ;
          END;
      4 : BEGIN
             Left_Top ;
             Mid_Horz ;
             Right_Top ;
             Right_Bot ;
          END;
      5 : BEGIN
             Top_Horz ;
             Left_Top ;
             Mid_Horz ;
             Right_Bot ;
             Bot_Horz ;
          END;
      6 : BEGIN
             Top_Horz ;
             Left_Top ;
             Mid_Horz ;
             Right_Bot ;
             Bot_Horz ;
             Left_Bot ;
          END;
      7 : BEGIN
             Top_Horz ;
             Right_Top ;
             Right_Bot ;
          END;
      8 : BEGIN
             Top_Horz ;
             Right_Top ;
             Right_Bot ;
             Bot_Horz ;
             Left_Bot ;
             Left_Top ;
             Mid_Horz ;
          END;
      9 : BEGIN
             Mid_Horz ;
             Left_Top ;
             Top_Horz ;
             Right_Top ;
             Right_Bot ;
             Bot_Horz ;
          END;
   END; { of CASE }
END; { of D_Digit }

