home *** CD-ROM | disk | FTP | other *** search
/ DP Tool Club 15 / CD_ASCQ_15_070894.iso / news / sorcpak / stmik020 / demo.asm < prev    next >
Assembly Source File  |  1991-07-14  |  12KB  |  720 lines

  1. ;demo routines
  2.  
  3. demoframe PROC NEAR
  4.     setborder 0
  5.     mov    dx,3dah
  6. dwait:    in    al,dx
  7.     test    al,8
  8.     jz    dwait
  9.     call    scrollborder
  10.     call    canner ;color animation
  11.     sti
  12.     setborder 52
  13.     mov    ax,4
  14.     call    stmik_asm ;poll music player
  15.     setborder 1
  16.     call    scroll
  17.     call    enablekeyboard
  18.     setborder 9
  19.     call    logofader
  20.     setborder 1
  21.     call    writer
  22.     cmp    cs:equson,0
  23.     je    noequs
  24.     setborder 1
  25.     call    equs
  26. noequs:    setborder 15
  27.     call    starfield
  28.     setborder 1
  29.     call    disablekeyboard ;just to avoid overactive users to 'crash' the demo
  30.     setborder 0
  31.     ret
  32. demoframe ENDP
  33.  
  34. demobackground PROC NEAR
  35.     ret
  36.     ;set 4 bitplane latch trasfer mode
  37.     mov    dx,3ceh
  38.     mov    ax,4105h
  39.     out    dx,ax
  40.     mov    dx,3
  41.     mov    dx,3c4h
  42.     mov    ax,0f02h
  43.     out    dx,ax
  44.     ;do nothing :-)
  45.     ;clear latch trasfer mode
  46.     mov    dx,3ceh
  47.     mov    ax,4005h
  48.     out    dx,ax
  49.     ret
  50. demobackground ENDP
  51.  
  52. demointti PROC NEAR
  53.     ;called every other frame by rasterinterrupt, must save all but AX
  54.     push    es
  55.     pop    es
  56.     ret
  57. demointti ENDP
  58.  
  59. fixword
  60. stx    dw    32 dup(-1,-1)    ;x
  61. sty    dw    32 dup(-1,-1)    ;y
  62. stm    db    32 dup(0,0,0,0)     ;misc: color,maxcol/speed,processed,0
  63. stox1    dw    ?
  64. stoy1    dw    ?
  65. stox2    dw    ?
  66. stoy2    dw    ?
  67. srot    dw    64
  68.  
  69. bordercnt dw    ?
  70.  
  71. starfield PROC NEAR
  72.     mov    ax,cs
  73.     mov    ds,ax
  74.     mov    es,ds:vram
  75.     ;calc 'rotating' center
  76.     mov    cx,cs:drunkenstars
  77.     mov    ax,ds:srot
  78.     sine
  79.     imul    cx
  80.     mov    ax,dx
  81.     add    ax,160
  82.     mov    ds:stox1,ax
  83.     sub    ax,(320-256)/2
  84.     mov    ds:stox2,ax
  85.     mov    ax,ds:srot
  86.     cosine
  87.     imul    cx
  88.     mov    ax,dx
  89.     add    ax,100
  90.     mov    ds:stoy1,ax
  91.     sub    ax,(200-128)/2
  92.     mov    ds:stoy2,ax
  93.     inc    ds:srot
  94.     and    ds:srot,255
  95.     ;do stars
  96.     mov    cx,stars
  97.     xor    si,si
  98. sf01:    mov    cs:stm[si+2],0
  99.     add    si,4
  100.     loop    sf01
  101.     mov    cs:bordercnt,0
  102.     mov    cx,stars
  103.     mov    bp,0
  104.     xor    si,si
  105.     call    starfield2
  106. sf02:    setborder 0
  107.     call    getrasterline
  108.     cmp    ax,160
  109.     jb    sf02
  110.     mov    cx,stars
  111.     mov    bp,1
  112.     xor    si,si
  113.     setborder 15
  114.     call    starfield2
  115.     ret
  116. starfield ENDP
  117.  
  118. starfield2 PROC NEAR
  119. sf1:    push    cx
  120.     cmp    ds:stm[si+2],0
  121.     je    sf14
  122.     jmp    sf3
  123. sf14:
  124.     mov    dx,ds:stx[si+2]
  125.     cmp    dx,-1
  126.     jne    sf5
  127.     ;add new
  128.     call    rand
  129.     and    ax,127
  130.     mov    dx,ax
  131.     call    rand
  132.     and    ax,127
  133.     add    dx,ax
  134.     add    dx,(320-256)/2
  135.     mov    ds:stx[si+2],dx
  136.     call    rand
  137.     and    ax,63
  138.     mov    dx,ax
  139.     call    rand
  140.     and    ax,63
  141.     add    dx,ax
  142.     add    dx,(200-128)/2
  143.     mov    ds:sty[si+2],dx
  144.     call    rand
  145.     and    al,15
  146.     add    al,128+64
  147.     mov    ds:stm[si+1],al
  148.     mov    al,128+64+31
  149.     mov    ds:stm[si],al
  150.     mov    dx,ds:stx[si+2]
  151.     mov    bx,ds:sty[si+2]
  152.     jmp    sf2
  153. sf5:    ;undraw old
  154.     mov    bx,ds:sty[si+2]
  155. sf2:    cmp    bp,1
  156.     je    sf12
  157.     cmp    bx,70
  158.     jnb    sf11
  159. sf13:    jmp    sf3
  160. sf12:    cmp    bx,70
  161.     jnb    sf13
  162. sf11:    mov    ds:stm[si+2],1    
  163.     call    ospget
  164.     cmp    al,128+64
  165.     jb    sf4
  166.     cmp    al,128+64+31
  167.     ja    sf4
  168.     mov    dx,ds:stx[si+2]
  169.     mov    bx,ds:sty[si+2]
  170.     xor    al,al
  171.     call    ospset
  172. sf4:    ;move
  173.     mov    ah,128+63
  174.     sub    ah,ds:stm[si+1]
  175.     add    ah,32
  176.     xor    al,al
  177.     mov    cl,2
  178.     shr    ax,cl
  179.     mov    cx,ax
  180.     mov    ax,ds:stx[si+2]
  181.     sub    ax,ds:stox1
  182.     imul    cx
  183.     add    ds:stx[si],ax
  184.     adc    ds:stx[si+2],dx
  185.     mov    ax,ds:sty[si+2]
  186.     sub    ax,ds:stoy1
  187.     imul    cx
  188.     add    ds:sty[si],ax
  189.     adc    ds:sty[si+2],dx
  190.     ;redraw new/check for overflow
  191.     mov    dx,ds:stx[si+2]
  192.     cmp    dx,320
  193.     jb    sf9
  194. sf10:    mov    ds:stx[si+2],-1
  195.     jmp    sf3
  196. sf9:    mov    bx,ds:sty[si+2]
  197.     cmp    bx,199
  198.     ja    sf10
  199.     call    spget
  200.     cmp    al,0
  201.     jne    sf3
  202.     mov    dx,ds:stx[si+2]
  203.     mov    bx,ds:sty[si+2]
  204.     mov    al,ds:stm[si]
  205.     cmp    al,ds:stm[si+1]
  206.     jna    sf7
  207.     dec    al
  208. sf7:    mov    ds:stm[si],al
  209.     call    spset
  210. sf3:    pop    cx
  211.     add    si,4
  212.     loop    sf1x
  213.     ret
  214. sf1x:    jmp    sf1
  215. starfield2 ENDP
  216.  
  217. tmpcol    db    0
  218. tmprow    dw    1
  219.  
  220. scrollmacro1 MACRO
  221.     mov    al,es:[si]
  222.     mov    es:[di],al
  223.     mov    es:[di-(1280-640)/4],al
  224.     ;mov    al,es:[si+1]
  225.     ;mov    es:[di+1],al
  226.     ;mov    es:[di-(1280-640)/4+1],al
  227.     ENDM
  228. scrollmacro2 MACRO
  229.     mov    al,es:[si]
  230.     mov    es:[di],al
  231.     ;mov    al,es:[si+1]
  232.     ;mov    es:[di+1],al
  233.     ENDM
  234. ;create one 'sprite'-line of the font
  235. scrollmacro MACRO submac
  236.     local    l1,l2,l3,l4,l5,l6,l7
  237.     mov    bx,cs:charbodypos
  238.     mov    ax,cs:charpos
  239.     mov    dx,cs:charwidth
  240.     cmp    ax,dx
  241.     jb    l3
  242.     mov    bx,cs:chartpos
  243.     mov    al,cs:chartext[bx]
  244.     cmp    al,1
  245.     jne    l6
  246.     mov    cs:wrmark,1
  247.     mov    cs:oktofade,1
  248.     inc    bx
  249.     jmp    l7
  250. l6:    or    al,al
  251.     jnz    l4
  252.     xor    bx,bx
  253. l7:    mov    al,cs:chartext[bx]
  254. l4:    inc    bx
  255.     mov    cs:chartpos,bx
  256.     mov    bl,al
  257.     xor    bh,bh
  258.     shl    bx,1
  259.     shl    bx,1
  260.     mov    ax,cs:fontpos[bx+2]
  261.     shr    ax,1
  262.     shr    ax,1
  263.     mov    cs:charwidth,ax
  264.     mov    ax,cs:fontpos[bx]
  265.     mov    cs:charbodypos,ax
  266.     mov    bx,ax
  267.     mov    dl,cs:[bx]
  268.     xor    ax,ax
  269. l3:    cmp    bx,spacepos
  270.     je    l5
  271.     add    bx,ax
  272. l5:    inc    ax
  273.     mov    cs:charpos,ax
  274.     mov    si,bx
  275.     mov    dx,1280/4
  276.     mov    cx,64
  277. l1:    submac
  278.     add    si,dx
  279.     add    di,dx
  280.     loop    l1
  281.     ENDM
  282.     
  283. wrmark    db    0
  284. oktofade db    0
  285.     
  286. chartpos dw    0
  287. ;    db    "FONTTEST!   "
  288. ;    db    "ABCDEFGHIJKLMNOPQRSTUVWXYZ!?:;., "
  289.     
  290. spacepos equ    80
  291. fontpos LABEL WORD
  292.     dw    32 dup(0,0)
  293.     dw    spacepos,32 ;space
  294.     dw    (80*1+320*72)+16*1,28 ; !
  295.     dw    0,0
  296.     dw    (80*3+320*64)+16*4-2,8 ; #
  297.     dw    8 dup(0,0)
  298.     dw    (80*1+320*72)+8*7,16 ; ,
  299.     dw    0,0
  300.     dw    (80*1+320*72)+8*8,16 ; .
  301.     dw    0,0
  302.     dw    10 dup(0,0)
  303.     dw    (80*1+320*72)+8*6,16 ; :
  304.     dw    (80*1+320*72)+8*9,16 ; ;
  305.     dw    0,0
  306.     dw    (80*3+320*64)+16*5-8,8 ; =
  307.     dw    0,0
  308.     dw    (80*1+320*72)+16*0+3,48 ; ?
  309.     dw    0,0 ;@
  310.     ;A..Z
  311.     dw    (80*3+320*0)+16*0,48
  312.     dw    (80*3+320*0)+16*1,48
  313.     dw    (80*3+320*0)+16*2,48
  314.     dw    (80*3+320*0)+16*3,48
  315.     dw    (80*3+320*0)+16*4,48
  316.     dw    (80*3+320*64)+16*0,48
  317.     dw    (80*3+320*64)+16*1,48
  318.     dw    (80*3+320*64)+16*2,48
  319.     dw    (80*3+320*64)+16*3,16
  320.     dw    (80*3+320*64)+16*4,20
  321.     dw    (80*3+320*128)+16*0,44
  322.     dw    (80*3+320*128)+16*1,16
  323.     dw    (80*3+320*128)+16*2,64
  324.     dw    (80*3+320*128)+16*3,44
  325.     dw    (80*3+320*128)+16*4,48
  326.     dw    (80*2+320*0)+16*0,48
  327.     dw    (80*2+320*0)+16*1,48
  328.     dw    (80*2+320*0)+16*2,48
  329.     dw    (80*2+320*0)+16*3,48
  330.     dw    (80*2+320*0)+16*4,48
  331.     dw    (80*2+320*64)+16*0,48
  332.     dw    (80*2+320*64)+16*1,48
  333.     dw    (80*2+320*64)+16*2,48
  334.     dw    (80*2+320*64)+16*3,60
  335.     dw    (80*2+320*64)+16*4,48
  336.     dw    (80*1+320*72)+16*2,48
  337. charbodypos dw    spacepos
  338. charpos    dw    0
  339. charwidth dw    0
  340.     
  341. scrollborder PROC NEAR
  342.     ;called in border for smooth scrolling
  343.     ;set smooth pixel pan
  344.     mov    dx,3dah
  345.     in    al,dx
  346.     mov    dx,3c0h
  347.     mov    al,13h
  348.     out    dx,al
  349.     mov    al,byte ptr cs:winxpos
  350.     and    al,3
  351.     shl    al,1
  352.     out    dx,al
  353.     mov    al,32
  354.     out    dx,al
  355.     ret
  356. scrollborder ENDP
  357.  
  358. srcount dw    0
  359.  
  360. scroll    PROC NEAR
  361.     mov    es,cs:vram
  362.     ;set subwindow position
  363.     mov    ax,cs:winxpos
  364.     mov    cs:owinxpos,ax
  365.     ;change winxpos
  366.     add    ax,3
  367.     cmp    cs:alternatescroll,0
  368.     je    scr1b
  369.     inc    cs:srcount
  370.     inc    ax
  371. scr1b:    add    cs:srcount,3
  372.     cmp    ax,1280-640
  373.     jb    scr1
  374.     sub    ax,1280-640
  375. scr1:    mov    cs:winxpos,ax
  376.     cmp    cs:srcount,4
  377.     jb    src11
  378.     sub    cs:srcount,4
  379.     jmp    scr6
  380. src11:    jmp    scr3
  381. scr6:    ;draw new stuff
  382.     jmp    scr2
  383. scr4x:    jmp    scr4
  384. scr2:
  385.     ;set 4 bitplane latch trasfer mode
  386.     mov    dx,3ceh
  387.     mov    ax,4105h
  388.     out    dx,ax
  389.     mov    dx,3
  390.     mov    dx,3c4h
  391.     mov    ax,0f02h
  392.     out    dx,ax
  393.     mov    si,320/4
  394.     mov    di,1280/4*136+320/4
  395.     mov    ax,cs:winxpos
  396.     shr    ax,1
  397.     shr    ax,1
  398.     add    di,ax
  399.     cmp    cs:winxpos,(1280-640-320)
  400.     jb    scr4x
  401.     scrollmacro scrollmacro1
  402.     jmp    scr5
  403. scr4:    scrollmacro scrollmacro2
  404. scr5:    ;clear latch trasfer mode
  405.     mov    dx,3ceh
  406.     mov    ax,4005h
  407.     out    dx,ax
  408. scr3:    ;position screen
  409.     mov    bx,1280/4*136
  410.     mov    ax,cs:winxpos
  411.     shr    ax,1
  412.     shr    ax,1
  413.     add    bx,ax
  414.     mov    dx,03d4h
  415.     mov    al,0ch
  416.     mov    ah,bh
  417.     out    dx,ax
  418.     mov    al,0dh
  419.     mov    ah,bl
  420.     out    dx,ax
  421.     ret    
  422. scroll    ENDP
  423.  
  424. cancnt    dw    0
  425.  
  426. canner PROC NEAR
  427.     ;update palette
  428.     cli
  429.     mov    ax,cs
  430.     mov    ds,ax
  431.     mov    si,OFFSET palette+128*3
  432.     mov    al,128
  433.     mov    dx,3c8h
  434.     out    dx,al
  435.     inc    dx
  436.     mov    cx,64*3/6
  437. can1:    lodsb
  438.     out    dx,al
  439.     lodsb
  440.     out    dx,al
  441.     lodsb
  442.     out    dx,al
  443.     lodsb
  444.     out    dx,al
  445.     lodsb
  446.     out    dx,al
  447.     lodsb
  448.     out    dx,al
  449.     loop    can1
  450.     sti
  451.     ;scroll colors
  452.     inc    cs:cancnt
  453.     test    cs:cancnt,7
  454.     jnz    can2
  455.     mov    ax,cs
  456.     mov    ds,ax
  457.     mov    es,ax
  458.     mov    di,OFFSET palette+128*3
  459.     mov    si,OFFSET palette+129*3
  460.     mov    bx,ds:[di]
  461.     mov    dl,ds:[di+2]
  462.     mov    cx,63*3/2
  463.     rep    movsw
  464.     movsb
  465.     mov    ds:[di],bx
  466.     mov    ds:[di+2],dl
  467.     ;update writer fontcolor
  468.     dec    cs:printcadd
  469.     and    cs:printcadd,63
  470. can2:    ret
  471. canner ENDP
  472.  
  473. fixword
  474. wrwait    dw    0
  475. wrpos    dw    0
  476. wrx    dw    16
  477. wry    dw    39
  478. wrcnt    dw    0
  479. wrnum    dw    20
  480. wrcx    dw    64*4 dup(0)
  481. wrcy    dw    64*4 dup(0)
  482. wrcc    db    64*4 dup(0,0)
  483. wrcpnt    dw    0
  484. wrcpnt2    dw    12*4*2
  485.  
  486. writer PROC NEAR
  487.     inc    cs:wrcnt
  488.     test    cs:wrcnt,1
  489.     jz    wr1x
  490.     jmp    wr1
  491. wr3x:    jmp    wr3
  492. wr1x:    cmp    cs:wrwait,30000
  493.     jne    wr3y
  494.     cmp    cs:wrmark,1
  495.     jne    wr5z
  496.     mov    cs:wrmark,0
  497.     mov    cs:wrwait,0
  498.     jmp    wr3x
  499. wr5z:    mov    cs:wrwait,30001
  500.     jmp    wr3x
  501. wr3y:    cmp    cs:wrwait,0
  502.     jne    wr3x
  503.     mov    bx,cs:wrpos
  504.     mov    al,cs:wrtext[bx]
  505.     inc    bx
  506.     cmp    al,0
  507.     jne    wr5
  508.     mov    cs:wrpos,OFFSET wrtextinit-OFFSET wrtext
  509.     jmp    wr3
  510. wr5:    mov    cs:wrpos,bx
  511.     cmp    al,13
  512.     jne    wr2
  513.     add    cs:wry,18
  514.     mov    cs:wrx,16
  515. wr2:    cmp    al,10
  516.     jne    wr22
  517.     sub    cs:wry,18
  518. wr22:    cmp    al,3
  519.     jne    wr9
  520.     mov    cs:wrwait,30001
  521.     jmp    wr3
  522. wr9:    cmp    al,1
  523.     jne    wr4
  524.     mov    cs:wrx,16
  525.     mov    cs:wry,39
  526.     mov    cs:wrwait,256
  527.     jmp    wr3
  528. wr4:    cmp    al,2
  529.     jne    wr6
  530.     xor    dx,dx
  531. wr62:    mov    al,ds:wrtext[bx]
  532.     cmp    al,13
  533.     je    wr61
  534.     call    getfontwidth
  535.     add    dx,ax
  536.     inc    bx    
  537.     jmp    wr62
  538. wr61:    mov    ax,314
  539.     sub    ax,dx
  540.     shr    ax,1
  541.     mov    cs:wrx,ax
  542.     jmp    wr3
  543. wr6:    mov    bx,cs:wry
  544.     mov    dx,cs:wrx
  545.     mov    si,cs:wrcpnt
  546.     mov    cs:wrcx[si],dx
  547.     mov    cs:wrcy[si],bx
  548.     mov    cs:wrcc[si],al
  549.     cmp    al,'a'
  550.     jb    wr92
  551.     call    printc2
  552.     jmp    wr91
  553. wr92:    call    printc
  554. wr91:    mov    cs:wrx,dx
  555.     cmp    cs:wrx,320-16
  556.     jb    wr3
  557.     mov    cs:wrx,16
  558. wr3:    ;clear old chars
  559.     mov    si,cs:wrcpnt
  560.     add    si,2
  561.     and    si,511
  562.     mov    cs:wrcpnt,si
  563.     mov    si,cs:wrcpnt2
  564.     mov    dx,cs:wrcx[si]
  565.     mov    bx,cs:wrcy[si]
  566.     mov    al,cs:wrcc[si]
  567.     mov    cs:wrcx[si],0
  568.     add    si,2
  569.     and    si,511
  570.     mov    cs:wrcpnt2,si
  571.     cmp    dx,0
  572.     je    wr32
  573.     call    printclr
  574. wr32:    cmp    cs:wrwait,0
  575.     je    wr1
  576.     dec    cs:wrwait
  577. wr1:    ret
  578. writer ENDP
  579.  
  580. fadespd    equ    538*2
  581. fadecount dw    fadespd+1
  582. fadeyadd dw    80*1+320*(32+8)
  583. fadeyad1 dw    80*1+320*(32+8)
  584. fadeyad2 dw    80*1+320*8
  585.  
  586. logofader PROC NEAR
  587.     cmp    cs:oktofade,0
  588.     jne    lof5
  589.     ret
  590. lof5:    inc    cs:fadecount
  591.     cmp    cs:fadecount,fadespd
  592.     ja    lof1
  593.     ret
  594. lof1:    cmp    cs:fadecount,fadespd+80
  595.     jb    lof2
  596.     mov    cs:fadecount,0
  597.     mov    ax,cs:fadeyad1
  598.     xchg    cs:fadeyad2,ax
  599.     mov    cs:fadeyad1,ax
  600.     mov    cs:fadeyadd,ax
  601.     ret
  602. lof2:    ;fade 
  603.     ;set 4 bitplane latch trasfer mode
  604.     mov    dx,3ceh
  605.     mov    ax,4105h
  606.     out    dx,ax
  607.     mov    dx,3
  608.     mov    dx,3c4h
  609.     mov    ax,0f02h
  610.     out    dx,ax
  611.     ;fade in/out
  612.     mov    es,cs:vram
  613.     mov    di,cs:fadecount
  614.     sub    di,fadespd
  615.     mov    bp,di
  616.     mov    si,cs:fadeyadd
  617.     add    si,bp
  618.     mov    cx,16
  619.     mov    dx,640
  620. lof3:    mov    al,es:[si]
  621.     mov    es:[di],al
  622.     add    si,dx
  623.     add    di,dx
  624.     loop    lof3
  625.     mov    di,fadespd+79+320
  626.     sub    di,cs:fadecount
  627.     mov    si,cs:fadeyadd
  628.     add    si,320+79
  629.     sub    si,bp
  630.     mov    cx,16
  631.     mov    dx,640
  632. lof4:    mov    al,es:[si]
  633.     mov    es:[di],al
  634.     add    si,dx
  635.     add    di,dx
  636.     loop    lof4
  637.     ;clear latch trasfer mode
  638.     mov    dx,3ceh
  639.     mov    ax,4005h
  640.     out    dx,ax
  641.     ret
  642. logofader ENDP
  643.  
  644. equpnt    dw    0
  645. equdel    db    16 dup(64 dup(0))
  646. equlast db    64 dup(0)
  647.  
  648. equs     PROC NEAR
  649.     cmp    cs:nosbc,0
  650.     je    noeq
  651.     ret
  652. noeq:    mov    dx,3
  653.     mov    dx,3c4h
  654.     mov    ax,0702h
  655.     out    dx,ax
  656.     ;draw the equs; REMARK; the info from the player is aprx. 16 frames early!
  657.     mov    es,cs:vram
  658.     mov    si,word ptr cs:stmikequs[0]
  659.     mov    ds,word ptr cs:stmikequs[2]
  660.     mov    cx,60 ;do 16 ins bars
  661.     mov    bx,cs:equpnt
  662. equ12:    mov    al,ds:[si]
  663.     mov    cs:equdel[bx],al
  664.     sub    al,2
  665.     jnc    equ11
  666.     xor    al,al
  667. equ11:    mov    ds:[si],al
  668.     inc    bx
  669.     inc    si
  670.     loop    equ12
  671.     add    bx,4
  672.     and    bx,1023
  673.     mov    cs:equpnt,bx
  674.     mov    cx,40
  675.     mov    di,20+(133)*(1280/4)
  676.     mov    si,bx
  677.     add    si,20
  678.     mov    bp,20
  679. equ1:    push    cx
  680.     push    di
  681.     push    si
  682.     xor    bh,bh
  683.     mov    bh,cs:equlast[bp]
  684.     mov    bl,cs:equdel[si]
  685.     cmp    bl,0
  686.     jne    equ4
  687.     cmp    bh,0
  688.     jne    equ4
  689.     jmp    equ3
  690. equ4:    mov    cs:equlast[bp],bl
  691.     mov    cl,2
  692.     shr    bl,cl
  693.     shr    bh,cl
  694.     mov    cl,bl
  695.     xor    ch,ch
  696.     jcxz    equ22
  697.     mov    al,32
  698. equ2:    mov    es:[di],al
  699.     sub    di,1280/4
  700.     inc    al
  701.     loop    equ2
  702. equ22:    mov    cl,bh
  703.     sub    cl,bl
  704.     jc    equ3
  705.     jz    equ3
  706.     mov    al,0
  707. equ5:    mov    es:[di],al
  708.     sub    di,1280/4
  709.     loop    equ5
  710. equ3:    pop    si
  711.     pop    di
  712.     pop    cx
  713.     inc    si
  714.     inc    bp
  715.     inc    di
  716.     loop    equ1
  717.     ret
  718. equs    ENDP
  719.  
  720.