%!ps

% Demo a file read    table_builder1
% =======
% Author and date
% Function
% Details
% ======

% Postscript demo to generate css compatible $20 URL space
% Intended primarily for study as this was an internal workfile.

% Requires gonzo, gonzotut, and several older files relocated.
% Requires //acrodist /F from command line.
% Cut and paste .txt generated code from chrome, not wordpad.

% =======

% Uncomment and modify to use disk based Gonzo. ( or other disk access )
(C:/Users/Don/Desktop/Ghost/gonzo.psl) run % use internal 

/guru { gonzo begin
ps.util.1 begin printerror nuisance begin} def   

 guru                                           % activate gonzo utilities

% ==============================






%%%%%%%%%%
% This code changes the page size to smaller
[/CropBox [0 0 520 620]       % set the weird size in points X Y.
/PAGES pdfmark 
%%%%%%%%%%


% ///////// (A) WEB FRIENDLY COLOR UTILITIES /////////////

% tintmat is a self-generating list of 216 triple color values

/webtintmat [
0 1 5 { /a exch store
0 1 5 { /b exch store
0 1 5 { 5 div b 5 div a 5 div
}for
} for
} for
] def


% setwebtint accepts a color number 0 to 215 and then
% sets the PostScript color generator for later use...

/setwebtint { abs cvi 216 cvi mod     % restrict range
webtintmat exch 3 mul 3 getinterval   % get values from table
aload pop setrgbcolor} def            % and set them




% fonts here


/setpagefonts {

/cstretch 0.015 def
/sstretch 0.015 def
/font0 /StoneSans-Bold 1.6 gonzofont
/font1 /StoneSans 0.95        pop 0.9 gonzofont
/font2 /StoneSans [0.95 0 0.25 0.95 0 0 ] gonzofont
/font4 /StoneSans 0.85 pop 0.8 gonzofont
/font3 /StoneSans-Bold 0.85      pop 0.8 gonzofont
/font6 /StoneSans-Bold 0.85  pop 0.7 gonzofont
/font7 /StoneSans-Bold 1.05 gonzofont   % subheaders
/font8 /StoneSans-Bold [0.65 0 0 0.65 0 0.4] gonzofont
/font9 /StoneSans-Bold 1.05 gonzofont
/txtwide 33 store
/yinc 1.2 store
/kern 0.1 store
/texttop 51 store
/textleft 3 store
/amacro {(zy0)  stringmacro /ypos
 ypos ypara add def} def             % start drop cap
/bmacro {(iFy1) stringmacro /ypos
 ypos ypara add def} def             % finish drop cap

/overstrikeht 0.57 def

} store 

% glyphs start here

/jkff {gsave  translate
line1 -1 4 mt 6 r   -1 1 mt 6 r
-1.5 2.5 mt 1.5 r rarrow -1.5 2.5 mt circ2
0 0 mt 4.5 pu 3.5 pr 4.5 pd closepath
gsave 213 setwebtint fill grestore line2
stroke 

font1 .6 3.5 (S) cc
.6 .7 (C) cc
.6 2.2 (T) cc
2.7 0.7 (Q|o) cc
2.7 3.5 (Q) cc 
1.75 0.3 (R) cc

grestore } def

/gate2 {gsave /t4x exch store /t3x exch store /t2x exch store translate

line1 0 0.7 mt 0.8 l  0 2.3 mt 0.8 l

0 0 mt 3 pu 3.5 -1.5 rlineto -3.5 -1.5 rlineto closepath
gsave 137 setwebtint fill grestore line2 stroke

line1 3.5 1.5 mt 1.2 r circ2
line1 3.5 1.5 mt circ2

font4 
-1.5 2 t2x cc
-1.5 0.4 t3x cc
5.5 1.3 t4x cc

grestore} store 


/gate2only  {gsave translate

line1 0 0.7 mt 0.8 l  0 2.3 mt 0.8 l

0 0 mt 3 pu 3.5 -1.5 rlineto -3.5 -1.5 rlineto closepath
gsave 137 setwebtint fill grestore line2 stroke
line1 3.5 1.5 mt circ2

grestore} store







% figures start here
/walk10 {gsave /size exch store translate size dup scale

                    
0 0 jkff
7 0 jkff
13 0 jkff
19 0 jkff
25 0 jkff

line1 30 4 mt 1.5 ux 32.5 l 4.5 d 2 r  % Q to C
30 1 mt 0.5 r 5 u 31.5 l 2 dx 1 r  %  /Q to S

1.75 0 mt 2 d 25 r 2 u  % real reset

4.5 4 mt dot  4.5 4 mt 2 r  4.25 4 mt 2 r  % tap first
4.5 4 mt 7.7 dx 3 r % second tap

8.75 0 mt 1 d 12 r 1 u
14.75 0 mt 1 d dot
14.75 -1 mt 3.5 dx 3 l

5 1 mt 1 r  % glitch

24 -2 mt dot
24 -2 mt 1.5 d circ2
24 -4.8 (|4RESET) cc

18.5 -6.5 (|4NOTE: Connect "T") cc
18.5 -7.5 (|4Inputs as in Fig 7-5.) cc



-2.5 1 mt dot
-2.5 1 mt 6.3 d 11 r

8 -6  gate2only





grestore
} store


/decode10 {
6 46.8 (Q1)(Q5)(0) gate2
6 42.8 (Q|o4)(Q5)(4) gate2

14.4 46.8 (Q|o1)(Q2)(1)gate2
14.4 42.8 (Q|o1)(Q|o5)(5)gate2
14.4 38.8 (Q3)(Q|o4)(8)gate2

22.8 46.8 (Q|o2)(Q3)(2)gate2
22.8 42.8 (Q1)(Q|o2)(6)gate2
22.8 38.8 (Q4)(Q|o5)(9)gate2


31.2 46.8 (Q|o3)(Q4)(3)gate2
31.2 42.8 (Q2)(Q|o3)(7)gate2


} store 


%%%%%%%%%%%% code starts here %%%%%%%%%%%%


50 25 10 setgrid    % draw a small page
% 40 60 showgrid    % uncomment to see grid
setpagefonts
/leftpage true store
/pagenum (180) store 

86 setwebtint
20 37  (|6(A) Use of two-input gates to decode into ten lines.) cc
20 18.7(|6(B) Use of zero decoding to eliminate disallowed states.) cc
188 setwebtint 

20 17(|3Fig. 7-6. Decoding of walking-ring decade counters.)cc

leftpage {86 setwebtint  font3 4 1 pagenum cl}{font3 43 pagenum cr} ifelse black


0 setwebtint
10 43 1.0 decode10


6 29 1.0 walk10
          
/burp {188 setwebtint} store

4 52 (|1|z|ythe output ahead of it during subtraction. The add bus is normally positive; its inversion is normally grounded. Either the look-ahead or look-behind gate is inhibited, depending on the add-subtract command.) cf

4 15.7 (|1|z|y
JK flip-flops may be used by first converting them into Type-D flip-flops by providing an inverter between the S and C inputs. This change requires five extra inverters, as shown in Fig. 7-7B.
|h|3|/burp 
Programmable|j-|jDivide Walking Ring|1
|h|/black 
The programmable-divide circuit using a walking ring counter needs the basic ring, a single-pole, ten-position selector switch, and a full monostable for resetting (Fig. 7-8). The selector switch determines which negative going transition will trip the monostable, produce an output, and reset the counter to state zero. A full monostable is needed because one half of the selected outputs will go positive upon reset, creating a self-annihilating coincidence. The counter can be decoded in the normal manner if desired.) cf





showpage
% EOF