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

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