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

  1.  
  2. ;Pcspace-screen driver Trident- 16colors
  3. ;
  4. ;To create a tridentl.drv:
  5. ; tasm tridentl
  6. ; tlink tridentl
  7. ; exe2bin tridentl
  8. ; ren tridentl.bin tridentl.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 15 ;number of colors-1
  28.        ;Table of parameters for initialization
  29.        ;Parametertabelle für Initialisierung
  30.        db 12h ;Mode 0: resolution 640*480
  31.        db 5bh ;Mode 1: resolution 800*600
  32.        db 5fh ;Mode 2: resolution 1024*768
  33.        db -1  ;Mode 3: resolution 1280*960 (no such resolution)
  34.        db -1  ;Mode 4: resolution 1280*1024 (no such resolution)
  35.  
  36.        db "Trident 16colors" ;Identification text for SETUP
  37.        db 0                   ;length can be adjustable
  38.  
  39.      ;Initialize video mode
  40.      ;Used registers: ax,bx
  41.      ;al has been set to the value of the parameter table
  42.      ;No such resolution (Par.-1) has been captured already.
  43.  init: xor   ah,ah
  44.        int   10h
  45.        retf
  46.  
  47.  
  48.      ;set video bank
  49.      ;Used registers: ax,dx,es
  50.  bank: mov   dx,0a000h   ;segmentadr. video memory
  51.        mov   es,dx
  52.  
  53.        mov   ah,al
  54.        mov   dx,03c4h
  55.        mov   al,0bh
  56.        out   dx,al
  57.        inc   dx
  58.        in    al,dx
  59.  
  60.        xor   ah,2
  61.        mov   al,0eh
  62.        dec   dx
  63.        out   dx,ax
  64.        retf
  65.  
  66.  
  67. start  endp
  68.  
  69. prog  ends
  70.  
  71.  end  start