home *** CD-ROM | disk | FTP | other *** search
/ Programmer 7500 / MAX_PROGRAMMERS.iso / INFO / TURBOPAS / TUR6_101.ZIP / V1.ASM < prev    next >
Encoding:
Assembly Source File  |  1986-06-07  |  1.9 KB  |  34 lines

  1. ;--------------------------------------------------------------------
  2. ; Author       : Kevin Dahl                                         :
  3. ; Last Revised : June 7, 1986                                       :
  4. ;                                                                   :
  5. ; FILENAME - V1.ENH                                                 :
  6. ;                                                                   :
  7. ; BOARDERCOLOR                                                      :
  8. ;        Set the color of the boarder screen for text modes only    :
  9. ; ENTRY                                                             :
  10. ;        [bp+4] = value in the range 0-15.  It is the color for the :
  11. ;                 boarder on the screen.                            :
  12. ; EXIT                                                              :
  13. ;        Nothing is returned                                        :
  14. ;--------------------------------------------------------------------
  15. boardercolor  proc      near
  16.               push      bp                       ; save stack
  17.               mov       bp,sp
  18.               mov       ah,0fh                   ; get current video mode
  19.               int       10h                      ; use BIOS services
  20.               cmp       al,4                     ; is it text modes 0-3?
  21.               jb        v1
  22.               cmp       al,7                     ; is it monochrome?
  23.               jne       v2                       ; graphics mode, exit routine
  24. v1:
  25.               mov       bl,[bp+4]                ; move color into bl
  26.               xor       bh,bh                    ; zero bh
  27.               mov       ah,0Bh                   ; set color palette service
  28.               int       10h                      ; use BIOS services
  29. v2:
  30.               mov       sp,bp                    ; restore stack
  31.               pop       bp
  32.               ret       2                        ; remove params from stack
  33. boardercolor  endp
  34.