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

  1.  
  2. ;Pcspace-screen driver ET3000/ET4000- 256colors
  3. ;
  4. ;To create a tsengh.drv:
  5. ; tasm tsengh
  6. ; tlink tsengh
  7. ; exe2bin tsengh
  8. ; ren tsengh.bin tsengh.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 2eh ;Mode 0: resolution 640*480
  30.        db 30h ;Mode 1: resolution 800*600
  31.        db 38h ;Mode 2: resolution 1024*768
  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 "Tseng 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: push  bx
  43.        xor   ah,ah
  44.        int   10h
  45.  
  46.        mov   dx,3cdh
  47.        in    al,dx       ;et3000/4000 test
  48.  
  49.        mov   dx,0e4d0h
  50.        and   al,0c0h
  51.        jz    etst
  52.        mov   dx,0400ch
  53.  
  54.   etst:pop   bx
  55.        add   bx,offset mark
  56.        mov   cs:bx,dx
  57.        retf
  58.  
  59.  
  60.      ;set video bank
  61.      ;Used registers: ax,dx,es
  62.  bank: mov   ah,al
  63.        shl   ah,1
  64.        shl   ah,1
  65.        shl   ah,1
  66.   mark:nop
  67.        nop
  68.        or    al,ah
  69.        mov   dx,03cdh
  70.        out   dx,al
  71.  
  72.        ;segmentadr. video memory
  73.        mov   dx,0a000h
  74.        mov   es,dx
  75.        retf
  76.  
  77.  
  78. start  endp
  79.  
  80. prog  ends
  81.  
  82.  end  start