home *** CD-ROM | disk | FTP | other *** search
/ POINT Software Programming / PPROG1.ISO / basic / bmag / curscrn.asm < prev    next >
Encoding:
Assembly Source File  |  1994-04-09  |  1021 b   |  30 lines

  1. Comment *
  2. This program will determine the current screen background and
  3. foreground colors according to the current screen settings.
  4. Note-You'll have to get the fg from the bg.
  5. Compiled under TASM 3.2
  6. *
  7.  
  8. Public READSCREEN            ;define procedure as public
  9.  
  10. .model medium,basic           ;setup OBJ for BASIC
  11. .code 
  12.  
  13. Comment *
  14. DECLARE SUB READSCREEN (CharANSI%,clr%) 
  15. *
  16. READSCREEN      PROC far  
  17.          push bp  
  18.          mov bp,sp             ;setup stack  
  19.          mov ah,08h            ;subset of int 10h to determine  
  20.          mov bh,00h            ;Char and Color (bcd?) at cursor.  
  21.          int 10h               ;do that interrupt  
  22.          mov bx,[bp+006h]      ;return clr%  
  23.          mov [bx],aH           ;move retrun Ah into Bx so we can Read it.  
  24.      mov bx,[bp+008h]      ;return CharAnsi%  
  25.          mov [bx],al           ;move Al in to bx for return  
  26.          pop bp             ;restore stack  
  27.          ret 4                 ;send'em back to basic 
  28. READSCREEN Endp 
  29. end  
  30.