home *** CD-ROM | disk | FTP | other *** search
- ;************************************************************
- ; Program CColor ( Chapter 12 )
- ;
- ; The PC screen input/output library Version 1.0
- ; Subroutine for clearing the display screen
- ; (filling it with a specified color)
- ; Copyright (c): A.I.Sopin, Voronezh, Russia 1990 - 1991
- ;
- ; This subroutine can be called from programs written in C/C++
- ;
- ; Usage: CCOLOR( M, N, C)
- ;
- ; Parameters:
- ;
- ; M - first line to be cleared
- ; N - last line to be cleared
- ; C - background and character attributes
- ;
- ; All parameters are through the stack
- ;
- ;***********************************************************
- .MODEL SMALL
- PUBLIC CCOLOR
- EXTRN COLOR : FAR
- .CODE
- CCOLOR PROC NEAR C USES AX BX CX DX ES DI, M:byte, N:byte, C:byte
- ;----------------------------------------------------------
- ; Accept parameters passed
- mov CH,M ; number of first line M
- mov DH,N ; number of last line N
- mov AH,C ; color + attribute C
- call far ptr COLOR ; function subroutine call
- ; Restore registers and exit
- ret
- CCOLOR ENDP
- END
-