home *** CD-ROM | disk | FTP | other *** search
/ Programmer 7500 / MAX_PROGRAMMERS.iso / PROGRAMS / UTILS / LASER / BFONT513.ZIP / PAN_OK.BFC < prev    next >
Encoding:
Text File  |  1989-09-06  |  3.8 KB  |  303 lines

  1. N,"Panason.bfc 9/06/89 11 am redo with esc %remove esc P"; {jsp}     
  2.   x: df=2;      {init data format to 2}     
  3.   x: xd=1;      {double horizontal density}     
  4.   x: yd=1;      {one pass, normal vertical density}     
  5.   x: to=20;     
  6.   x: lo=0;     
  7.   x: cw=37;     
  8.   x: ch=24;     
  9.     a: aa=0;      {not allow adjacent dots}     
  10.   a: fw=37;     
  11.   a: fh=cw;     
  12.   a: bl=to;     
  13.      
  14.   a: d8=0;   {d8=1 says downloading}     
  15. E; {end initialization section.}     
  16. KI; {start input font header.}     
  17. EI; {end input font header.}     
  18. L 8;     
  19. j 12:fp,ge,fs; {L12 is end of file reached}     
  20.   u: zz;     
  21.   j 8: zz,ne,$1b; {look for esc}     
  22.   u: zz;     
  23.   j 8: zz,ne,$26; {look for x'26'}     
  24.   u: zz;     
  25.   j 8: zz,ne,$00;  {look for 0 }    
  26.  
  27.   u: cc;      {decimal code of character}    
  28.  
  29.   u: cc;      {decimal code of character}    
  30.  
  31. L 1; {label 1 to indicate start of character.}    
  32.  
  33. $ : cc,"Loading code (hex) ";    
  34.  
  35.   x: df=2;      {init data format to 2}    
  36.  
  37.       
  38.  
  39.   x: yd=1;      {one pass, normal vertical density}    
  40.  
  41.   x: cw=37;    
  42.  
  43.   x: ch=24;    
  44.  
  45.   u:zz; {lead cols}  
  46.  
  47.    u: cw; {char cols}  
  48.  
  49.    u: zz; {trail cols}    
  50.  
  51.      
  52.  
  53.       
  54.  
  55.   g; {character data}    
  56.  
  57. ESL; {end character search, character loaded.}    
  58.  
  59.   j 8:1,eq,1; {go get next char}    
  60.  
  61. L 12; {end of file reached}    
  62.  
  63. #:**,"Font loaded.";    
  64.  
  65. KT; {start input font trailer.}    
  66.  
  67. ET; {end font trailer.}    
  68.  
  69. KS; {start search for an input character.}    
  70.  
  71.   z 10:fs-fp;    
  72.  
  73.   L 9;    
  74.  
  75.   u: zz;    
  76.  
  77.   j 9: zz,ne,$1b; {look for esc}    
  78.  
  79.   u: zz;    
  80.  
  81.   j 9: zz,ne,$26; {look for x'26'}    
  82.  
  83.   u: zz;    
  84.  
  85.   j 9: zz,ne,$00;  {look for 0 }    
  86.  
  87.   d: zc;      {decimal code of character}    
  88.  
  89. $: zc,"Encountered code (hex): ";    
  90.  
  91. #: fp,"At file position: ";    
  92.  
  93. j 9: zc,ne,cc;    
  94.  
  95. # : cc,"Found code (dec)";    
  96.  
  97.   j 1: 1,eq,1;   {found, go get it}    
  98.  
  99. L 10;       {char not found}    
  100.  
  101. ESU; {end character search program (unsuccessful search)}    
  102.  
  103. KO; {start output font header.}    
  104.  
  105. L 88; {for download}    
  106.  
  107. #:**, "Sending Font Header ";  
  108.  
  109.    u:27; {check for esc for font mode code}  
  110.  
  111.    u:120;  
  112.  
  113.    u:1;  
  114.  
  115.        
  116.  
  117.   u:$1b;   {this starts rom cg copy to initialize char set to default}
  118.  
  119.  
  120.  
  121.  
  122.   
  123.  
  124.    
  125.  
  126.   y:":";    
  127.  
  128.   u:$00;    
  129.  
  130.   u:$00;    
  131.  
  132.   u:$00;  
  133.  
  134.      
  135.  
  136. EO; {end output font header.}    
  137.  
  138. a:cc=0;  {start with first possible code, zero}    
  139.  
  140. c;       {select first valid code}    
  141.  
  142.  
  143. j 57:1,eq,1; {bypass first code check}   
  144.  
  145.  
  146.  
  147. L 55;   
  148.  
  149.  
  150.  
  151.   c;  {select first valid code}   
  152.  
  153.  
  154.  
  155. j 59:cc,eq,0;  {go to 59 if no more valid codes}   
  156.  
  157.  
  158.  
  159. L 57;   
  160.  
  161.  
  162.  
  163. KC; {start output character.}   
  164.  
  165.  
  166.  
  167. $ :cc,"Sending code (hex): ";   
  168.  
  169.  
  170.  
  171.   u:$1b;   
  172.  
  173.  
  174.  
  175.   u:$26;   
  176.  
  177.  
  178.  
  179.   u:$00;   
  180.  
  181.  
  182.  
  183.   u: cc;      {decimal code of character}   
  184.  
  185.  
  186.  
  187.   u: cc;      {decimal code of character}   
  188.  
  189.  
  190.  
  191.   u: 3; {left space} 
  192.  
  193.  
  194.  
  195.    u: cw; {sends the width of each char} 
  196.  
  197.  
  198.  
  199.    u: 2; {sends amount of right space}   
  200.  
  201.  
  202.  
  203.   g;   {character data}   
  204.  
  205.  
  206.  
  207. j 5: 1,eq,1;   
  208.  
  209.  
  210.  
  211.    
  212.  
  213.  
  214.  
  215. L 5;   
  216.  
  217.  
  218.  
  219. EC; {end output character.}   
  220.  
  221.  
  222.  
  223. a:cc=cc+1;   
  224.  
  225.  
  226.  
  227. j 55:1,eq,1;   
  228.  
  229.  
  230.  
  231. L 59;   {end}   
  232.  
  233.  
  234.  
  235. KZ; {start output font trailer.}   
  236.  
  237.  
  238.  
  239. u:$1b;
  240.  
  241.  
  242.  
  243. u:$25;
  244.  
  245.  
  246.  
  247. u:$01;
  248.  
  249.  
  250.  
  251. j 89:d8,eq,1; {go finish download if downloading}   
  252.  
  253.  
  254.  
  255. ET; {end font trailer.}   
  256.  
  257.  
  258.  
  259. KP; {start download}   
  260.  
  261.  
  262.  
  263.   a:d8=1;  {downloading indicator}   
  264.  
  265.  
  266.  
  267. j 88: 1,eq,1; {go save font to the printer}   
  268.  
  269.  
  270.  
  271. L 89; {now select download char set}   
  272.  
  273.  
  274.  
  275.   a:d8=0; {turn off download indicator}   
  276.  
  277.  
  278.  
  279.   u:$1b;   
  280.  
  281.  
  282.  
  283.   u:$25;   
  284.  
  285.  
  286.  
  287.   u:$01;   
  288.  
  289.  
  290.  
  291.    
  292.  
  293.  
  294.  
  295. EP; {end download}   
  296.  
  297.  
  298.  
  299. .   
  300.  
  301.  
  302.  
  303.