home *** CD-ROM | disk | FTP | other *** search
/ ProfitPress Mega CDROM2 …eeware (MSDOS)(1992)(Eng) / ProfitPress-MegaCDROM2.B6I / UTILITY / SCREEN / VIDMODE.ZIP / 43.ASM < prev    next >
Encoding:
Assembly Source File  |  1990-08-11  |  2.0 KB  |  67 lines

  1. title
  2.  
  3. code    segment
  4.         assume          cs:code,ds:code
  5.  
  6.         org     100h
  7.  
  8. begin:
  9.         mov     ax,500h         ;Set the active page to 0.
  10.         int     10h
  11.  
  12.         mov     ax,1200h        ;Request ega information.
  13.         mov     bl,10h
  14.         xor     cx,cx           ;CX will contain info if ega.
  15.         int     10h
  16.  
  17.         or      cx,cx           ;cx will not be 0 if ega is present.
  18.         jz      done            ;ega not present.
  19.  
  20.         mov     bl,30h          ;Select scan lines for alphanumeric modes.
  21.         mov     ax,1201h        ;Set 350 scan lines.
  22.         int     10h
  23.  
  24.         mov     ax,7            ;Assume monochrome.
  25.         or      bh,bh           ;Monochrome color bh == 0 if color.
  26.         jnz     label_1
  27.         mov     al,3            ;80 X 25 color text.
  28.  
  29. label_1:
  30.         int     10h
  31.  
  32.         mov     ax,1112h        ;Load ROM 8x8 Double Dot Font.
  33.  
  34.         mov     bl,0            ;Block 0 (destination of font).
  35.         int     10h
  36.  
  37. ;        mov     ax,1200h        ;Alternate screen routine
  38. ;        mov     bl,20h          ;Alternate print screen routine
  39. ;        int     10h
  40.  
  41. ;Next find the attribute to use for clearing the screen.
  42.         mov     dl,' '          ;Write out a byte
  43.         mov     ah,2            ;using DOS
  44.         int     21h
  45.  
  46.         mov     al,8            ;Now backspace
  47.         mov     ah,14           ;Using BIOS call
  48.         xor     bh,bh           ;Page number 0.
  49.         int     10h
  50.  
  51.         mov     ah,8            ;Read character & attribute
  52.         int     10h             ;using BIOS call (bh = pg)
  53.         mov     bh,ah           ;And save attribute to clear screen.
  54.  
  55.         xor     cx,cx           ;Top row and column == 0, 0
  56.         mov     ax,600h         ;Clear screen.
  57.         mov     dx,(49 shl 8) + 79
  58.         int     10h             ;Clear from top to bottom.
  59.  
  60. done:
  61.         mov     ax,4c00h
  62.         int     21h             ;Program terminate.
  63.  
  64. code    ends
  65.         end        begin
  66.  
  67.