home *** CD-ROM | disk | FTP | other *** search
/ Current Shareware 1994 January / SHAR194.ISO / pictures / mandzoom.zip / FRAC.S < prev    next >
Text File  |  1993-09-02  |  20KB  |  1,224 lines

  1.     .file    "frac.c"
  2. gcc2_compiled.:
  3. .globl _mand_data
  4. .data
  5.     .align 2
  6. _mand_data:
  7.     .long _array1
  8. .globl _other_data
  9.     .align 2
  10. _other_data:
  11.     .long _array2
  12. .globl _m_x1
  13.     .align 2
  14. _m_x1:
  15.     .long -13319411
  16. .globl _m_y1
  17.     .align 2
  18. _m_y1:
  19.     .long 10636271
  20. .globl _m_x2
  21.     .align 2
  22. _m_x2:
  23.     .long 8302812
  24. .globl _m_y2
  25.     .align 2
  26. _m_y2:
  27.     .long -5088882
  28. .globl _frame
  29.     .align 2
  30. _frame:
  31.     .long 0
  32. .text
  33.     .align 4
  34. .globl _FixedMul
  35. _FixedMul:
  36.     pushl %ebp
  37.     movl %esp,%ebp
  38. /APP
  39.     
  40.         movl 8(%ebp),%eax
  41.         imull 12(%ebp)
  42.         
  43.     shrd $22,%edx,%eax
  44. /NO_APP
  45.     movl %ebp,%esp
  46.     popl %ebp
  47.     ret
  48.     .align 4,0x90
  49.     .align 4
  50. .globl _FixedDiv
  51. _FixedDiv:
  52.     pushl %ebp
  53.     movl %esp,%ebp
  54. /APP
  55.     
  56.         movl 8(%ebp),%eax
  57.         movl %eax,%edx
  58.         
  59.     sar $10,%edx
  60.     shl $22,%eax
  61.     idivl 12(%ebp)
  62. /NO_APP
  63.     movl %ebp,%esp
  64.     popl %ebp
  65.     ret
  66.     .align 4,0x90
  67.     .align 4
  68. .globl _zoom
  69. _zoom:
  70.     pushl %ebp
  71.     movl %esp,%ebp
  72.     cmpl $0,16(%ebp)
  73.     je L3
  74.     cmpl $0,20(%ebp)
  75.     je L3
  76. /APP
  77.     
  78.         pushl %esi
  79.         pushl %edi
  80.         pushl %ebx
  81.         pushl %ebp
  82.  
  83.         movl  8(%ebp),%esi
  84.         movl 12(%ebp),%edi
  85.         movl 16(%ebp),%eax
  86.         movl 20(%ebp),%ebx
  87.         movl 24(%ebp),%ecx
  88.         movl 28(%ebp),%edx
  89.         movl 32(%ebp),%ebp
  90.         shll $16,%ebp
  91.         movw 52(%esp),%ebp
  92.  
  93.         call do_zoom
  94.  
  95.         popl %ebp
  96.         popl %ebx
  97.         popl %edi
  98.         popl %esi
  99.         
  100. /NO_APP
  101. L3:
  102.     movl %ebp,%esp
  103.     popl %ebp
  104.     ret
  105.     .align 4,0x90
  106.     .align 4
  107. .globl _Sync
  108. _Sync:
  109.     pushl %ebp
  110.     movl %esp,%ebp
  111.     .align 2,0x90
  112. L7:
  113.     pushl $986
  114.     call _inportb
  115.     addl $4,%esp
  116.     andb $8,%al
  117.     jne L7
  118.     .align 2,0x90
  119. L9:
  120.     pushl $986
  121.     call _inportb
  122.     addl $4,%esp
  123.     andb $8,%al
  124.     je L9
  125.     movl %ebp,%esp
  126.     popl %ebp
  127.     ret
  128.     .align 4,0x90
  129.     .align 4
  130. .globl _ZoomScreen
  131. _ZoomScreen:
  132.     pushl %ebp
  133.     movl %esp,%ebp
  134.     subl $4,%esp
  135.     pushl %edi
  136.     pushl %esi
  137.     pushl %ebx
  138.     movl $335544320,-4(%ebp)
  139.     .align 2,0x90
  140. L16:
  141.     movl -4(%ebp),%ecx
  142.     pushl %ecx
  143.     pushl $1342177280
  144.     call _FixedDiv
  145.     addl $8,%esp
  146.     movl %eax,%edi
  147.     movl %edi,%ebx
  148.     sarl $22,%ebx
  149.     leal (%ebx,%ebx,2),%eax
  150.     leal (%ebx,%eax,8),%eax
  151.     sall $3,%eax
  152.     movl $320,%ecx
  153.     cltd
  154.     idivl %ecx
  155.     movl %eax,%esi
  156.     call _Sync
  157.     pushl $320
  158.     pushl $320
  159.     pushl $200
  160.     pushl $320
  161.     pushl %esi
  162.     pushl %ebx
  163.     movl $320,%edx
  164.     subl %ebx,%edx
  165.     jns L14
  166.     incl %edx
  167. L14:
  168.     sarl $1,%edx
  169.     movl $200,%eax
  170.     subl %esi,%eax
  171.     jns L15
  172.     incl %eax
  173. L15:
  174.     sarl $1,%eax
  175.     leal (%eax,%eax,4),%eax
  176.     sall $6,%eax
  177.     leal -805306368(%edx,%eax),%eax
  178.     pushl %eax
  179.     pushl $_scrn_buff
  180.     call _zoom
  181.     addl $32,%esp
  182.     addl $-1048576,-4(%ebp)
  183.     cmpl $1342177279,%edi
  184.     jle L16
  185.     leal -16(%ebp),%esp
  186.     popl %ebx
  187.     popl %esi
  188.     popl %edi
  189.     movl %ebp,%esp
  190.     popl %ebp
  191.     ret
  192.     .align 4
  193. .globl _EndZoom
  194. _EndZoom:
  195.     pushl %ebp
  196.     movl %esp,%ebp
  197.     pushl %edi
  198.     pushl %esi
  199.     pushl %ebx
  200.     pushl $64000
  201.     pushl $_scrn_buff
  202.     pushl $-805306368
  203.     call _bcopy
  204.     addl $12,%esp
  205.     movl $320,%ebx
  206.     movl $64000,%edi
  207.     .align 2,0x90
  208. L22:
  209.     movl %edi,%eax
  210.     movl $320,%ecx
  211.     cltd
  212.     idivl %ecx
  213.     movl %eax,%esi
  214.     call _Sync
  215.     pushl $320
  216.     pushl $320
  217.     pushl %esi
  218.     pushl %ebx
  219.     pushl $200
  220.     pushl $320
  221.     pushl $-805306368
  222.     movl $320,%edx
  223.     subl %ebx,%edx
  224.     jns L20
  225.     incl %edx
  226. L20:
  227.     sarl $1,%edx
  228.     movl $200,%eax
  229.     subl %esi,%eax
  230.     movl %eax,%esi
  231.     testl %esi,%esi
  232.     jge L21
  233.     incl %esi
  234. L21:
  235.     sarl $1,%esi
  236.     leal (%esi,%esi,4),%eax
  237.     sall $6,%eax
  238.     leal _scrn_buff(%edx,%eax),%eax
  239.     pushl %eax
  240.     call _zoom
  241.     addl $32,%esp
  242.     addl $-800,%edi
  243.     addl $-4,%ebx
  244.     cmpl $1,%ebx
  245.     jg L22
  246.     leal -12(%ebp),%esp
  247.     popl %ebx
  248.     popl %esi
  249.     popl %edi
  250.     movl %ebp,%esp
  251.     popl %ebp
  252.     ret
  253.     .align 4
  254. .globl _Mandel
  255. _Mandel:
  256.     pushl %ebp
  257.     movl %esp,%ebp
  258.     subl $4,%esp
  259.     movl $255,-4(%ebp)
  260. /APP
  261.     
  262.         pushl %esi
  263.         pushl %edi
  264.         pushl %ebx
  265.  
  266.         movl 8(%ebp),%esi
  267.         movl 12(%ebp),%edi
  268. LOOP:
  269.         movl %esi,%eax
  270.         imul %eax
  271.         
  272.     shrd $22,%edx,%eax
  273.     
  274.         movl %eax,%ebx
  275.  
  276.         movl %edi,%eax
  277.         imul %eax
  278.         
  279.     shrd $22,%edx,%eax
  280.     
  281.         movl %eax,%ecx
  282.  
  283.         addl %ebx,%eax
  284.         
  285.     cmpl $16777216,%eax
  286.     
  287.         jg EXIT
  288.  
  289.         movl %edi,%eax
  290.         imul %esi
  291.         
  292.     shrd $22,%edx,%eax
  293.     
  294.         movl %ebx,%esi
  295.         subl %ecx,%esi
  296.         addl 8(%ebp),%esi
  297.  
  298.         leal (%eax,%eax),%edi
  299.         addl 12(%ebp),%edi
  300.  
  301.         decl -4(%ebp)
  302.         jnz LOOP
  303.  
  304. EXIT:
  305.         popl %ebx
  306.         popl %edi
  307.         popl %esi
  308.         
  309. /NO_APP
  310.     movl -4(%ebp),%eax
  311.     negb %al
  312.     andl $255,%eax
  313.     movl %ebp,%esp
  314.     popl %ebp
  315.     ret
  316.     .align 4,0x90
  317.     .align 4
  318. .globl _ResetAll
  319. _ResetAll:
  320.     pushl %ebp
  321.     movl %esp,%ebp
  322.     pushl $16777216
  323.     movl _m_x2,%eax
  324.     subl _m_x1,%eax
  325.     pushl %eax
  326.     call _FixedDiv
  327.     addl $8,%esp
  328.     addl %eax,_m_x1
  329.     subl %eax,_m_x2
  330.     pushl $16777216
  331.     movl _m_y2,%eax
  332.     subl _m_y1,%eax
  333.     pushl %eax
  334.     call _FixedDiv
  335.     addl %eax,_m_y1
  336.     subl %eax,_m_y2
  337.     movl _mand_data,%eax
  338.     movl _other_data,%edx
  339.     movl %edx,_mand_data
  340.     movl %eax,_other_data
  341.     movl $20971520,_ysz
  342.     movl $33554432,_xsz
  343.     movl $0,_ysrc
  344.     movl $0,_xsrc
  345.     movl $0,_frame
  346.     movl %ebp,%esp
  347.     popl %ebp
  348.     ret
  349.     .align 4,0x90
  350.     .align 4
  351. .globl _UpdateScreen
  352. _UpdateScreen:
  353.     pushl %ebp
  354.     movl %esp,%ebp
  355. /APP
  356.     
  357.         pushl %esi
  358.         pushl %edi
  359.         pushl %ebx
  360.         cld
  361.         
  362.     movl $151,%edx
  363.     movl $_screen_data,%esi
  364.     
  365.         movl 8(%ebp),%edi
  366.  
  367. update_back:
  368.         
  369.     movl $64,%ecx
  370.     
  371.         rep
  372.         movsl
  373.         
  374.     addl $64,%edi
  375.     
  376.         decl %edx
  377.         jnz update_back
  378.         
  379.     movl $_bits_graphic+32,%ebx
  380.     
  381.         movl $9,%edx
  382.  
  383. update_under:
  384.  
  385.         
  386.     movl $256,%ecx
  387.     
  388.  
  389. update_under_next:
  390.  
  391.         testb $-1,(%ebx)
  392.         jnz update_skip
  393.  
  394.         movb (%esi),%al
  395.         movb %al,(%edi)
  396.  
  397. update_skip:
  398.  
  399.         inc %esi
  400.         inc %edi
  401.         inc %ebx
  402.  
  403.         dec %ecx
  404.         jnz update_under_next
  405.  
  406.         
  407.     addl $64,%edi
  408.     addl $64,%ebx
  409.     
  410.  
  411.         decl %edx
  412.         jnz update_under
  413.  
  414.         popl %ebx
  415.         popl %edi
  416.         popl %esi
  417.         
  418. /NO_APP
  419.     movl %ebp,%esp
  420.     popl %ebp
  421.     ret
  422.     .align 4,0x90
  423.     .align 4
  424. .globl _CalcColumn
  425. _CalcColumn:
  426.     pushl %ebp
  427.     movl %esp,%ebp
  428.     subl $52,%esp
  429.     pushl %edi
  430.     pushl %esi
  431.     pushl %ebx
  432.     pushl $16777216
  433.     movl _m_x2,%eax
  434.     subl _m_x1,%eax
  435.     pushl %eax
  436.     call _FixedDiv
  437.     addl $8,%esp
  438.     addl _m_x1,%eax
  439.     movl %eax,-4(%ebp)
  440.     pushl $16777216
  441.     movl _m_x2,%eax
  442.     subl _m_x1,%eax
  443.     pushl %eax
  444.     call _FixedDiv
  445.     addl $8,%esp
  446.     movl _m_x2,%edx
  447.     subl %eax,%edx
  448.     movl %edx,-12(%ebp)
  449.     pushl $16777216
  450.     movl _m_y2,%eax
  451.     subl _m_y1,%eax
  452.     pushl %eax
  453.     call _FixedDiv
  454.     addl $8,%esp
  455.     addl _m_y1,%eax
  456.     movl %eax,-8(%ebp)
  457.     pushl $16777216
  458.     movl _m_y2,%eax
  459.     subl _m_y1,%eax
  460.     pushl %eax
  461.     call _FixedDiv
  462.     addl $8,%esp
  463.     movl _m_y2,%ebx
  464.     subl %eax,%ebx
  465.     pushl $1073741824
  466.     movl _xsrc,%eax
  467.     sall $22,%eax
  468.     pushl %eax
  469.     call _FixedDiv
  470.     addl $8,%esp
  471.     movl $4194304,%ecx
  472.     subl %eax,%ecx
  473.     movl %ecx,%eax
  474.     pushl %eax
  475.     movl _m_x2,%eax
  476.     subl _m_x1,%eax
  477.     pushl %eax
  478.     call _FixedMul
  479.     addl $8,%esp
  480.     movl %eax,-16(%ebp)
  481.     pushl $671088640
  482.     movl _ysrc,%eax
  483.     sall $22,%eax
  484.     pushl %eax
  485.     call _FixedDiv
  486.     addl $8,%esp
  487.     movl $4194304,%edx
  488.     subl %eax,%edx
  489.     movl %edx,%eax
  490.     pushl %eax
  491.     movl _m_y2,%eax
  492.     subl _m_y1,%eax
  493.     pushl %eax
  494.     call _FixedMul
  495.     addl $8,%esp
  496.     movl %eax,-20(%ebp)
  497.     pushl $1073741824
  498.     movl _xsrc,%eax
  499.     sall $22,%eax
  500.     sarl $1,%eax
  501.     pushl %eax
  502.     call _FixedDiv
  503.     addl $8,%esp
  504.     pushl %eax
  505.     movl _m_x2,%eax
  506.     subl _m_x1,%eax
  507.     pushl %eax
  508.     call _FixedMul
  509.     addl $8,%esp
  510.     addl _m_x1,%eax
  511.     movl %eax,-24(%ebp)
  512.     pushl $671088640
  513.     movl _ysrc,%eax
  514.     sall $22,%eax
  515.     sarl $1,%eax
  516.     pushl %eax
  517.     call _FixedDiv
  518.     addl $8,%esp
  519.     pushl %eax
  520.     movl _m_y2,%eax
  521.     subl _m_y1,%eax
  522.     pushl %eax
  523.     call _FixedMul
  524.     addl $8,%esp
  525.     addl _m_y1,%eax
  526.     movl %eax,-28(%ebp)
  527.     subl -8(%ebp),%ebx
  528.     movl %ebx,%eax
  529.     sall $8,%eax
  530.     movl $320,%ecx
  531.     cltd
  532.     idivl %ecx
  533.     movl %eax,-40(%ebp)
  534.     pushl $671088640
  535.     movl -20(%ebp),%edx
  536.     pushl %edx
  537.     sarl $8,%eax
  538.     pushl %eax
  539.     call _FixedDiv
  540.     addl $8,%esp
  541.     pushl %eax
  542.     call _FixedMul
  543.     addl $8,%esp
  544.     movl %eax,-44(%ebp)
  545.     movl _frame,%ecx
  546.     movl %ecx,%eax
  547.     addl %ecx,%eax
  548.     movl %eax,%edi
  549.     addl _other_data,%edi
  550.     movl %ecx,%eax
  551.     addl $41088,%eax
  552.     addl _mand_data,%eax
  553.     xorl %ebx,%ebx
  554.     .align 2,0x90
  555. L30:
  556.     movb (%eax),%dl
  557.     movb %dl,(%edi)
  558.     incl %ebx
  559.     addl $1024,%edi
  560.     addl $512,%eax
  561.     cmpl $159,%ebx
  562.     jle L30
  563.     movl -12(%ebp),%eax
  564.     subl -4(%ebp),%eax
  565.     pushl %eax
  566.     pushl $1073741824
  567.     movl _frame,%eax
  568.     sall $23,%eax
  569.     sarl $1,%eax
  570.     pushl %eax
  571.     call _FixedDiv
  572.     addl $8,%esp
  573.     pushl %eax
  574.     call _FixedMul
  575.     addl $8,%esp
  576.     addl -4(%ebp),%eax
  577.     movl %eax,-36(%ebp)
  578.     pushl $1073741824
  579.     movl -16(%ebp),%ecx
  580.     pushl %ecx
  581.     subl -24(%ebp),%eax
  582.     pushl %eax
  583.     call _FixedDiv
  584.     addl $8,%esp
  585.     pushl %eax
  586.     call _FixedMul
  587.     addl $8,%esp
  588.     sarl $22,%eax
  589.     movl %eax,-48(%ebp)
  590.     movl _frame,%edx
  591.     movl %edx,%eax
  592.     addl %edx,%eax
  593.     addl $512,%eax
  594.     movl %eax,%edi
  595.     addl _other_data,%edi
  596.     movl -8(%ebp),%eax
  597.     sall $8,%eax
  598.     addl -40(%ebp),%eax
  599.     movl %eax,-32(%ebp)
  600.     pushl $671088640
  601.     movl -20(%ebp),%ecx
  602.     pushl %ecx
  603.     sarl $8,%eax
  604.     subl -28(%ebp),%eax
  605.     pushl %eax
  606.     call _FixedDiv
  607.     addl $8,%esp
  608.     pushl %eax
  609.     call _FixedMul
  610.     addl $8,%esp
  611.     movl %eax,%esi
  612.     xorl %ebx,%ebx
  613.     .align 2,0x90
  614. L40:
  615.     movl -48(%ebp),%eax
  616.     incl %eax
  617.     cmpl $254,%eax
  618.     jg L34
  619.     movl %esi,%eax
  620.     sarl $22,%eax
  621.     sall $8,%eax
  622.     addl -48(%ebp),%eax
  623.     movb _screen_data+514(%eax),%dl
  624.     cmpb %dl,_screen_data(%eax)
  625.     jne L38
  626.     cmpb %dl,_screen_data+2(%eax)
  627.     jne L38
  628.     cmpb %dl,_screen_data+512(%eax)
  629.     jne L38
  630.     movb _screen_data+514(%eax),%al
  631.     jmp L39
  632.     .align 4,0x90
  633. L34:
  634.     movl %esi,%eax
  635.     sarl $22,%eax
  636.     sall $8,%eax
  637.     addl -48(%ebp),%eax
  638.     movb _screen_data+257(%eax),%dl
  639.     cmpb %dl,_screen_data+1(%eax)
  640.     jne L38
  641.     cmpb %dl,_screen_data+513(%eax)
  642.     jne L38
  643.     movb _screen_data+257(%eax),%al
  644.     jmp L39
  645.     .align 4,0x90
  646. L38:
  647.     movl -32(%ebp),%eax
  648.     sarl $8,%eax
  649.     pushl %eax
  650.     movl -36(%ebp),%ecx
  651.     pushl %ecx
  652.     call _Mandel
  653.     addl $8,%esp
  654. L39:
  655.     movb %al,(%edi)
  656.     incl %ebx
  657.     addl $1024,%edi
  658.     movl -32(%ebp),%ecx
  659.     movl -40(%ebp),%edx
  660.     leal (%ecx,%edx,2),%ecx
  661.     movl %ecx,-32(%ebp)
  662.     movl -44(%ebp),%edx
  663.     leal (%esi,%edx,2),%esi
  664.     cmpl $156,%ebx
  665.     jle L40
  666.     movl -12(%ebp),%eax
  667.     subl -4(%ebp),%eax
  668.     pushl %eax
  669.     pushl $1073741824
  670.     movl _frame,%eax
  671.     sall $23,%eax
  672.     addl $4194304,%eax
  673.     sarl $1,%eax
  674.     pushl %eax
  675.     call _FixedDiv
  676.     addl $8,%esp
  677.     pushl %eax
  678.     call _FixedMul
  679.     addl $8,%esp
  680.     addl -4(%ebp),%eax
  681.     movl %eax,-36(%ebp)
  682.     pushl $1073741824
  683.     movl -16(%ebp),%ecx
  684.     pushl %ecx
  685.     subl -24(%ebp),%eax
  686.     pushl %eax
  687.     call _FixedDiv
  688.     addl $8,%esp
  689.     pushl %eax
  690.     call _FixedMul
  691.     addl $8,%esp
  692.     sarl $22,%eax
  693.     movl %eax,-48(%ebp)
  694.     movl _frame,%edx
  695.     movl %edx,%eax
  696.     addl %edx,%eax
  697.     incl %eax
  698.     movl %eax,%edi
  699.     addl _other_data,%edi
  700.     movl -8(%ebp),%ecx
  701.     sall $8,%ecx
  702.     movl %ecx,-32(%ebp)
  703.     pushl $671088640
  704.     movl -20(%ebp),%edx
  705.     pushl %edx
  706.     movl %ecx,%eax
  707.     sarl $8,%eax
  708.     subl -28(%ebp),%eax
  709.     pushl %eax
  710.     call _FixedDiv
  711.     addl $8,%esp
  712.     pushl %eax
  713.     call _FixedMul
  714.     addl $8,%esp
  715.     movl %eax,%esi
  716.     xorl %ebx,%ebx
  717.     .align 2,0x90
  718. L50:
  719.     movl -48(%ebp),%eax
  720.     incl %eax
  721.     cmpl $254,%eax
  722.     jg L44
  723.     movl %esi,%eax
  724.     sarl $22,%eax
  725.     sall $8,%eax
  726.     addl -48(%ebp),%eax
  727.     movb _screen_data+514(%eax),%cl
  728.     cmpb %cl,_screen_data(%eax)
  729.     jne L48
  730.     cmpb %cl,_screen_data+2(%eax)
  731.     jne L48
  732.     cmpb %cl,_screen_data+512(%eax)
  733.     jne L48
  734.     movb _screen_data+514(%eax),%al
  735.     jmp L49
  736.     .align 4,0x90
  737. L44:
  738.     movl %esi,%eax
  739.     sarl $22,%eax
  740.     sall $8,%eax
  741.     addl -48(%ebp),%eax
  742.     movb _screen_data+257(%eax),%cl
  743.     cmpb %cl,_screen_data+1(%eax)
  744.     jne L48
  745.     cmpb %cl,_screen_data+513(%eax)
  746.     jne L48
  747.     movb _screen_data+257(%eax),%al
  748.     jmp L49
  749.     .align 4,0x90
  750. L48:
  751.     movl -32(%ebp),%eax
  752.     sarl $8,%eax
  753.     pushl %eax
  754.     movl -36(%ebp),%edx
  755.     pushl %edx
  756.     call _Mandel
  757.     addl $8,%esp
  758. L49:
  759.     movb %al,(%edi)
  760.     incl %ebx
  761.     addl $512,%edi
  762.     movl -40(%ebp),%ecx
  763.     addl %ecx,-32(%ebp)
  764.     addl -44(%ebp),%esi
  765.     cmpl $317,%ebx
  766.     jle L50
  767.     movl _frame,%eax
  768.     addl $128,%eax
  769.     addl %eax,%eax
  770.     movl %eax,%edi
  771.     addl _other_data,%edi
  772.     movl _frame,%eax
  773.     addl $41216,%eax
  774.     addl _mand_data,%eax
  775.     xorl %ebx,%ebx
  776.     .align 2,0x90
  777. L54:
  778.     movb (%eax),%dl
  779.     movb %dl,(%edi)
  780.     incl %ebx
  781.     addl $1024,%edi
  782.     addl $512,%eax
  783.     cmpl $159,%ebx
  784.     jle L54
  785.     movl -12(%ebp),%eax
  786.     subl -4(%ebp),%eax
  787.     pushl %eax
  788.     pushl $1073741824
  789.     movl _frame,%eax
  790.     addl $128,%eax
  791.     sall $23,%eax
  792.     sarl $1,%eax
  793.     pushl %eax
  794.     call _FixedDiv
  795.     addl $8,%esp
  796.     pushl %eax
  797.     call _FixedMul
  798.     addl $8,%esp
  799.     addl -4(%ebp),%eax
  800.     movl %eax,-36(%ebp)
  801.     pushl $1073741824
  802.     movl -16(%ebp),%ecx
  803.     pushl %ecx
  804.     subl -24(%ebp),%eax
  805.     pushl %eax
  806.     call _FixedDiv
  807.     addl $8,%esp
  808.     pushl %eax
  809.     call _FixedMul
  810.     addl $8,%esp
  811.     sarl $22,%eax
  812.     movl %eax,-48(%ebp)
  813.     movl _frame,%eax
  814.     addl $128,%eax
  815.     leal 512(,%eax,2),%eax
  816.     movl %eax,%edi
  817.     addl _other_data,%edi
  818.     movl -8(%ebp),%eax
  819.     sall $8,%eax
  820.     addl -40(%ebp),%eax
  821.     movl %eax,-32(%ebp)
  822.     pushl $671088640
  823.     movl -20(%ebp),%edx
  824.     pushl %edx
  825.     sarl $8,%eax
  826.     subl -28(%ebp),%eax
  827.     pushl %eax
  828.     call _FixedDiv
  829.     addl $8,%esp
  830.     pushl %eax
  831.     call _FixedMul
  832.     addl $8,%esp
  833.     movl %eax,%esi
  834.     xorl %ebx,%ebx
  835.     .align 2,0x90
  836. L64:
  837.     movl -48(%ebp),%eax
  838.     incl %eax
  839.     cmpl $254,%eax
  840.     jg L58
  841.     movl %esi,%eax
  842.     sarl $22,%eax
  843.     sall $8,%eax
  844.     addl -48(%ebp),%eax
  845.     movb _screen_data+514(%eax),%cl
  846.     cmpb %cl,_screen_data(%eax)
  847.     jne L62
  848.     cmpb %cl,_screen_data+2(%eax)
  849.     jne L62
  850.     cmpb %cl,_screen_data+512(%eax)
  851.     jne L62
  852.     movb _screen_data+514(%eax),%al
  853.     jmp L63
  854.     .align 4,0x90
  855. L58:
  856.     movl %esi,%eax
  857.     sarl $22,%eax
  858.     sall $8,%eax
  859.     addl -48(%ebp),%eax
  860.     movb _screen_data+257(%eax),%cl
  861.     cmpb %cl,_screen_data+1(%eax)
  862.     jne L62
  863.     cmpb %cl,_screen_data+513(%eax)
  864.     jne L62
  865.     movb _screen_data+257(%eax),%al
  866.     jmp L63
  867.     .align 4,0x90
  868. L62:
  869.     movl -32(%ebp),%eax
  870.     sarl $8,%eax
  871.     pushl %eax
  872.     movl -36(%ebp),%edx
  873.     pushl %edx
  874.     call _Mandel
  875.     addl $8,%esp
  876. L63:
  877.     movb %al,(%edi)
  878.     incl %ebx
  879.     addl $1024,%edi
  880.     movl -32(%ebp),%edx
  881.     movl -40(%ebp),%ecx
  882.     leal (%edx,%ecx,2),%edx
  883.     movl %edx,-32(%ebp)
  884.     movl -44(%ebp),%ecx
  885.     leal (%esi,%ecx,2),%esi
  886.     cmpl $156,%ebx
  887.     jle L64
  888.     movl -12(%ebp),%eax
  889.     subl -4(%ebp),%eax
  890.     pushl %eax
  891.     pushl $1073741824
  892.     movl _frame,%eax
  893.     sall $23,%eax
  894.     addl $1077936128,%eax
  895.     sarl $1,%eax
  896.     pushl %eax
  897.     call _FixedDiv
  898.     addl $8,%esp
  899.     pushl %eax
  900.     call _FixedMul
  901.     addl $8,%esp
  902.     addl -4(%ebp),%eax
  903.     movl %eax,-36(%ebp)
  904.     pushl $1073741824
  905.     movl -16(%ebp),%edx
  906.     pushl %edx
  907.     subl -24(%ebp),%eax
  908.     pushl %eax
  909.     call _FixedDiv
  910.     addl $8,%esp
  911.     pushl %eax
  912.     call _FixedMul
  913.     addl $8,%esp
  914.     sarl $22,%eax
  915.     movl %eax,-48(%ebp)
  916.     movl _frame,%eax
  917.     addl $128,%eax
  918.     leal 1(,%eax,2),%eax
  919.     movl %eax,%edi
  920.     addl _other_data,%edi
  921.     movl -8(%ebp),%ecx
  922.     sall $8,%ecx
  923.     movl %ecx,-32(%ebp)
  924.     pushl $671088640
  925.     movl -20(%ebp),%edx
  926.     pushl %edx
  927.     movl %ecx,%eax
  928.     sarl $8,%eax
  929.     subl -28(%ebp),%eax
  930.     pushl %eax
  931.     call _FixedDiv
  932.     addl $8,%esp
  933.     pushl %eax
  934.     call _FixedMul
  935.     addl $8,%esp
  936.     movl %eax,%esi
  937.     xorl %ebx,%ebx
  938.     .align 2,0x90
  939. L74:
  940.     movl -48(%ebp),%eax
  941.     incl %eax
  942.     cmpl $254,%eax
  943.     jg L68
  944.     movl %esi,%eax
  945.     sarl $22,%eax
  946.     sall $8,%eax
  947.     addl -48(%ebp),%eax
  948.     movb _screen_data+514(%eax),%cl
  949.     cmpb %cl,_screen_data(%eax)
  950.     jne L72
  951.     cmpb %cl,_screen_data+2(%eax)
  952.     jne L72
  953.     cmpb %cl,_screen_data+512(%eax)
  954.     jne L72
  955.     movb _screen_data+514(%eax),%al
  956.     jmp L73
  957.     .align 4,0x90
  958. L68:
  959.     movl %esi,%eax
  960.     sarl $22,%eax
  961.     sall $8,%eax
  962.     addl -48(%ebp),%eax
  963.     movb _screen_data+257(%eax),%cl
  964.     cmpb %cl,_screen_data+1(%eax)
  965.     jne L72
  966.     cmpb %cl,_screen_data+513(%eax)
  967.     jne L72
  968.     movb _screen_data+257(%eax),%al
  969.     jmp L73
  970.     .align 4,0x90
  971. L72:
  972.     movl -32(%ebp),%eax
  973.     sarl $8,%eax
  974.     pushl %eax
  975.     movl -36(%ebp),%edx
  976.     pushl %edx
  977.     call _Mandel
  978.     addl $8,%esp
  979. L73:
  980.     movb %al,(%edi)
  981.     incl %ebx
  982.     addl $512,%edi
  983.     movl -40(%ebp),%ecx
  984.     addl %ecx,-32(%ebp)
  985.     addl -44(%ebp),%esi
  986.     cmpl $317,%ebx
  987.     jle L74
  988.     leal -64(%ebp),%esp
  989.     popl %ebx
  990.     popl %esi
  991.     popl %edi
  992.     movl %ebp,%esp
  993.     popl %ebp
  994.     ret
  995.     .align 4
  996. .globl _SetCols
  997. _SetCols:
  998.     pushl %ebp
  999.     movl %esp,%ebp
  1000.     pushl %ebx
  1001.     pushl $0
  1002.     pushl $968
  1003.     call _outportb
  1004.     addl $8,%esp
  1005.     xorl %ebx,%ebx
  1006.     .align 2,0x90
  1007. L79:
  1008.     movzbl _palette(%ebx),%eax
  1009.     pushl %eax
  1010.     pushl $969
  1011.     call _outportb
  1012.     addl $8,%esp
  1013.     incl %ebx
  1014.     cmpl $767,%ebx
  1015.     jle L79
  1016.     movl -4(%ebp),%ebx
  1017.     movl %ebp,%esp
  1018.     popl %ebp
  1019.     ret
  1020.     .align 4
  1021. .globl _PutText
  1022. _PutText:
  1023.     pushl %ebp
  1024.     movl %esp,%ebp
  1025. /APP
  1026.     
  1027.         pushl %esi
  1028.         pushl %edi
  1029.         cld
  1030.  
  1031.         movl 12(%ebp),%edx
  1032.         movl 8(%ebp),%esi
  1033.         movl 16(%ebp),%edi
  1034.  
  1035. next_row_left:
  1036.  
  1037.         movl $8,%ecx
  1038.         rep
  1039.         movsl
  1040.  
  1041.         addl $288,%edi
  1042.         decl %edx
  1043.         jnz next_row_left
  1044.  
  1045.         popl %edi
  1046.         popl %esi
  1047.         
  1048. /NO_APP
  1049.     movl %ebp,%esp
  1050.     popl %ebp
  1051.     ret
  1052.     .align 4,0x90
  1053.     .align 4
  1054. .globl _PutGraphic
  1055. _PutGraphic:
  1056.     pushl %ebp
  1057.     movl %esp,%ebp
  1058. /APP
  1059.     
  1060.         pushl %esi
  1061.         pushl %edi
  1062.         
  1063.     movl $_bits_graphic,%esi
  1064.     movl $_scrn_buff+49600,%edi
  1065.     movl $14400,%ecx
  1066.     
  1067.  
  1068. put_graphic_next:
  1069.  
  1070.         testb $-1,(%esi)
  1071.         jz put_graphic_skip
  1072.  
  1073.         movb (%esi),%al
  1074.         movb %al,(%edi)
  1075.  
  1076. put_graphic_skip:
  1077.  
  1078.         incl %esi
  1079.         incl %edi
  1080.         decl %ecx
  1081.         jnz put_graphic_next
  1082.  
  1083.         popl %edi
  1084.         popl %esi
  1085.         
  1086. /NO_APP
  1087.     movl %ebp,%esp
  1088.     popl %ebp
  1089.     ret
  1090.     .align 4,0x90
  1091.     .align 4
  1092. .globl _main
  1093. _main:
  1094.     pushl %ebp
  1095.     movl %esp,%ebp
  1096.     subl $36,%esp
  1097.     pushl %ebx
  1098.     call ___main
  1099.     movl $19,-32(%ebp)
  1100.     leal -32(%ebp),%eax
  1101.     pushl %eax
  1102.     pushl %eax
  1103.     pushl $16
  1104.     call _int86
  1105.     addl $12,%esp
  1106.     pushl $33
  1107.     call _inportb
  1108.     addl $4,%esp
  1109.     movb %al,-36(%ebp)
  1110.     pushl $254
  1111.     pushl $33
  1112.     call _outportb
  1113.     addl $8,%esp
  1114.     call _SetCols
  1115.     pushl $_scrn_buff
  1116.     pushl $161
  1117.     pushl $_lefttext
  1118.     call _PutText
  1119.     addl $12,%esp
  1120.     pushl $_scrn_buff+288
  1121.     pushl $161
  1122.     pushl $_righttext
  1123.     call _PutText
  1124.     addl $12,%esp
  1125.     call _PutGraphic
  1126.     movl $0,_ysrc
  1127.     movl $20971520,_ysz
  1128.     movl $33554432,_xsz
  1129.     pushl $512
  1130.     pushl $256
  1131.     pushl $320
  1132.     pushl $512
  1133.     pushl $160
  1134.     pushl $256
  1135.     pushl $_screen_data
  1136.     movl _mand_data,%ecx
  1137.     pushl %ecx
  1138.     call _zoom
  1139.     addl $32,%esp
  1140.     pushl $_scrn_buff+1312
  1141.     call _UpdateScreen
  1142.     addl $4,%esp
  1143.     call _ZoomScreen
  1144.     movl $1450,%ebx
  1145.     .align 2,0x90
  1146. L90:
  1147.     pushl $96
  1148.     call _inportb
  1149.     addl $4,%esp
  1150.     cmpb $1,%al
  1151.     je L84
  1152.     addl $-131072,_xsz
  1153.     addl $-81920,_ysz
  1154.     movl $33554432,%eax
  1155.     subl _xsz,%eax
  1156.     jns L87
  1157.     incl %eax
  1158. L87:
  1159.     sarl $17,%eax
  1160.     movl %eax,_xsrc
  1161.     movl $20971520,%eax
  1162.     subl _ysz,%eax
  1163.     jns L88
  1164.     incl %eax
  1165. L88:
  1166.     movl %eax,%edx
  1167.     sarl $17,%edx
  1168.     movl %edx,_ysrc
  1169.     pushl $512
  1170.     pushl $256
  1171.     movl _ysz,%eax
  1172.     sarl $16,%eax
  1173.     pushl %eax
  1174.     movl _xsz,%eax
  1175.     sarl $16,%eax
  1176.     pushl %eax
  1177.     pushl $160
  1178.     pushl $256
  1179.     pushl $_screen_data
  1180.     movl _mand_data,%eax
  1181.     addl _xsrc,%eax
  1182.     sall $9,%edx
  1183.     addl %edx,%eax
  1184.     pushl %eax
  1185.     call _zoom
  1186.     addl $32,%esp
  1187.     call _CalcColumn
  1188.     pushl $-805305056
  1189.     call _UpdateScreen
  1190.     addl $4,%esp
  1191.     incl _frame
  1192.     cmpl $16777216,_xsz
  1193.     jne L85
  1194.     call _ResetAll
  1195. L85:
  1196.     decl %ebx
  1197.     testl %ebx,%ebx
  1198.     jg L90
  1199. L84:
  1200.     call _EndZoom
  1201.     movl $3,-32(%ebp)
  1202.     leal -32(%ebp),%eax
  1203.     pushl %eax
  1204.     pushl %eax
  1205.     pushl $16
  1206.     call _int86
  1207.     addl $12,%esp
  1208.     movzbl -36(%ebp),%eax
  1209.     pushl %eax
  1210.     pushl $33
  1211.     call _outportb
  1212.     xorl %eax,%eax
  1213.     movl -40(%ebp),%ebx
  1214.     movl %ebp,%esp
  1215.     popl %ebp
  1216.     ret
  1217. .comm _array2,163840
  1218. .comm _screen_data,40960
  1219. .comm _ysrc,4
  1220. .comm _xsrc,4
  1221. .comm _ysz,4
  1222. .comm _xsz,4
  1223. .comm _scrn_buff,64000
  1224.