home *** CD-ROM | disk | FTP | other *** search
/ Oakland CPM Archive / oakcpm.iso / cpm / list / ep-src.ark / EPDATA.MAC < prev    next >
Text File  |  1988-05-21  |  8KB  |  371 lines

  1.  
  2.  
  3. ttrue    equ    1
  4. false    equ    0
  5.  
  6. lvers    equ    true
  7.  
  8. CMDCH    equ    '\'    ;/* command character (use 'li'?)*/
  9. DOTCH    equ    '.'    ;/* at beginning of line, same
  10.             ;   as CMDCH            */
  11. SOFTSP    equ    0A0H    ;/* WS fill sp char        */
  12. SOFTHY    equ    01EH    ;/* WS inactive soft hyphen    */
  13. SOFTHYA    equ    01FH    ;/* WS acitve soft hyphen    */
  14.  
  15. NUMFTS    equ    7    ;/* maximum number of graphic fonts    */
  16. LENFTN    equ    14    ;00/D:12345678<nul>
  17. NUMRULES equ    32
  18.  
  19. SECSIZ        equ    128
  20. MAXLINE        equ    300
  21. MAXCOL        equ    10
  22. BSTKSIZE    equ    6*MAXCOL
  23. GBUFSIZ        equ    2000
  24. MAXSNEST    equ    40
  25.  
  26. ;/* various measures in terms of dots    */
  27. PICA    equ    24
  28. POINT    equ    3
  29. INCH    equ    240
  30. VINCH    equ    216
  31.  
  32.  
  33.  
  34. ;/* masks for mode bits */
  35. ELITE    equ    01
  36. PRPTNL    equ    02
  37. CMPRSSD equ    04
  38. EMPHSZD equ    08
  39. DBLSTRK equ    10H
  40. EXPNDD    equ    20H
  41. UNDRLN    equ    40H
  42. ITALIC    equ    80H
  43. ;/*    So that's b0-b7; b8,b9,b10 are used for the
  44. ;    current graphics font, which is 'fo'-1.        */
  45. SUPSCRPT equ    0800H
  46. SUBSCRPT equ    1000H
  47. BENT     equ    2000H
  48. TALL     equ    4000H
  49. IGNORE     equ    8000H
  50. ;/*    All bits are committed        */
  51.  
  52. ;/* define bits for type of command value                */
  53. HZNUM    equ    1
  54. VTNUM    equ    2    ;/* numerical value, vertical measure        */
  55. EPSSYN    equ    4    ;/* synonym of Epson command            */
  56. BRK    equ    8    ;/* causes a break                */
  57. CHARG    equ    16    ;/* arg is character                */
  58. FLAGCH    equ    32    ;/* value is character flag            */
  59. MCRO    equ    64    ; a macro string
  60. BRKAFT    equ    128    ; causes break before next input line
  61. ARGTRUE    equ    1+32    ; assume true arg, but no following number
  62. ;    /* All bits are committed    */
  63.  
  64.  
  65. ;/* character flags            */
  66. CEFLAG    equ    090H
  67. RAFLAG    equ    091H
  68. SPFLAG    equ    092H
  69. HSFLAG    equ    093H
  70. PAFLAG    equ    094H
  71. FRFLAG    equ    095H
  72. BCKFLAG    equ    096H
  73.  
  74.     dseg
  75.     ds    6    ;formerly used by alloc -- now not used
  76.  
  77. ;/* following block matches format of data in ep.ini             */
  78. ;/* initialization data       size tot.size                */
  79. ;int    val[27][27];    /* 05B2    05B2    values of 'pl', etc.        */
  80.  
  81. val:
  82.  
  83. vlgen    macro    lets,lab
  84. tglet    set    0ffh
  85.     irpc    xlet,lets
  86.     if    tglet
  87. q1    set    '&xlet'-'`'
  88.     else
  89. q2    set    '&xlet'-'`'
  90.     endif
  91. tglet    set    0
  92.     endm
  93.     org    q1*54 + q2*2 + val
  94.     if    nul lab
  95. lets:
  96.     else
  97. lab:
  98.     endif
  99.     endm
  100.  
  101.     vlgen    al,align
  102.     vlgen    be
  103.     vlgen    bm
  104.     vlgen    bo
  105.     vlgen    bp
  106.     vlgen    ca,callig
  107.     vlgen    cc
  108.     vlgen    ch,cheight
  109.     vlgen    co
  110.     vlgen    cs
  111.     vlgen    cw
  112.     vlgen    ec
  113.     vlgen    ep
  114.     vlgen    fa
  115.     vlgen    fm
  116.     vlgen    fo
  117.     vlgen    gu
  118.     vlgen    hm
  119.     vlgen    ir
  120.     vlgen    ju
  121.     vlgen    ke
  122.     vlgen    ll
  123.     vlgen    mx
  124.     vlgen    nc
  125.     vlgen    pf
  126.     vlgen    pl
  127.     vlgen    pn
  128.     vlgen    rb
  129. ;    vlgen    sh
  130.     vlgen    sl
  131. ;    vlgen    st
  132.     vlgen    su
  133.     vlgen    ta
  134.     vlgen    tc
  135.     vlgen    tm
  136.     vlgen    uc
  137.  
  138.     org    val+2*27*27
  139.  
  140. ;char    valtp[27][27];    /* 02D9 088B    type of value, e.g. numerical    */
  141. valtp:        ds    27*27
  142. ;char    modelen[64];    /* 0040 08CB    width of Epson built-in char's    */
  143. modelen:    ds    64
  144. ;char    pmlen[256];    /* 0100 09CB    width of Epson prop'l char's    */
  145. pmlen:        ds    256
  146. ;int    mode;        /* 0002 09CD    16 bits keep track of font, etc.*/
  147. mode:        ds    2
  148. ;char    tabwid;        /* 0001 09CE    nominal char width for int'g tab*/
  149. tabwid:        ds    1    ;NO LONGER USED
  150. ;char    bending[7][24];    /* 00A8 0A76    bending                */
  151. bending:    ds    7*24
  152. ;char    fillinit[10];    /* 000A 0A80    (not used)            */
  153.         ds    10
  154. ;    /* total = 10 pp. or 21 records */
  155.  
  156. ;from FGET.C,    fl at val + A80H (6686H) is array 8 by (128+6) uses 430H
  157. fl:        ds    8*(128+6)
  158. ;        flnum at fl + 430H (6AB6)
  159.         ds    2    ;flnum now private to fget
  160.  
  161. ;EPDCL    equ    6AB8H (once upon a time)
  162. nospec:        ds    1    ;disable special features while doing headings
  163. noprint:    ds    1    ;disable printing
  164. errtype:    ds    2
  165. llength:    ds    2        ;6ABCH
  166. vposition:    ds    2
  167. bkaft:        ds    1    ;flag break before next input line
  168. gfflag:        ds    1    ;note loading graphic font
  169. ;int    pgno,
  170. ;    errtype,
  171. ;    llength,        /* current ll minus indents        */
  172. ;    vposition,        /* vert'l position of printhead        */
  173. ;    spdots,            /* number dots to move printhead
  174. ;                   down before printing, even at
  175. ;                   the beginning of a page        */
  176. skdots:        ds    2
  177. emode:        ds    2
  178. ;    skdots,            /* as above, but not at beginning
  179. ;                   of page                */
  180. ;    emode,            /* what the Epson thinks the current
  181. ;                   mode is                */
  182. allmode:    ds    2
  183. errcode:    ds    2
  184. ;    allmode,        /* keep mode for } command        */
  185. ;    errcode;
  186.  
  187. ;(dt1,dt2 not used now -- made local to cseq)
  188. frplace:    ds    2    ;remember where to put a cl space
  189. ;dt1        equ    epdcl+18    ;6ACA
  190. ;dt2        equ    epdcl+19
  191.  
  192. brkflag:    ds    1    ;6ACCH
  193. bsflag:        ds    1
  194. epsflag:    ds    1
  195. grfflag:    ds    1
  196. unidir:        ds    1
  197. tallflag:    ds    1
  198. tabottom:    ds    1    ;6AD2H
  199. scrncol:    ds    1
  200. ;char    dt1, dt2,        /* 1st and 2nd letter of command    */
  201. ;    brkflag,        /* signal don't justify this line     */
  202. ;    bsflag,            /* overprint next char            */
  203. ;    epsflag,        /* have an Epson char in output line    */
  204. ;    grfflag,        /* have a graphics char in output line    */
  205. ;    unidir,            /* Epson unidir'l print assumption    */
  206. ;    tallflag,        /* tall char in output line        */
  207. ;    tabottom,        /* last 3 passes when tall char present */
  208. ;    scrncol;        /* apparent column on screen when
  209. ;                   line of text was edited        */
  210.  
  211. fnbuf:        ds    29    ;was 30
  212. mcinok:        ds    1    ;flag ok to reset indent in mc mode
  213. termcnt:    ds    1    ;(formerly used for fname)
  214. nexttab:    ds    1    ;next implicit 'n' value for tb command
  215. ;char    fnbuf[30], *fname;    /* filename buffer & ptr        */
  216. ;
  217. inpoint:    ds    2    ;(6AF4)
  218. inbuf:        ds    MAXLINE
  219. ;int    inpoint;
  220. ;    char inbuf[MAXLINE];    /* one line from the text        */
  221.  
  222. glen:    ds    2    ;6C22H
  223. gpoint:    ds    2    ;6C24H
  224. gbuf:    ds    GBUFSIZ    ;6C26H
  225. ;
  226. ;int    glen,            /* cumulative length of line
  227. ;                   currently being formed, in dots    */
  228. ;    gpoint;
  229. ;    char gbuf[2000];    /* dot graphics data for one line
  230. ;                   of output                 */
  231.  
  232. outpoint:    ds    2    ;73F6H
  233. xoutbuf:    ds    MAXLINE
  234. outbuf:        ds    2    ;7524H
  235. ;
  236. ;int    outpoint;
  237. ;    char  xoutbuf[MAXLINE],    /* character data for one line of output */
  238. ;        *outbuf; 
  239.  
  240. xattrbuf:    ds    2*MAXLINE
  241. attrbuf:    ds    2    ;777EH
  242. xwidbuf:    ds    2*MAXLINE
  243. widbuf:        ds    2    ;79D8H
  244. ;    int  xattrbuf[MAXLINE],    /* mode attributes for each character    */
  245. ;        *attrbuf,
  246. ;          xwidbuf[MAXLINE],    /* width of each character        */
  247. ;        *widbuf;
  248. ;        /* the pointers above are used so that the buffers
  249. ;           can be used temporarily for the page number (I
  250. ;           painted myself into a corner)            */
  251. ;
  252.  
  253. brccount:    ds    2
  254.         ds    2    ;not used
  255. brcstk:        ds    2*MAXCOL*6
  256. ;int    brccount,        /* count unpaired left braces        */
  257. ;    nubrcpt,        /* brace stack pointer            */
  258. ;    brcstk[MAXCOL][6];        /* brace stack                */
  259.  
  260. ftp:        ds    2*NUMFTS    ;7A56H
  261. fix:        ds    2*NUMFTS*128        ;7A64H
  262. ftlen:        ds    NUMFTS*128    ;8164H
  263. ;/* font data */
  264. ;unsigned ftp[NUMFTS];        /* memory addresses where fonts
  265. ;                   begin in 'fnt'            */
  266. ;int    fix[NUMFTS][128];    /* for each font, indices of
  267. ;                   individual character definition     */
  268. ;char    ftlen[NUMFTS][128],    /* character widths - determined
  269. ;                   by values in 'fix'            */
  270.  
  271. ftname:        ds    NUMFTS*LENFTN    ;(84E4)
  272. nextft:        ds    1        ;(8523)
  273. ;    ftname[NUMFTS][9],    /* names - e.g. MODERN            */
  274. ;    nextft;            /* number of next font to load        */
  275.  
  276. begovr:        ds    2    ;8524H
  277. endovr:        ds    2    ;8526H
  278. ;int begovr, endovr;
  279.  
  280. brcpt:        ds    2*MAXCOL
  281. lindent:    ds    2*MAXCOL    ;853CH
  282. ;int brcpt[MAXCOL], lindent[MAXCOL];
  283. pendc:        ds    1    ;8550H
  284. ;char pendc;
  285.  
  286. attach:        ds    2*32
  287. ;int attach[32];
  288. duplflag:    ds    1
  289. ;char duplflag
  290. hycorrect:    ds    1
  291. ;/* for processline: */
  292. ;    char hycorrect;
  293.  
  294. gargc:        ds    2
  295. gargv:        ds    2
  296.  
  297. ;used in loadft
  298. fullname:    ds    17
  299.  
  300. ;st and sh now done indirectly -- moved to here
  301. ;(cf stowc, gchr, cseq)
  302. st:        ds    2
  303. sh:        ds    2
  304.  
  305. ;$$$    from GCHR
  306. pass:    ds    1
  307. ch:    ds    1
  308. c0:    ds    1
  309. c1:    ds    1
  310. c2:    ds    1
  311. bx:    ds    1
  312. ftn:    ds    1
  313. charft:    ds    1
  314. len:    ds    2
  315. lstlen:    ds    2
  316. pix:    ds    1
  317.  
  318. power:    ds    1
  319. gindex:    ds    2
  320. dtgindex:    ds    2
  321. ix:        ds    2
  322. widix:    ds    2
  323. ptft:    ds    2
  324. ptft0:    ds    2
  325. ptft1:    ds    2
  326. ptft2:    ds    2
  327. gcj:    ds    2
  328.  
  329. cx48:    ds    6
  330.  
  331. _st:    ds    2
  332. _sh:    ds    2
  333.  
  334. ;$$$    from GSTR
  335. afterdup:    ds    1
  336. _savheight:    ds    2
  337. tduplex:    ds    1
  338. tripleh:    ds    1
  339. _gpass:        ds    1
  340. maxgpt:        ds    2
  341. nvdots:        ds    1
  342.  
  343.  
  344. spare1:        ds    2
  345. spare2:        ds    2
  346. spare3:        ds    2
  347.  
  348. ;kerning strings for each font -- stowc & cseq
  349. klist:        ds    NUMFTS*2
  350.  
  351. ;misc. used from cseq
  352. rlpoint:    ds    2        ;also from process
  353. mcoloffset:    ds    2        ;also from gstr
  354. rulist:        ds    NUMRULES*4    ;also from gstr, prtsbuf, gotocol
  355.  
  356.     if    lvers
  357. NUMLINES    equ    32
  358.  
  359. lilist:        ds    NUMLINES*8
  360.     endif
  361.  
  362. utabs:        ds    32*2
  363. gname:        ds    13
  364.  
  365. _$stack:    ds    MAXSNEST*2
  366. _$buf:        ds    1024
  367.  
  368. ..freram:
  369.  
  370.     CSEG
  371.