home *** CD-ROM | disk | FTP | other *** search
/ Crawly Crypt Collection 2 / crawlyvol2.bin / apps / dtp / pgsmodst / atariprt / iffilbm.s < prev    next >
Text File  |  1991-05-23  |  22KB  |  806 lines

  1.  include "pdlequ.h"
  2.  
  3. *
  4. * IFF File printer
  5. *
  6.  
  7.  
  8.  SECTION printer,CODE,PUBLIC
  9. ************************************
  10.  
  11. dumbentry:
  12.     clr.l    d0
  13.     rts
  14.  
  15.     dc.l    "PRNT"
  16.     dc.w    200
  17.  
  18.  
  19.  
  20. ****************************************************
  21. * distribute the calls to the appropriate routines *
  22. ****************************************************
  23. fx80:    move.l    a0,table
  24.     lsl.w    #2,d0
  25.     lea    prntbl,a1
  26.     move.l    0(a1,d0.w),a1
  27.     jmp    (a1)
  28.  
  29.  
  30. *********************************************************
  31. * identify who I am, and set up who I like to speak to. *
  32. *********************************************************
  33. p_ident:
  34.     move.l    #driver,pdrvrnm(a0)    ;pointer to string for driver name
  35.     move.w    #DISK+ASCENDING,device(a0)
  36. prtok:    moveq    #1,d0
  37.     rts
  38.  
  39.  
  40. ******************************************************
  41. * initialize the table of printer specific routines  *
  42. ******************************************************
  43. p_init:    clr.b    pdl(a0)            ;no page description language
  44.     clr.b    pmult(a0)        ;automatically print mulitiple copies?
  45.     clr.b    pman(a0)        ;handle manual feed?
  46.         
  47.         lea     colortag1,a1
  48.         lea     colortag2,a2
  49.         move.l  prtspcl(a0),a3
  50.         
  51. pint01: tst.b   (a1)
  52.         beq     colr
  53.         
  54.         move.b  (a3),d0
  55.         cmp.b   (a1),d0
  56.         beq     pint02
  57.         
  58.         cmp.b   (a2),d0
  59.         bne     bw
  60.         
  61. pint02: addq.l  #1,a1
  62.         addq.l  #1,a2
  63.         addq.l  #1,a3        
  64.         bra     pint01
  65.         
  66. bw:    move.b    #PRT_BW,ptype(a0)    ;b&w iff file
  67.         bclr    #0,flag
  68.         bra     pint03
  69.         
  70. colr:   move.b  #PRT_CMYK,ptype(a0)     ;16 color iff file
  71.     bset    #0,flag
  72.         
  73. pint03: move.l    sendout(a0),send+2    ;self-modifing code, tisk, tisk!
  74.  
  75. *
  76. * pminlft and pmaxw must be evenly divisible by 16
  77. * this is the part that should be worked out
  78. *
  79.  
  80.     move.w    pdensity(a0),d0
  81.     cmp.w    #7,d0
  82.     bcs    pint1
  83.     moveq    #6,d0
  84. pint1:    lsl.w    #1,d0
  85.  
  86.     lea    xdpi_tbl,a1
  87.     move.w    0(a1,d0.w),pxdpi(a0)    ;x resolution
  88.     lea    ydpi_tbl,a1
  89.     move.w    0(a1,d0.w),pydpi(a0)    ;y resolution
  90.     lea    minl_tbl,a1
  91.     move.w    0(a1,d0.w),pminlft(a0)    ;pixels from the left
  92.         lea    minr_tbl,a1
  93.     move.w    0(a1,d0.w),pminrht(a0)    ;pixels from the right
  94.     lea    maxw_tbl,a1
  95.     move.w    0(a1,d0.w),pmaxw(a0)    ;maximum # pixels across
  96.         lea    maxh_tbl,a1
  97.     move.l    0(a1,d0.w),pmaxh(a0)    ;maximum # pixels down
  98.     lea    mint_tbl,a1
  99.     move.w    0(a1,d0.w),pmintop(a0)    ;pixels down from top
  100.     lea    minb_tbl,a1
  101.     move.w    0(a1,d0.w),pminbot(a0)    ;pixels up from bottom
  102.     lea    xover_tbl,a1
  103.     move.w    0(a1,d0.w),pxover(a0)    ;percentage of x overlap of dots
  104.     lea    yover_tbl,a1
  105.     move.w    0(a1,d0.w),pyover(a0)    ;percentage of y overlap of dots
  106.     lea    rowht_tbl,a1
  107.     move.w    0(a1,d0.w),prowht(a0)    ;rows height modula
  108.     move.w    0(a1,d0.w),rowht
  109.     lea    rows_tbl,a1
  110.     move.w    0(a1,d0.w),rows
  111.         
  112.         lea     pagexres,a1             ;iff source page X for BMHD
  113.         move.w  0(a1,d0.w),xpage
  114.         lea     pageyres,a1             ;iff source page Y for BMHD
  115.         move.w  0(a1,d0.w),ypage
  116.     
  117.         lea    grmode_tbl,a1           ;CAMG data
  118.     move.w    0(a1,d0.w),grmode
  119.     bra    prtok
  120.  
  121.  
  122. **************************************
  123. * going to begin printing a document *
  124. **************************************
  125. p_bgndoc:
  126.         clr.l   cbuf
  127.     bra    prtok
  128.  
  129.  
  130. **************************************
  131. * about to start printing of a page  *
  132. **************************************
  133. p_bgnpage:
  134.         move.l  table,a0
  135.  
  136.         move.l  PPageWidth(a0),d0
  137.         move.l  d0,d1
  138.         addq.l  #7,d1
  139.         lsr.l   #3,d1
  140.         btst    #0,d1
  141.         beq     bp0
  142.         addq.l  #1,d1    
  143. bp0:    move.l  d0,iffx
  144.         move.l  PPageHeight(a0),iffy
  145.         
  146.         tst.l   cbuf
  147.         bne     bp1
  148.         
  149.         clr.l   d1
  150.         clr.l   d2
  151.         move.l  iffx,d0
  152.         lsl.l   #1,d0
  153.         move.l  m_alloc(a0),a0
  154.         jsr     (a0)
  155.         beq     bp1
  156.         move.l  a0,cbuf
  157.  
  158. bp1:    mulu    iffy+2,d1
  159.         btst    #0,flag         ;is it color or b&w (1=color)
  160.         beq     bpage1          ;b&w
  161.         
  162.         lsl.l   #2,d1           ;multiply by 4
  163.         
  164. bpage1: move.l  d1,bodylen
  165.         clr.l   d1
  166.  
  167.         btst    #0,flag         ;is it color or b&w?
  168.         bne     form1           
  169.         add.l   #66,d1          ;for b&w        
  170.         bra     form2
  171.         
  172. form1:  add.l   #108,d1         ;for color 
  173. form2:  move.l  d1,formlen
  174.         
  175.         lea     form,a0         ;output FORM
  176.         bsr     sendline
  177.         
  178.         move.b  formlen,d0      ;length of form
  179.         bsr     send
  180.         move.b  formlen+1,d0
  181.         bsr     send        
  182.         move.b  formlen+2,d0
  183.         bsr     send
  184.         move.b  formlen+3,d0
  185.         bsr     send
  186.  
  187.         lea     ilbm,a0         ;output ILBM 
  188.         bsr     sendline
  189.         
  190.         lea     bmhd,a0         ;output BMHD chunk
  191.         bsr     sendline
  192.         
  193.         move.b  #0,d0           ;length of chunk (always 20)
  194.         bsr     send 
  195.         move.b  #0,d0
  196.         bsr     send        
  197.         move.b  #0,d0
  198.         bsr     send
  199.         move.b  #20,d0
  200.         bsr     send
  201.  
  202.         move.b  iffx+2,d0       ;xres
  203.         bsr     send
  204.         move.b  iffx+3,d0
  205.         bsr     send
  206.                 
  207.         move.b  iffy+2,d0       ;yres
  208.         bsr     send
  209.         move.b  iffy+3,d0
  210.         bsr     send
  211.         
  212.         move.b  #0,d0           ;x location
  213.         bsr     send
  214.         move.b  #0,d0
  215.         bsr     send        
  216.         
  217.         move.b  #0,d0           ;y location
  218.         bsr     send
  219.         move.b  #0,d0
  220.         bsr     send
  221.         
  222.         btst    #0,flag         ;is it color or b&w?
  223.         bne     bmhd1           ;1=color, 0=b&w
  224.         
  225.         move.b  #1,d0           ;bitplanes in b&w image = 1
  226.         bra     bmhd2
  227. bmhd1:  move.b  #4,d0           ;bitplanes in color image = 4
  228. bmhd2:  bsr     send
  229.         
  230.         move.b  #0,d0           ;masking        (0=none)
  231.         bsr     send
  232.         
  233.         move.b  #1,d0           ;compression    (1=Run Lenght compressed)
  234.         tst.l   cbuf            ;is the compression buffer available?
  235.         bne     bmhd3           ;yes, so use it
  236.         move.b  #0,d0           ;no, so don't use it
  237. bmhd3:  bsr     send
  238.         
  239.         move.b  #0,d0           ;pad byte
  240.         bsr     send
  241.         
  242.         move.b  #0,d0           ;transparent color
  243.         bsr     send
  244.         move.b  #0,d0
  245.         bsr     send        
  246.         
  247.         move.b  #10,d0          ;xaspect
  248.         bsr     send
  249.         
  250.         move.b  #11,d0          ;yaspect
  251.         bsr     send
  252.         
  253.         move.b  xpage,d0        ;x source page size
  254.         bsr     send
  255.         move.b  xpage+1,d0
  256.         bsr     send
  257.                 
  258.         move.b  ypage,d0        ;y source page size
  259.         bsr     send
  260.         move.b  ypage+1,d0
  261.         bsr     send
  262.         
  263.         
  264.         lea     cmap,a0 ;output CMAP chunk
  265.         bsr     sendline
  266.         
  267.         btst    #0,flag         ;is it a color or b&w picture?
  268.         bne     color1
  269.     
  270.         move.b  #0,d0           ;length
  271.         bsr     send
  272.         move.b  #0,d0
  273.         bsr     send        
  274.         move.b  #0,d0
  275.         bsr     send
  276.         move.b  #6,d0
  277.         bsr     send            
  278.  
  279.         move.b  #255,d0         ;white - red
  280.         bsr     send
  281.         move.b  #255,d0         ;white - green
  282.         bsr     send        
  283.         move.b  #255,d0         ;white - blue
  284.         bsr     send
  285.         
  286.         move.b  #0,d0           ;black - red
  287.         bsr     send
  288.         move.b  #0,d0           ;black - green
  289.         bsr     send        
  290.         move.b  #0,d0           ;black - blue
  291.         bsr     send
  292.         
  293.         bra     camg1    
  294.  
  295. color1: move.b  #0,d0           ;length
  296.         bsr     send
  297.         move.b  #0,d0
  298.         bsr     send        
  299.         move.b  #0,d0
  300.         bsr     send
  301.         move.b  #48,d0
  302.         bsr     send
  303.         
  304.         move.w  #47,d1
  305.         lea     colormap,a0
  306.  
  307. cmap1:  move.b  (a0)+,d0         ;send out color palette data
  308.         move.l  a0,-(sp)
  309.         move.w  d1,-(sp)
  310.         bsr     send
  311.         move.w  (sp)+,d1
  312.         move.l  (sp)+,a0
  313.         dbf     d1,cmap1
  314.         
  315. camg1:  lea     camg,a0         ;output a CAMG chunk
  316.         bsr     sendline
  317.          
  318.         move.b  #0,d0           ;length
  319.         bsr     send
  320.         move.b  #0,d0
  321.         bsr     send        
  322.         move.b  #0,d0
  323.         bsr     send
  324.         move.b  #4,d0
  325.         bsr     send 
  326.         
  327.         move.b  #0,d0           ;data
  328.         bsr     send
  329.         move.b  #0,d0
  330.         bsr     send        
  331.         move.b  grmode,d0
  332.         bsr     send
  333.         move.b  grmode+1,d0
  334.         bsr     send       
  335.  
  336. body1:  lea     body,a0 ;output BODY chunk header
  337.         bsr     sendline
  338.         
  339.         move.b  bodylen,d0           ;length of body
  340.         bsr     send 
  341.         move.b  bodylen+1,d0
  342.         bsr     send        
  343.         move.b  bodylen+2,d0
  344.         bsr     send
  345.         move.b  bodylen+3,d0
  346.         bsr     send
  347.         clr.l   bodylen
  348.  
  349.     bra    prtok
  350.  
  351.  
  352. ******************************************
  353. * about to print a new tile for the page *
  354. ******************************************
  355. p_bgntile:
  356.     bra    prtok
  357.  
  358.  
  359. ********************************
  360. * print a block to the printer *
  361. ********************************
  362. p_block:
  363.     move.l    table,a0
  364.     move.l    pblockw(a0),width
  365.         move.l  pblockplane(a0),pplane
  366.     move.l    pblockptr(a0),a1
  367.     move.l    (a1),a1
  368.     add.l    pblockoff(a0),a1
  369.     move.l    a1,v_base       ;do the first plane (yellow)
  370.  
  371.         move.l  width,d1                ;width = width of whole page
  372.     move.l    v_base,a0
  373.         tst.l   cbuf
  374.         beq     putln1
  375.         clr.l   clen
  376.         clr.l   ulen
  377.         move.l  d1,d0
  378.         bsr     compit
  379.         move.l  d0,d1
  380.         move.l  d0,width
  381.         move.l  cbuf,a0
  382.         move.l  (a0),a0
  383.         
  384. putln1:    move.b    (a0)+,d0
  385.     move.l    a0,-(sp)
  386.     move.l    d1,-(sp)
  387.     bsr    send
  388.     move.l    (sp)+,d1
  389.     move.l    (sp)+,a0
  390.     subq.l    #1,d1
  391.     bne    putln1
  392.         
  393.         move.l  bodylen,d0
  394.         add.l   width,d0
  395.         move.l  d0,bodylen
  396.         
  397.         btst    #0,width
  398.         beq     ptln11
  399.         move.b  #0,d0           ;make sure to end on a word
  400.         bsr     send
  401.         addq.l  #1,bodylen
  402.         
  403. ptln11: btst    #0,flag         ;is it color?
  404.         beq     putln5          ;no - only 1 bitplane so exit
  405.         
  406.         move.l  v_base,a0
  407.         move.l  pplane,d0
  408.         add.l   d0,a0           ;move to the magenta plane
  409.         tst.l   cbuf
  410.         beq     putln2
  411.         clr.l   clen
  412.         clr.l   ulen
  413.         move.l    table,a1
  414.     move.l    pblockw(a1),d0
  415.         move.l  d0,width
  416.         bsr     compit
  417.         move.l  d0,width
  418.         move.l  cbuf,a0
  419.         move.l  (a0),a0
  420.         
  421.         move.l  width,d1                ;width = width of whole page
  422. putln2:    move.b    (a0)+,d0
  423.     move.l    a0,-(sp)
  424.     move.l    d1,-(sp)
  425.     bsr    send
  426.     move.l    (sp)+,d1
  427.     move.l    (sp)+,a0
  428.     subq.l    #1,d1
  429.     bne    putln2
  430.         
  431.         move.l  bodylen,d0
  432.         add.l   width,d0
  433.         move.l  d0,bodylen
  434.         
  435.         btst    #0,width
  436.         beq     ptln30
  437.         move.b  #0,d0           ;make sure to end on a word
  438.         bsr     send  
  439.         addq.l  #1,bodylen
  440.  
  441. ptln30: move.l  v_base,a0
  442.         move.l  pplane,d0
  443.         add.l   d0,a0           ;move to the cyan plane
  444.         add.l   d0,a0
  445.         
  446.         tst.l   cbuf
  447.         beq     putln3
  448.         clr.l   clen
  449.         clr.l   ulen
  450.         move.l    table,a1
  451.     move.l    pblockw(a1),d0
  452.         move.l  d0,width        
  453.         bsr     compit
  454.         move.l  d0,width
  455.         move.l  cbuf,a0
  456.         move.l  (a0),a0
  457.         
  458.         move.l  width,d1                ;width = width of whole page
  459. putln3:    move.b    (a0)+,d0
  460.     move.l    a0,-(sp)
  461.     move.l    d1,-(sp)
  462.     bsr    send
  463.     move.l    (sp)+,d1
  464.     move.l    (sp)+,a0
  465.     subq.l    #1,d1
  466.     bne    putln3
  467.         
  468.         move.l  bodylen,d0
  469.         add.l   width,d0
  470.         move.l  d0,bodylen
  471.         
  472.         btst    #0,width
  473.         beq     ptln40
  474.         move.b  #0,d0           ;make sure to end on a word
  475.         bsr     send
  476.         addq.l  #1,bodylen
  477.         
  478. ptln40: move.l  v_base,a0
  479.         move.l  pplane,d0
  480.         add.l   d0,a0           ;move to the black plane
  481.         add.l   d0,a0
  482.         add.l   d0,a0
  483.         tst.l   cbuf
  484.         beq     putln4
  485.         clr.l   clen
  486.         clr.l   ulen
  487.         move.l    table,a1
  488.     move.l    pblockw(a1),d0
  489.         move.l  d0,width
  490.         bsr     compit
  491.         move.l  d0,width
  492.         move.l  cbuf,a0
  493.         move.l  (a0),a0
  494.         
  495.         move.l  width,d1                ;width = width of whole page
  496. putln4:    move.b    (a0)+,d0
  497.     move.l    a0,-(sp)
  498.     move.l    d1,-(sp)
  499.     bsr    send
  500.     move.l    (sp)+,d1
  501.     move.l    (sp)+,a0
  502.     subq.l    #1,d1
  503.     bne    putln4
  504.         
  505.         move.l  bodylen,d0
  506.         add.l   width,d0
  507.         move.l  d0,bodylen
  508.         
  509.         btst    #0,width
  510.         beq     putln5
  511.         move.b  #0,d0           ;make sure to end on a word
  512.         bsr     send
  513.         addq.l  #1,bodylen
  514.                 
  515. putln5:    bra    prtok
  516.        
  517.  
  518. *****************************************  
  519. * just finished describing current tile *
  520. *****************************************
  521. p_endtile:
  522.         bra     prtok
  523.  
  524.  
  525. ****************************************************
  526. * just finished describing all tiles for this page *
  527. ****************************************************
  528. p_endpage:
  529.         tst.l   cbuf
  530.         beq     ep0
  531.         
  532.         move.l  table,a1
  533.         move.l  m_delete(a1),a1
  534.         move.l  cbuf,a0
  535.         jsr     (a1)
  536.         clr.l   cbuf
  537.         
  538. ep0:    btst    #0,flag         ;is this a color file?
  539.         bne     ep1             ;yes
  540.         
  541.         move.l  bodylen,d0
  542.         add.l   #66,d0
  543.         move.l  #66,bodyseek
  544.         move.l  d0,formlen
  545.         bra     ep2
  546.         
  547. ep1:    move.l  bodylen,d0
  548.         add.l   #108,d0
  549.         move.l  #108,bodyseek
  550.         move.l  d0,formlen
  551.         
  552. ep2:    move.l  table,a0
  553.         move.l  pfseek(a0),a0
  554.         move.l  #4,d0
  555.         jsr     (a0)
  556.         
  557.         move.b  formlen,d0      ;length of form
  558.         bsr     send
  559.         move.b  formlen+1,d0
  560.         bsr     send        
  561.         move.b  formlen+2,d0
  562.         bsr     send
  563.         move.b  formlen+3,d0
  564.         bsr     send
  565.         
  566.         move.l  table,a0
  567.         move.l  pfseek(a0),a0
  568.         move.l  bodyseek,d0
  569.         addq.l  #4,d0
  570.         jsr     (a0)
  571.         
  572.         move.b  bodylen,d0      ;length of body
  573.         bsr     send
  574.         move.b  bodylen+1,d0
  575.         bsr     send        
  576.         move.b  bodylen+2,d0
  577.         bsr     send
  578.         move.b  bodylen+3,d0
  579.         bsr     send
  580.         
  581.         bra    prtok
  582.  
  583.  
  584. ************************************
  585. * finished printing the document   *
  586. ************************************
  587. p_enddoc:
  588.     bra    prtok
  589.  
  590.  
  591. ***************************
  592. * user stopped printing   *
  593. ***************************
  594. p_break:
  595.     bra    p_endtile
  596.  
  597.  
  598. ***************************************************
  599. ***    these are the send routines for the    ***
  600. ***    dot matrix driver.            ***
  601. ***************************************************
  602. sendline:
  603.     move.b    (a0)+,d0
  604.     beq    prtok
  605.     move.l    a0,-(sp)
  606.     bsr    send
  607.     move.l    (sp)+,a0
  608.     bra    sendline
  609.  
  610.         
  611. ***********************************
  612. ***                             ***
  613. ***********************************
  614. send:    jmp    $ffffff         ;address is modified to be send(a0)
  615.                                 ;by init code.
  616.  
  617. ************************************************
  618. **   compress the data going to the file      **
  619. ************************************************
  620. compit:
  621.         move.l  cbuf,a2         ;get address of compression buffer
  622.         move.l  (a2),a2
  623.         clr.l   d1              ;zero out the length counter
  624.         clr.l   d3              ;zero out the total length counter
  625.         
  626. cmpt2:  subq.l  #1,d0           ;am I out of data yet? (exit when d0 = -1)
  627.         bmi     cmpt3           ;yes
  628.         
  629.         move.b  (a0)+,d2        ;get a byte from the input data
  630.         cmp.b   (a0),d2         ;check the prev byte against the next byte
  631.         beq     crun            ;if equal do compressed run
  632.         
  633.         ;uncompressed run
  634. urun:   bsr     crun1           ;check for compressed run needing output
  635.         lea     ubuf,a3         ;stuff uncompressed byte into ubuf
  636.         move.l  ulen,d4
  637.         move.b  d2,0(a3,d4.l)
  638.         addq.l  #1,ulen
  639.         cmp.l   #128,ulen       ;have I filled the ubuf?
  640.         bcs     cmpt2           ;no, so keep going
  641.         bsr     urun1           ;yes, so output the ubuf
  642.         btst    #31,d0          ;did I finish a row?
  643.         beq     cmpt2           ;no, so get another
  644.         bra     cmpt3           ;get out
  645.         
  646.         ;mini-subroutine to output the ubuf
  647. urun1:  tst.l   ulen            ;any data to output?
  648.         beq     urun3           ;no, so exit
  649.         move.l  ulen,d4         ;output coded length of uncompressed run
  650.         subq.l  #1,d4
  651.         move.b  d4,(a2)+
  652.         lea     ubuf,a3         ;output uncompressed run bytes
  653. urun2:  move.b  (a3)+,(a2)+
  654.         dbf     d4,urun2
  655.         addq.l  #1,d3           ;add 1 for length code to total length
  656.         add.l   ulen,d3         ;add in for the bytes output to total length
  657.         clr.l   ulen            ;reset string length for next urun
  658. urun3:  rts
  659.  
  660. crun:   bsr     urun1           ;output ubuf if any data is there
  661.         move.b  d2,cchar        ;save compressed data byte
  662.         addq.l  #1,clen         ;add 1 to the length
  663.         cmp.l   #128,clen       ;have i done the max count yet?
  664.         bcs     cmpt2           ;no, so keep checking
  665.         bsr     crun1           ;output compressed codes
  666.         btst    #31,d0          ;did I finish a row?
  667.         beq     cmpt2           ;no, so get another
  668.         bra     cmpt3           ;get out
  669.  
  670.         ;mini-subroutine to output compressed stuff
  671. crun1:  tst.l   clen
  672.         beq     crun2
  673.         move.l  clen,d4
  674.         subq.l  #1,d4           ;output compressed data
  675.         neg.b   d4
  676.         move.b  d4,(a2)+        ;output the code for a $FF run
  677.         move.b  cchar,(a2)+     ;output the compressed data
  678.         addq.l  #2,d3           ;add two to the total length counter
  679.         clr.l   clen            ;reset the compressed length
  680. crun2:  rts
  681.         
  682.         
  683. cmpt3:  bsr     urun1           ;output ubuf if any data is there
  684.         bsr     crun1           ;output compression code if any
  685.         move.l  d3,d0
  686.         rts
  687.                                 
  688.  
  689.  
  690. ***********************************
  691. ***********************************
  692. ***********************************
  693.  SECTION printer,DATA,PUBLIC
  694.  
  695. prntbl:    dc.l    prtok,prtok,prtok,prtok,p_init
  696.     dc.l    p_bgndoc,p_bgnpage,p_bgntile
  697.     dc.l    p_block
  698.     dc.l    p_endtile,p_endpage,p_enddoc
  699.     dc.l    p_break,p_ident
  700.  
  701. xdpi_tbl:       dc.w    65,75,100,150,200,200,300
  702. ydpi_tbl:       dc.w    55,75,100,150,100,200,300
  703. minl_tbl:    dc.w    0,0,0,0,0,0,0
  704. minr_tbl:    dc.w    0,0,0,0,0,0,0
  705. ;maxw_tbl:    dc.w    640,864,1088,1536,1712,1712,2560
  706. maxw_tbl:    dc.w    0,0,0,0,0,0,0
  707. maxh_tbl:       dc.w    0,0,0,0,0,0,0
  708. mint_tbl:    dc.w    0,0,0,0,0,0,0
  709. minb_tbl:    dc.w    0,0,0,0,0,0,0
  710. xover_tbl:    dc.w    0,0,0,0,0,0,0
  711. yover_tbl:    dc.w    0,0,0,0,0,0,0
  712. rowht_tbl:    dc.w    1,1,1,1,1,1,1
  713. rows_tbl:    dc.w    1,1,1,1,1,1,1
  714.  
  715. pagexres:       dc.w    640,640,640,640,640,640,640
  716. pageyres:       dc.w    400,400,400,400,200,400,400
  717.  
  718. grmode_tbl:    dc.w    $8004,$8004,$8004,$8004,$8000,$8004,$8004
  719.  
  720. cchar:          dc.b    0,0
  721.  
  722. driver:        dc.b    "IFF File v2.1.0",0
  723.  
  724. colortag1:      dc.b    "COLOR",0
  725. colortag2:      dc.b    "color",0
  726.  
  727. form:           dc.b    "FORM",0
  728. ilbm:           dc.b    "ILBM",0
  729. bmhd:           dc.b    "BMHD",0
  730. camg:           dc.b    "CAMG",0
  731. cmap:           dc.b    "CMAP",0
  732. clut:           dc.b    "CLUT",0
  733. body:           dc.b    "BODY",0
  734.  
  735. colormap:       dc.b    255,255,255     ;white
  736.                 dc.b    0,255,255       ;cyan
  737.                 dc.b    255,0,255       ;magenta
  738.                 dc.b    0,0,255         ;blue
  739.                 dc.b    255,255,0       ;yellow
  740.                 dc.b    0,255,0         ;green
  741.                 dc.b    255,0,0         ;red
  742.                 dc.b    0,0,0           ;black
  743.                 dc.b    0,0,0           ;black-white (grey - actually black)
  744.                 dc.b    0,128,128       ;black-cyan
  745.                 dc.b    128,0,128       ;black-magenta
  746.                 dc.b    0,0,128         ;black-blue
  747.                 dc.b    128,128,0       ;black-yellow
  748.                 dc.b    0,128,0         ;black-green
  749.                 dc.b    128,0,0         ;black-red
  750.                 dc.b    0,0,0           ;black-black
  751.                 
  752.  
  753.  SECTION printer,BSS,PUBLIC
  754. table:        ds.l    1
  755. twidth:        ds.w    1
  756. pixel:        ds.w    1
  757. v_base:        ds.l    1
  758. lineptr:    ds.l    1
  759. width:        ds.l    1
  760. count:        ds.w    1
  761. grmode:        ds.w    1
  762. rows:        ds.w    1
  763. rowht:        ds.w    1
  764. iffx:           ds.l    1
  765. iffy:           ds.l    1
  766. xpage:          ds.w    1
  767. ypage:          ds.w    1
  768. formlen:        ds.l    1
  769. bodylen:        ds.l    1
  770. flag:           ds.w    1
  771. pplane:         ds.l    1
  772. ulen:           ds.l    1
  773. clen:           ds.l    1
  774. cbuf:           ds.l    1
  775. bodyseek:       ds.l    1
  776. ubuf:           ds.b    130
  777.  
  778.  
  779. ********************************** changes *****************************
  780. ;
  781. ;       version 2.1.0
  782. ;       
  783. ;       - added support for compressed IFF files
  784. ;
  785. ;       - fixed a bug in determining the Width and Height of the area to print
  786. ;         (it wasn't using the most reliable values from PageStream)
  787. ;       
  788. ;       version 2.0.1   (uploaded 9/25/90)
  789. ;
  790. ;       - bug fix that caused bad iff's on res 1,2,4,7.
  791. ;         the form and body len values did not include the extra byte
  792. ;         needed for odd length rows.
  793. ;
  794. ;       - bug fix that caused all b&w iff outputs to be bad - wrong value
  795. ;         added to form len for all other chunks.
  796. ;
  797. ;       - now outputs a CAMG chunk for B&W pictures
  798. ;
  799. ;       - option 5 (200x100) now produces a 640x200 iff file.
  800. ;         (before it was a 640x400 iff file)
  801. ;
  802. ;
  803. ;       version 2.0.0
  804. ;
  805. ;       - initial release
  806.