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

  1. N,"LQ2500 LQ Mode"; {revised 6/13/89, Dean Anderson} 
  2. { following are default assignments:} 
  3.   x: df=2;      {init data format to 1} 
  4.   x: xd=1;      {double horizontal density. Does not affect character 
  5.                  data, merely the displayed density of dots.} 
  6.   x: yd=1;      {one pass, normal vertical density} 
  7.   x: pw=8;      {number of print wires used if multi-pass printing} 
  8.   x: to=20;     {offset of character top to baseline.} 
  9.   x: lo=0;      {left offset, ignore it} 
  10.   x: cw=37;     {default character width} 
  11.   x: ch=24;     {default character height} 
  12.   a: aa=0;      {allow adjacent dots} 
  13.   a: fw=cw;     {maximum font cell width, for Normalize function} 
  14.   a: fh=ch;     {max font cell height, for Normalize} 
  15.   a: bl=to;     {position of baseline relative to top of font cell.} 
  16.  
  17. E; {end initialization section.} 
  18.  
  19. KI; {start input font header. (values from section KO)} 
  20. z 12:fs-fp;     {jump to L12 if end of file reached} 
  21.   u: zz;        {read first byte} 
  22. j 40: zz,ne,27; {check for ESC} 
  23.   u: zz;        {read next byte} 
  24. j 40: zz,ne,120;{check for 'x'} 
  25.   u: zz;        {read next byte} 
  26. j 40: zz,ne,49; {check for '1'} 
  27.   u: zz;        {read next byte}   
  28. j 40: zz,ne,27; {check for ESC} 
  29.   u: zz;        {read next byte}   
  30. j 40: zz,ne,58; {check for ':'} 
  31.   u: zz;        {read next byte}   
  32. j 40: zz,ne,0;  {check for 0} 
  33.   u: zz;        {read next byte}   
  34. j 40: zz,ne,0;  {check for 0} 
  35.   u: zz;        {read next byte}   
  36. j 40: zz,ne,0;  {check for 0}
  37.   u: zz;        {read next byte}
  38. j 40: zz,ne,27; {check for ESC (proportional command)} 
  39.   u: zz;        {read next byte}
  40. j 40: zz,ne,112;{check for 'p'}
  41.   u: zz;        {read next byte}
  42. j 40: zz,ne,1;  {check for 1}
  43.    
  44. EI; {end input font header.} 
  45.  
  46. #:**,"Using LQ2500 LQ Mode to load font"; 
  47. z 12:fs-fp;     {will cause jump to L12 if end of file is reached} 
  48. L 88; 
  49.   u: zz;        {read a byte} 
  50. j 40: zz,ne,27; {check for ESC} 
  51.   u: zz;        {read a byte} 
  52. j 40: zz,ne,38; {check for '&'} 
  53.   u: zz;        {read a byte} 
  54. j 40: zz,ne,0;  {check for 0} 
  55.   u: cc;        {get char code} 
  56.   u: zz;        {get repeat of char code} 
  57. j 40: cc,ne,zz; {check if valid} 
  58.   u: zz;        {lead cols} 
  59.   u: zz;        {char cols} 
  60.   u: zz;        {trail cols} 
  61.  
  62. L 1;            {label 1 to indicate start of character.} 
  63. #  : cc,"Loading code (decimal) "; 
  64.   g;            {character data} 
  65.  
  66. ESL;            {end character search, character loaded.} 
  67. # : cc,"Loaded code (decimal) "; 
  68.  
  69. j 88:1,eq,1;    {go get next char} 
  70.  
  71. L 12;           {end of file reached} 
  72. #  : **,"Loaded."; 
  73.  
  74. j 41:1,eq,1; 
  75. L 40; 
  76. #  : **,"Invalid font file for LQ2500 LQ Mode"; 
  77.  
  78. L 41; 
  79.  
  80. KT;             {start input font trailer.} 
  81.     {This font does not use a trailer.} 
  82. ET;             {end font trailer.} 
  83.  
  84. KS;             {start search for an input character.} 
  85. #  : **,"This configuration does not support search"; 
  86. ESU;            {end character search program (unsuccessful search)} 
  87.  
  88. KO;             {start output font header.} 
  89.   u: 27; 
  90.   u: 120; 
  91.   u: 49; 
  92.   u: 27; 
  93.   u: 58; 
  94.   u: 0; 
  95.   u: 0; 
  96.   u: 0; 
  97.   u: 27;
  98.   u: 112;
  99.   u: 1;
  100. EO;             {end output font header.} 
  101.  
  102.                 {following lines select characters to output} 
  103.   a:cc=0;       {start with first possible code, zero} 
  104.   c;            {select first valid code} 
  105. j 57:1,eq,1;    {bypass first check to see if cc is back to zero} 
  106. L 55;           {jumped here to get next code} 
  107.   c;            {select first valid code} 
  108. j 59:cc,eq,0;   {go to 59 if no more valid codes (cc is back to zero)}
  109.  
  110. L 57;           {valid code selected} 
  111.  
  112. KC;            {start output character.} 
  113. #  : cc,"Sending code (decimal): "; 
  114.   u: 27; 
  115.   u: 38; 
  116.   u: 0; 
  117.   u: cc; 
  118.   u: cc; 
  119.   u: 3; 
  120.   u: 37; 
  121.   u: 2; 
  122.   g; 
  123.  
  124. EC;             {end output character.} 
  125. a:cc=cc+1;      {increment to next code} 
  126. j 55:1,eq,1;    {jump to select it, or next higher valid code} 
  127. L 59;           {all characters have been written} 
  128.  
  129. KZ;             {start output font trailer.} 
  130.     {This font does not use a trailer} 
  131. ET;             {end font trailer.} 
  132.  
  133. KP;             {start download} 
  134. #   :**,"This configuration does not support download"; 
  135. EP;             {end download} 
  136.