home *** CD-ROM | disk | FTP | other *** search
/ HPAVC / HPAVC CD-ROM.iso / pc / RGASM.RAR / ASMCODE.EXE / CHAPT12 / CCOLOR.ASM < prev    next >
Encoding:
Assembly Source File  |  1994-08-27  |  1.2 KB  |  37 lines

  1.  ;************************************************************
  2.  ;  Program CColor ( Chapter 12 )
  3.  ;  
  4.  ;  The PC screen input/output library    Version 1.0
  5.  ;  Subroutine for clearing the display screen
  6.  ;      (filling it with a specified color)
  7.  ;  Copyright (c): A.I.Sopin, Voronezh, Russia 1990 - 1991
  8.  ;
  9.  ;  This subroutine can be called from programs written in C/C++
  10.  ;
  11.  ;  Usage: CCOLOR( M, N, C)
  12.  ;
  13.  ;  Parameters:
  14.  ;
  15.  ;  M   - first line to be cleared
  16.  ;  N   - last line to be cleared
  17.  ;  C   - background and character attributes
  18.  ;
  19.  ;  All parameters are  through the stack
  20.  ;
  21.  ;***********************************************************
  22.     .MODEL  SMALL
  23.     PUBLIC  CCOLOR
  24. EXTRN   COLOR : FAR
  25.     .CODE
  26. CCOLOR  PROC    NEAR C USES AX BX CX DX ES DI, M:byte, N:byte, C:byte
  27. ;----------------------------------------------------------
  28. ;  Accept parameters passed
  29.     mov     CH,M                  ; number of first line M
  30.     mov     DH,N                  ; number of last line N
  31.     mov     AH,C                  ; color + attribute C
  32.     call    far ptr COLOR         ; function subroutine call
  33. ;  Restore registers and exit
  34.     ret
  35. CCOLOR ENDP
  36.     END
  37.