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

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