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

  1. ;************************************************************
  2. ;  Program BColor ( 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
  10. ;  in MS BASIC, FORTRAN and PASCAL
  11. ;
  12. ;  Type of parameters: Integer*1, Integer*2, Integer*4
  13. ;
  14. ;  Parameters:
  15. ;
  16. ;  M  - first line to be cleared
  17. ;  N  - last line to be cleared
  18. ;  C  - background and character attributes
  19. ;
  20. ;  All parameters are passed by reference, through the stack
  21. ;
  22. ;  The FAR calls are used
  23. ;***********************************************************
  24. ;
  25.     extrn   color: far
  26.     public  bcolor
  27. .code
  28. bcolor proc    basic far uses ax bx cx dx, 
  29.         M: far ptr word, N: far ptr word, C: far ptr word
  30.  
  31. ;----------------------------------------------------------
  32. ;  accept parameters passed
  33.     lds     bx,C                       ;  full address C into DS:BX
  34.     mov     AH,[bx]                    ;  load C value into AH
  35.     mov     bx,N                       ;  offset N into DX
  36.     mov     DH,[bx]                    ;  load value N into DH
  37.     mov     bx,M                       ;  offset M into DX
  38.     mov     CH,[bx]                    ;  load value M into CH
  39.     Call    COLOR                      ;  call functional subroutine
  40.     RET
  41. FCOLOR  ENDP
  42.     END
  43.