home *** CD-ROM | disk | FTP | other *** search
/ Shareware Compilation 6 / SharewareCD_06.zip / pcspace / video7h.asm < prev    next >
Assembly Source File  |  1993-10-05  |  2KB  |  98 lines

  1.  
  2. ;Pcspace-screen driver VIDEO7- 256colors  (untested)
  3. ;
  4. ;To create a video7h.drv:
  5. ; tasm video7h
  6. ; tlink video7h
  7. ; exe2bin video7h
  8. ; ren video7h.bin video7h.drv
  9. ;
  10. ; Attention: Maximum length of the drv file: 256 Bytes
  11.  
  12. prog  segment para 'code'
  13.  assume cs:prog
  14.  assume ds:prog
  15.  assume ss:prog
  16.  assume es:prog
  17.  
  18. start  proc  far
  19.        ; Initialize entry point for video mode
  20.        jmp short init
  21.  
  22.        ; Set the entry point 64k bank and set the segment address to es
  23.        ; The bank number has been set in al.
  24.        jmp short bank
  25.  
  26.      ;parameter for the driver
  27.        db 255 ;number of colors-1
  28.        ;Table of parameters for initialization
  29.        db 67h ;Mode 0: resolution 640*480
  30.        db 69h ;Mode 1: resolution 800*600
  31.        db -1  ;Mode 2: resolution 1024*768 (no such resolution)
  32.        db -1  ;Mode 3: resolution 1280*960 (no such resolution)
  33.        db -1  ;Mode 4: resolution 1280*1024 (no such resolution)
  34.  
  35.        db "Video7 256colors" ;Identification text for SETUP
  36.        db 0                  ;length can be adjustable
  37.  
  38.      ;Initialize video mode
  39.      ;Used registers: ax,bx
  40.      ;al has been set to the value of the parameter table
  41.      ;No such resolution (Par.-1) has been captured already.
  42.  init: mov   bl,al
  43.        xor   bh,bh
  44.        mov   ax,6f05h
  45.        int   10h
  46.        retf
  47.  
  48.  
  49.      ;set video bank
  50.      ;Used registers: ax,dx,es
  51.  bank: mov   dx,0a000h       ;segmentadr. video memory
  52.        mov   es,dx
  53.  
  54.        push  bx
  55.        mov   bl,al
  56.        mov   dx,03c4h
  57.        mov   al,0f9h
  58.        out   dx,al
  59.        inc   dx
  60.  
  61.        mov   al,bl
  62.        and   al,01h
  63.        out   dx,al
  64.  
  65.        mov   dl,0cch
  66.        in    al,dx
  67.        and   al,0dfh
  68.        mov   ah,bl
  69.        and   ah,02h
  70.        shl   ah,4
  71.  
  72.        or    al,ah
  73.        mov   dl,0c2h
  74.        out   dx,al
  75.        mov   dl,0c4h
  76.        mov   al,0f6h
  77.        out   dx,al
  78.  
  79.        inc   dx
  80.        in    al,dx
  81.        and   al,0f0h
  82.        mov   ah,bl
  83.        shr   ah,2
  84.  
  85.        mov   bh,bl
  86.        and   bh,4
  87.        or    ah,bh
  88.        or    al,ah
  89.        out   dx,al
  90.        pop   bx
  91.        retf
  92.  
  93.  
  94. start  endp
  95.  
  96. prog  ends
  97.  
  98.  end  start