home *** CD-ROM | disk | FTP | other *** search
/ Simtel MSDOS 1992 June / SIMTEL_0692.cdr / msdos / turbobas / tbwind30.arc / QFILL.ASM < prev    next >
Assembly Source File  |  1987-06-12  |  3KB  |  80 lines

  1.               title          QFILLS
  2.               page           60,132
  3.  
  4. attr          equ            [bp + 06h]
  5. char          equ            [bp + 0Ah]
  6. cols          equ            [bp + 0Eh]
  7. rows          equ            [bp + 12h]
  8. col           equ            [bp + 16h]
  9. row           equ            [bp + 1Ah]
  10.  
  11. program       segment
  12.               assume         cs:program
  13.               push           bp
  14.               mov            bp,sp
  15.               push           ds
  16.               push           es
  17.               mov            ah,15
  18.               int            10h
  19.               cmp            al,7
  20.               jnz            color
  21.               mov            bx,0B000h
  22.               mov            dx,03BAh
  23.               jmp            short ok
  24. color:        mov            bx,0B800h
  25.               mov            dx,03DAh
  26. ok:           push           bx
  27.               pop            es
  28.               lds            si,rows
  29.               mov            cx,ds:[si]
  30.               push           cx
  31.               push           dx
  32.               xor            bx,bx
  33.               mov            bl,ah
  34.               lds            si,row
  35.               mov            ax,ds:[si]
  36.               dec            ax
  37.               mul            bx
  38.               shl            ax,1
  39.               lds            si,col
  40.               mov            bx,ds:[si]
  41.               dec            bx
  42.               shl            bx,1
  43.               add            bx,ax
  44.               mov            di,bx
  45.               lds            si,char
  46.               mov            ax,ds:[si]
  47.               mov            bl,al
  48.               lds            si,attr
  49.               mov            ax,ds:[si]
  50.               mov            ah,al
  51.               cld
  52.               lds            si,cols
  53.               mov            si,ds:[si]
  54.               pop            dx
  55. nxtrow1:      push           di
  56.               mov            cx,si
  57.               cli
  58. waitlo1:      in             al,dx
  59.               test           al,01
  60.               jnz            waitlo1
  61. waithi1:      in             al,dx
  62.               test           al,01
  63.               jz             waithi1
  64.               mov            al,bl
  65.               stosw
  66.               loop           waitlo1
  67.               sti
  68.               pop            di
  69.               pop            cx
  70.               dec            cx
  71.               jcxz           endit
  72.               push           cx
  73.               add            di,160
  74.               jmp            short nxtrow1
  75. endit:        pop            es
  76.               pop            ds
  77.               pop            bp
  78. program       ends
  79.               end
  80.