home *** CD-ROM | disk | FTP | other *** search
/ Simtel MSDOS 1992 September / Simtel20_Sept92.cdr / msdos / batutl / battutor.arc / QDISPLAY.INC < prev    next >
Text File  |  1983-08-14  |  2KB  |  32 lines

  1. ;
  2. ;                               qdisplay.inc
  3. ;
  4. ;       if CX = 0 (null string), then force one blank into string.
  5. ;
  6. ;       This is because we want to avoid col. 1 for the reverse video box
  7. ;       display.  If this program looses control (by control-break or
  8. ;       critical error, for example) while the reverse video prompt box is
  9. ;       in col. 1, then BIOS scroll procedures will propagate the reverse
  10. ;       video attribute to the new line each time the screen is scrolled
  11. ;       by DOS.
  12. ;
  13.                 MOV     AH,2                    ;DOS fn call, 1 char display
  14.                 OR      CL,CL                   ;is byte count of string zero?
  15.                 JNE     DISPLAY_LINE            ;jump if not
  16.                 INC     CL                      ;incr count to 1
  17.                 MOV     BYTE PTR [SI+1],BLANK_CHAR  ;put 1 blank char in string
  18.                 MOV     BX,1                    ;point BX to this char
  19. ;
  20. ;       display line.  Use one-character DOS call, because the "display
  21. ;       string" call won't display "$"
  22. ;
  23. DISPLAY_LINE:   MOV     DL,[SI][BX]             ;next char into DL
  24.                 INT     21H                     ;call DOS
  25.                 INC     BX                      ;point to next char
  26.                 LOOP    DISPLAY_LINE            ;and loop on char count
  27. ;
  28. ;               --------        end of qdisplay.inc             --------
  29. ;
  30.           ;"display one char" DOS call
  31.                 INT     21H                     ;call DOS
  32.