home *** CD-ROM | disk | FTP | other *** search
/ Fish 'n' More 2 / fishmore-publicdomainlibraryvol.ii1991xetec.iso / dirs / iff2ansi_449.lzh / Iff2Ansi / IFF2ANSI.s < prev    next >
Text File  |  1991-02-02  |  13KB  |  690 lines

  1. ; IFF-to-ANSI V0.1        Sourcecode (Buddha's MasterSeka rules)
  2. ; active font should be TOPAZ 80 (no 60 char display, please...)
  3. ; this one really NEEDS the genious 'Req.library' !
  4. ;
  5. ; programmed by Carnivore/BeerMacht
  6. ; on 9-Nov-1990
  7. ;
  8. ; I declare executable and sourcecode as 100% FreeWare
  9. ;
  10. ; Notes:TOPLINE below 12 changes to borderless window
  11. ;       take care of the HEIGHT value to prevent text beeing written
  12. ;       below the bottomline (NTSC?) if no borderless window is set
  13. ;
  14.  
  15. CloseLibrary        = -414
  16. OldOpenLibrary        = -408
  17.  
  18. Close            = -36
  19. Open            = -30
  20. Output            = -60
  21. Read            = -42
  22. Write            = -48
  23.  
  24. FileRequester        = -$54
  25. GetLong            = -$b4
  26.  
  27. dsize    = 130
  28. fchars    = 30
  29. wildlen    = 30
  30.  
  31. maxiffsize = 20000    ;iff bufsize
  32.  
  33. run:    move.l 4.w,a6
  34.     lea reqname(pc),a1
  35.     jsr OldOpenLibrary(a6)
  36.     move.l d0,reqbase
  37.     beq.L noreq        ;the errormessages down here are
  38.                 ;quite poor, but who cares...
  39.  
  40.     move.l d0,a0
  41.     move.l $26(a0),dosbase
  42.     move.l dosbase(pc),a6
  43.     jsr Output(a6)
  44.     move.l d0,d1
  45.     beq.s noclihd
  46.     lea clitxt(pc),a2
  47.     move.l a2,d2
  48.     move.l #clilen,d3
  49.     jsr Write(a6)
  50.  
  51. noclihd:move.l reqbase(pc),a6
  52.     lea fileload(pc),a0
  53.     jsr FileRequester(a6)
  54.     tst.l d0
  55.     beq.L nofile
  56.  
  57.     move.l dosbase(pc),a6
  58.     lea frpath(pc),a0
  59.     move.l a0,d1
  60.     move.l #1005,d2
  61.     jsr Open(a6)
  62.     move.l d0,srchd
  63.     beq.L notfnd
  64.     move.l d0,d1
  65.     move.l #iffdata,d2
  66.     move.l #maxiffsize,d3
  67.     jsr Read(a6)
  68.  
  69.     move.l srchd(pc),d1
  70.     jsr Close(a6)
  71.  
  72.     lea iffdata,a0
  73.     cmp.l #"FORM",(a0)
  74.     bne.L noiff
  75.     bsr.L iffsize
  76.  
  77.     cmp.b #1,d0    ;#planes
  78.     bne.L toomany
  79.     move.w d1,bytes
  80.     cmp.w #40,d1
  81.     bhi.L toowide
  82.     moveq #40,d0
  83.     sub.w d1,d0
  84.     lsl.w #3,d0    ;center ansipic 
  85.     move.w d0,leftoff
  86.  
  87.     move.w d2,hgtreq+4+2    ;default    
  88.  
  89.     lea iffdata,a0
  90.     lea bpltab,a1
  91.     lea coltab,a2
  92.     clr.l d0
  93.     bsr.l iffunpack
  94.  
  95.     move.l reqbase(pc),a6
  96.     lea topreq(pc),a0
  97.     jsr GetLong(a6)
  98.     tst.l d0
  99.     beq.L notop
  100.     move.w topreq+16+2(pc),d0
  101.     move.b d0,linenum
  102.     sub.w d0,hgtreq+12+2        ;max
  103.     move.w hgtreq+12+2(pc),d0    ;max
  104.     cmp.w hgtreq+4+2(pc),d0        ;default
  105.     bhi.s sizeok
  106.     move.w d0, hgtreq+4+2        ;default
  107.  
  108. sizeok:    lea hgtreq(pc),a0
  109.     jsr GetLong(a6)
  110.     tst.l d0
  111.     beq.s nohgt
  112.     move.w hgtreq+16+2(pc),lines
  113.  
  114.     lea csrreq(pc),a0
  115.     jsr GetLong(a6)
  116.     tst.l d0
  117.     beq.s nocsr
  118.     move.w csrreq+16+2(pc),csrrow
  119.  
  120. bsr.L doansi
  121. move.l a0,d7    ;a0:length
  122. ;;;
  123.  
  124.     lea filesave(pc),a0
  125.     jsr FileRequester(a6)
  126.     tst.l d0
  127.     beq.s nosav
  128.  
  129.     move.l dosbase(pc),a6
  130.     lea frpath(pc),a0
  131.     move.l a0,d1
  132.     move.l #1006,d2
  133.     jsr Open(a6)
  134.     move.l d0,desthd
  135.     beq.s notwr
  136.     move.l d0,d1
  137.     move.l #ansibuf,d2
  138.     move.l d7,d3    ;length
  139.     jsr Write(a6)
  140.  
  141.     move.l desthd(pc),d1
  142.     jsr Close(a6)
  143.  
  144.     moveq #-1,d0
  145.     lea $dff006,a0
  146. raul:    move.w (a0),$180-6(a0)    ;blink if no error (??)
  147.     dbf d0,raul
  148.  
  149. notwr:
  150. nosav:
  151.  
  152. nocsr:
  153. nohgt:
  154. notop:
  155.  
  156. toowide:
  157. toomany:
  158.  
  159. noiff:
  160.  
  161. notfnd:
  162. nofile:    
  163.  
  164. allesok:move.l 4.w,a6
  165.     move.l reqbase(pc),a1
  166.     jsr CloseLibrary(a6)
  167. noreq:    clr.l d0
  168.     rts
  169.  
  170. doansi:    sf inv
  171.     lea ansibuf,a0
  172.     lea bpl1,a1
  173.  
  174.     move.l #$9b302070,(a0)+    ;cursor off
  175.  
  176.     move.w #$9b30,(a0)+
  177.     move.w #$6d20,(a0)+    ;reset txtmode
  178.  
  179.     move.w leftoff(pc),d1    ;borderless if pic is wide
  180.     cmp.w #16,d1
  181.     bls.s nobord
  182.  
  183.     cmp.b #12-1,linenum    ;borderless if topline <12
  184.     bhi.s topok
  185.  
  186. nobord:    move.l #$9b333274,(a0)+    ;32 row
  187.  
  188.     move.l #$9b383175,(a0)+    ;set linelength 81 if full width
  189.  
  190.     move.b #$9b,(a0)+    ;clr window top if topline < 12
  191.     move.b #"0",(a0)+
  192.     move.b #$79,(a0)+    ;pix top
  193.     move.b #$9b,(a0)+    ;clr window top if topline < 12
  194.     move.b #"0",(a0)+
  195.     move.b #$78,(a0)+    ;pix left
  196.  
  197. topok:    move.b #12,(a0)+    ;clrscr again (for borderless)
  198.  
  199.     move.b #$9b,(a0)+
  200.     bsr.L dodez
  201.     move.b #$78,(a0)+    ;pix left
  202.  
  203.     move.w lines(pc),d4
  204. linelp:    bsr.L doline
  205.     move.b #13,(a0)+
  206.  
  207.     subq.w #1,d4
  208.     bmi.L endpic
  209.  
  210.     move.l a1,a3
  211.     move.w bytes(pc),bytenum
  212.     
  213.     move.w bytes(pc),d0
  214.     move.l a1,a4
  215.     sub.w d0,a4        ;previous line
  216.     subq.w #1,d0
  217.     move.l a1,a2
  218.     moveq #-1,d1
  219. cntspc:    addq.l #1,d1
  220.     tst.b (a4)+    ;dots in previous line?
  221.     bne.s clrprev
  222.     tst.b (a2)+
  223.     dbne d0,cntspc
  224.     tst.w d0
  225.     bmi.s clrrest
  226. clrprev:tst.l d1
  227.     beq.s nospc
  228.     cmp.b #1,d1    ;8dots=2spc <3chrs
  229.     beq.s nospc    
  230.     add.w d1,a3
  231.     sub.w d1,bytenum
  232.     add.w d1,d1
  233.  
  234.     move.b #$9b,(a0)+
  235.     bsr.L dodez
  236.     move.b #$43,(a0)+    ;cursor n right
  237. nospc:
  238.  
  239. bitline:subq.w #1,bytenum
  240.     bmi.s endline        ;all bytes converted
  241.     clr.w d2
  242.     move.b (a3),d2
  243.     lsr.b #4,d2        ;left 4 bits
  244.     bsr.L donibb
  245.     move.b (a3)+,d2
  246.     and.w #$000f,d2
  247.     bsr.L donibb
  248.  
  249.     move.w bytenum(pc),d0
  250.     subq.w #1,d0
  251.     bmi.s bitline
  252.     move.l a3,a2        ;check rest of line for bits
  253.     move.l a3,a4
  254.     sub.w bytes(pc),a4    ;previous line
  255.     sf d2
  256. chkline:tst.b (a4)+
  257.     beq.s isok
  258.     st d2            ;dots in previous line!
  259. isok:    tst.b (a2)+
  260.     dbne d0,chkline
  261.     tst.w d0
  262.     bpl.s bitline
  263.     tst.b d2
  264.     beq.s isclr
  265. clrrest:move.b #$9b,(a0)+
  266.     move.b #$4b,(a0)+    ;clr rest of line
  267. isclr:
  268.  
  269. endline:add.w bytes(pc),a1
  270.     bra.L linelp
  271.  
  272. endpic:    move.b #$9b,(a0)+    ;Yoe! I'm too lasy to do it better
  273.     move.b #$4d,(a0)+    ;clrline
  274.     move.b #$9b,(a0)+
  275.     move.b #$74,(a0)+    ;line num reset
  276.     move.b #$9b,(a0)+
  277.     move.b #$75,(a0)+    ;line length reset
  278.     move.b #$9b,(a0)+
  279.     move.b #$78,(a0)+    ;pix left reset
  280.     move.b #$9b,(a0)+
  281.     move.b #$79,(a0)+    ;pix top reset
  282.     move.b #$9b,(a0)+    ;normal video
  283.     move.b #"0",(a0)+
  284.     move.b #"m",(a0)+
  285.     move.b #$9b,(a0)+    ;cursor row
  286.     move.w csrrow(pc),d1
  287.     bsr.s dodez
  288.     move.b #$48,(a0)+
  289.     move.b #$9b,(a0)+    ;cursor on
  290.     move.b #" ",(a0)+
  291.     move.b #$70,(a0)+
  292.     lea ansibuf,a1
  293.     sub.l a1,a0        ;length of ansitxt
  294.     rts
  295.  
  296. doline:    move.b #$9b,(a0)+    ;$9b,nnn,$79
  297.     clr.w d1
  298.     move.b linenum(pc),d1
  299.     bsr.s dodez
  300.     move.b #$79,(a0)+
  301.     addq.b #1,linenum
  302.     rts
  303.  
  304. dodez:    sf d0
  305.     ext.l d1
  306.     divu #100,d1
  307.     tst.w d1
  308.     beq.s no100
  309.     st d0
  310.     add.b #"0",d1
  311.     move.b d1,(a0)+
  312.     clr.w d1
  313. no100:    swap d1
  314.     divu #10,d1
  315.     tst.b d0
  316.     bne.s is10
  317.     tst.w d1
  318.     beq.s no10
  319. is10:    add.b #"0",d1
  320.     move.b d1,(a0)+
  321. no10:    swap d1
  322.     add.b #"0",d1
  323.     move.b d1,(a0)+
  324.     rts
  325.  
  326. donibb:    lsl.b #3,d2        ;*8
  327.     lea tab(pc),a2        ;chartab normal
  328.     tst.b inv
  329.     beq.s notinv
  330.     lea tab2(pc),a2        ;chartab inverse
  331. notinv:    cmp.b #"7",1(a2,d2.w)
  332.     bne.s nochg
  333.     st inv
  334. nochg:    cmp.b #"0",1(a2,d2.w)
  335.     bne.s nochg2
  336.     sf inv
  337. nochg2:
  338. seqloop:move.b (a2,d2.w),d0    ;copy char/ansisequence
  339.     beq.s endseq
  340.     move.b d0,(a0)+
  341.     addq.w #1,d2
  342.     bra.s seqloop
  343. endseq:    rts
  344.     
  345. ; Name:    iffsize (used with Tristar's kind permission?)
  346. ; In:    a0.l=Zeiger auf iffpic
  347. ; Out:    d0.w=Anzahl Planes
  348. ;    d1.w=Bytes pro Zeile
  349. ;    d2.w=Anzahl Zeilen
  350.  
  351. iffsize:    move.l    a0,-(sp)
  352.     add.w    #12,a0
  353. iffsize0:    cmp.l    #'BMHD',(a0)
  354.     beq.s    iffsize1
  355.     move.l    4(a0),d0
  356.     lea    8(a0,d0.l),a0
  357.     bra.s    iffsize0
  358. iffsize1:    move.w    8(a0),d1
  359.     move.w    d1,d2
  360.     lsr.w    #4,d1
  361.     and.w    #15,d2
  362.     beq.s    iffsize2
  363.     addq.w    #1,d1
  364. iffsize2:    add.w    d1,d1
  365.     move.w    10(a0),d2
  366.     moveq    #0,d0
  367.     move.b    16(a0),d0
  368.     move.l    (sp)+,a0
  369.     rts
  370.  
  371. ; iffunpack (used with Tristar's kind permission?)
  372. ; In:    a0.l=Zeiger auf iffpic
  373. ;    a1.l=Zeiger auf Tabelle mit Zeigern auf die einzelnen
  374. ;         Planepuffer (wird nicht zerstoert)
  375. ;    a2.l=Zeiger auf Puffer fuer Farbwerte
  376. ;    d0.w=Offset, der (intern) auf a2 addiert wird, nachdem ein
  377. ;         Farbwert in den Puffer geschrieben wurde (normal=2,
  378. ;         fuer Copperliste=4)
  379. ; Out:    -
  380.  
  381. iffunpack:    movem.l    d0-d7/a0-a6,-(sp)
  382.     add.w    #12,a0
  383. iffunpack0:    cmp.l    #'BMHD',(a0)
  384.     beq.s    iffunpack1
  385.     move.l    4(a0),d1
  386.     lea    8(a0,d1.l),a0
  387.     bra.s    iffunpack0
  388. iffunpack1:    move.l    a0,a3
  389. iffunpack2:    cmp.l    #'CMAP',(a0)
  390.     beq.s    iffunpack3
  391.     move.l    4(a0),d1
  392.     lea    8(a0,d1.l),a0
  393.     bra.s    iffunpack2
  394. iffunpack3:    moveq    #1,d1
  395.     move.b    16(a3),d2
  396.     lsl.w    d2,d1
  397.     lea    8(a0),a4
  398.     bra.s    iffunpack5
  399. iffunpack4:    move.b    (a4)+,d2
  400.     lsl.w    #4,d2
  401.     and.w    #$0f00,d2
  402.     move.b    (a4)+,d2
  403.     and.w    #$0ff0,d2
  404.     move.b    (a4)+,d3
  405.     lsr.b    #4,d3
  406.     and.w    #$000f,d3
  407.     or.w    d3,d2
  408.     move.w    d2,(a2)
  409.     add.w    d0,a2
  410. iffunpack5:    dbf    d1,iffunpack4
  411. iffunpack6:    cmp.l    #'BODY',(a0)
  412.     beq.s    iffunpack7
  413.     move.l    4(a0),d0
  414.     lea    8(a0,d0.l),a0
  415.     bra.s    iffunpack6
  416. iffunpack7:    moveq    #0,d7
  417.     move.b    16(a3),d7
  418.     subq.w    #1,d7
  419.     moveq    #0,d0
  420.     move.w    d7,d1
  421. iffunpack8:    move.l    0(a1,d0.w),-(sp)
  422.     addq.w    #4,d0
  423.     dbf    d1,iffunpack8
  424.     move.w    d0,-(sp)
  425.     move.w    8(a3),d6
  426.     move.w    d6,d2
  427.     lsr.w    #4,d6
  428.     and.w    #15,d2
  429.     beq.s    iffunpack9
  430.     addq.w    #1,d6
  431. iffunpack9:    add.w    d6,d6
  432.     move.l    4(a0),d0
  433.     lea    8(a0,d0.l),a2
  434.     addq.l    #8,a0
  435. iffunpacka:    cmp.l    a2,a0
  436.     bge.s    iffunpackj
  437.     moveq    #0,d3
  438.     move.w    d7,d2
  439. iffunpackb:    move.l    0(a1,d3.l),a4
  440.     bsr.s    iffunpackc
  441.     move.l    a4,0(a1,d3.l)
  442.     addq.l    #4,d3
  443.     dbra    d2,iffunpackb
  444.     bra.s    iffunpacka
  445. iffunpackc:    lea    0(a4,d6.w),a5
  446. iffunpackd:    cmp.l    a5,a4
  447.     bge.s    iffunpackl
  448.     tst.b    18(a3)
  449.     bne.s    iffunpacke
  450.     move.w    d6,d0
  451.     bra.s    iffunpackg
  452. iffunpacke:    move.b    (a0)+,d0
  453.     ext.w    d0
  454.     bmi.s    iffunpackh
  455. iffunpackf:    move.b    (a0)+,(a4)+
  456. iffunpackg:    dbf    d0,iffunpackf
  457.     bra.s    iffunpackd
  458. iffunpackh:    neg.w    d0
  459.     move.b    (a0)+,d1
  460. iffunpacki:    move.b    d1,(a4)+
  461.     dbf    d0,iffunpacki
  462.     bra.s    iffunpackd
  463. iffunpackj:    move.w    (sp)+,d0
  464.     move.w    d7,d1
  465. iffunpackk:    subq.w    #4,d0
  466.     move.l    (sp)+,0(a1,d0.w)
  467.     dbf    d1,iffunpackk
  468.     movem.l (sp)+,d0-d7/a0-a6
  469. iffunpackl:    rts
  470. ; hang that bastard pope...
  471. fileload:dc.w 0    ;version
  472.     dc.l title
  473.     dc.l 0
  474.     dc.l 0
  475.     dc.l frpath
  476.     dc.l 0
  477.     dc.w 0
  478.     dc.w 14        ;numlines
  479.     dc.w 30        ;numcolumns
  480.     dc.w 12        ;devcolumns
  481.      dc.l $10+$40+$1000    ;hideinfo,absxy,save($1000=load)
  482.     dc.w 3        ;dircolor
  483.     dc.w 0        ;filecolor
  484.     dc.w 3        ;devcolor
  485.     dc.w 0        ;fontnamecolor
  486.     dc.w 0        ;fontsizecolor
  487.     dc.w 0        ;detailcolor
  488.     dc.w 0        ;blockcolor
  489.     dc.w 0
  490.     dc.w 0
  491.     dc.w 0
  492.     dc.w 0
  493.     dc.w 0
  494.     dc.w 0
  495.     blk.b 36,0
  496.     blk.l 3,0    ;datestamp
  497.     dc.w 3        ;wdleft
  498.     dc.w 11        ;wdtop
  499.     dc.w 0
  500.     dc.w 0
  501.     dc.l 0
  502.     blk.b wildlen+2,0
  503.     blk.b wildlen+2,0
  504.     dc.w 0
  505.     dc.w 0
  506.     dc.w 0
  507.     dc.w 0
  508.     dc.w 0
  509.     dc.w 0
  510.     dc.w 0
  511.     dc.w 0
  512.     dc.l 0
  513.     dc.l 0
  514.     dc.l 0
  515.     blk.b dsize+2,0
  516.     dc.l 0
  517.     dc.w 0
  518.     dc.w 0
  519.     dc.w 0
  520.     dc.w 0
  521. ; slaves of death, addicted to gore...
  522. filesave:dc.w 0    ;version
  523.     dc.l title2
  524.     dc.l 0
  525.     dc.l 0
  526.     dc.l frpath
  527.     dc.l 0
  528.     dc.w 0
  529.     dc.w 14        ;numlines
  530.     dc.w 30        ;numcolumns
  531.     dc.w 12        ;devcolumns
  532.      dc.l $10+$40+$800    ;hideinfo,absxy,save($1000=load)
  533.     dc.w 3        ;dircolor
  534.     dc.w 0        ;filecolor
  535.     dc.w 3        ;devcolor
  536.     dc.w 0        ;fontnamecolor
  537.     dc.w 0        ;fontsizecolor
  538.     dc.w 0        ;detailcolor
  539.     dc.w 0        ;blockcolor
  540.     dc.w 0
  541.     dc.w 0
  542.     dc.w 0
  543.     dc.w 0
  544.     dc.w 0
  545.     dc.w 0
  546.     blk.b 36,0
  547.     blk.l 3,0    ;datestamp
  548.     dc.w 3        ;wdleft
  549.     dc.w 11        ;wdtop
  550.     dc.w 0
  551.     dc.w 0
  552.     dc.l 0
  553.     blk.b wildlen+2,0
  554.     blk.b wildlen+2,0
  555.     dc.w 0
  556.     dc.w 0
  557.     dc.w 0
  558.     dc.w 0
  559.     dc.w 0
  560.     dc.w 0
  561.     dc.w 0
  562.     dc.w 0
  563.     dc.l 0
  564.     dc.l 0
  565.     dc.l 0
  566.     blk.b dsize+2,0
  567.     dc.l 0
  568.     dc.w 0
  569.     dc.w 0
  570.     dc.w 0
  571.     dc.w 0
  572. ; with my chainsaw in hand your death I command...
  573. topreq:    dc.l topname
  574.     dc.l 12        ;default
  575.     dc.l 0        ;min
  576.     dc.l 256    ;max
  577.     dc.l 0        ;result
  578.     dc.l 0
  579.     dc.w 0
  580.     dc.l 0
  581.     dc.l 0
  582. hgtreq:    dc.l hgtname
  583.     dc.l 0        ;default
  584.     dc.l 0        ;min
  585.     dc.l 256    ;max
  586.     dc.l 0        ;result
  587.     dc.l 0
  588.     dc.w 0
  589.     dc.l 0
  590.     dc.l 0
  591. csrreq:    dc.l csrname
  592.     dc.l 20        ;default
  593.     dc.l 1        ;min
  594.     dc.l 32        ;max
  595.     dc.l 0        ;result
  596.     dc.l 0
  597.     dc.w 0
  598.     dc.l 0
  599.     dc.l 0
  600.  
  601. bpltab:    dc.l bpl1
  602. coltab:    dc.w 0
  603. reqbase:dc.l 0
  604. bytes:    dc.w 0    ;# of bytes/gfxline
  605. lines:    dc.w 0    ;# of gfxlines
  606. leftoff:dc.w 0    ;# pixel to left border
  607. bytenum:dc.w 0    ;gfxbytecounter
  608. csrrow:    dc.w 0    ;row to put cursor at end of pic
  609. file:    dc.l 0
  610. dosbase:dc.l 0
  611. srchd:    dc.l 0    ;filehandle source
  612. desthd:    dc.l 0    ;filehandle dest
  613.  
  614. title:    dc.b "Select IFF-source (LORES, 1 bitplane) ",0
  615. title2:    dc.b "Select the filename of the ANSI-text  ",0
  616. frpath:    blk.b dsize+fchars+2,0
  617. hgtname:dc.b "Height of ANSIpic ",0
  618. topname:dc.b "Offset to TOPLINE ",0
  619. csrname:dc.b "Put cursor in ROW ",0
  620. reqname:dc.b "req.library",0    ;Yo! the only one, you NEED it.
  621. clitxt:    dc.b 12,$9b,"0;31;42m"
  622.     dc.b $9b,"49",$43
  623.     dc.b " IFF-to-ANSI V0.1  9-Nov-90 ",10
  624.     dc.b $9b,"49",$43
  625.     dc.b " a tool completely FreeWare ",10
  626.     dc.b $9b,"49",$43
  627.     dc.b "to convert a LORES-IFF-BRUSH",10
  628.     dc.b $9b,"49",$43
  629.     dc.b "into an optimised ANSI-text.",10
  630.     dc.b $9b,"49",$43
  631.     dc.b "Done by Carnivore/BeerMacht.",10
  632.     dc.b $9b,"49",$43
  633.     dc.b " Stoned greetings go to all ",10
  634.     dc.b $9b,"49",$43
  635.     dc.b " lovers of Diebels Alt and  ",10
  636.     dc.b $9b,"49",$43
  637.     dc.b " all those nice sick movies ",10
  638.     dc.b $9b,"49",$43
  639.     dc.b "(ILSA and Necromantic rule).",10
  640.     dc.b $9b,"0m"
  641. clilen=*-clitxt
  642. linenum:dc.b 0    ;gfxlinecounter
  643. inv:    dc.b 0    ;inverseflag: 0:normal,-1:inverse
  644.  
  645. tab:    dc.b " ",0,0,0,0,0,0,0        ;chartab for normal display
  646.     dc.b "/",0,0,0,0,0,0,0        ;TOPAZ 80 !!!
  647.     dc.b "(",0,0,0,0,0,0,0
  648.     dc.b $9b,"7m","L",0,0,0,0
  649.     dc.b ")",0,0,0,0,0,0,0
  650.     dc.b "ä",0,0,0,0,0,0,0
  651.     dc.b "0",0,0,0,0,0,0,0
  652.     dc.b $9b,"7m","\",0,0,0,0
  653.     dc.b "\",0,0,0,0,0,0,0
  654.     dc.b "V",0,0,0,0,0,0,0
  655.     dc.b $7f,0,0,0,0,0,0,0
  656.     dc.b $9b,"7m",")",0,0,0,0
  657.     dc.b "L",0,0,0,0,0,0,0
  658.     dc.b $9b,"7m","(",0,0,0,0
  659.     dc.b "B",0,0,0,0,0,0,0
  660.     dc.b $9b,"7m"," ",0,0,0,0
  661. ;don't deny the necrophile!
  662. tab2:    dc.b $9b,"0m"," ",0,0,0,0    ;chartab for inverse display
  663.     dc.b "B",0,0,0,0,0,0,0
  664.     dc.b $9b,"0m","(",0,0,0,0
  665.     dc.b "L",0,0,0,0,0,0,0
  666.     dc.b $9b,"0m",")",0,0,0,0
  667.     dc.b $7f,0,0,0,0,0,0,0
  668.     dc.b "V",0,0,0,0,0,0,0
  669.     dc.b "\",0,0,0,0,0,0,0
  670.     dc.b $9b,"0m","\",0,0,0,0
  671.     dc.b "0",0,0,0,0,0,0,0
  672.     dc.b "ä",0,0,0,0,0,0,0
  673.     dc.b ")",0,0,0,0,0,0,0
  674.     dc.b $9b,"0m","L",0,0,0,0
  675.     dc.b "(",0,0,0,0,0,0,0
  676.     dc.b "/",0,0,0,0,0,0,0
  677.     dc.b " ",0,0,0,0,0,0,0
  678.  
  679. dc.b "another sick BeerMacht production"
  680. data    ;3 MB are mine, so why bother with AllocMem?
  681. iffdata:blk.b maxiffsize,0    ;lores 
  682.  
  683. bplsecurity:
  684.     blk.b 40,0    ;line -1
  685. bpl1:    blk.b 16000,0    ;bitplanedata
  686.  
  687. ansibuf:blk.b $10000,0    ;ansi/destination
  688. ;
  689. ;Yo, this is the end...
  690.