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

  1.  
  2. ;Pcspace-screen driver Hercules- 16colors
  3. ;
  4. ;To create a hercl.drv:
  5. ; tasm hercl
  6. ; tlink hercl
  7. ; exe2bin hercl
  8. ; ren hercl.bin hercl.drv
  9. ; Attention: Maximum length of the drv file: 256 Bytes
  10.  
  11. prog  segment para 'code'
  12.  assume cs:prog
  13.  assume ds:prog
  14.  assume ss:prog
  15.  assume es:prog
  16.  
  17. start  proc  far
  18.        ; Initialize entry point for video mode
  19.        jmp short init
  20.  
  21.        ; Set the entry point 64k bank and set the segment address to es
  22.        ; The bank number has been set in al.
  23.        jmp short bank
  24.  
  25.      ;parameter for the driver
  26.        db 15 ;number of colors-1
  27.        ;Table of parameters for initialization
  28.        ;Parametertabelle für Initialisierung
  29.        db 12h ;Mode 0: resolution 640*480
  30.        db 5bh ;Mode 1: resolution 800*600
  31.        db 5fh ;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 "Hercules SVGA 16colors" ;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: xor   ah,ah
  43.        int   10h
  44.        retf
  45.  
  46.  
  47.      ;set video bank
  48.      ;Used registers: ax,dx,es
  49.  bank: mov   dx,0a000h   ;segmentadr. video memory
  50.        mov   es,dx
  51.  
  52.        mov   ah,al
  53.        mov   dx,03ceh
  54.        in    al,dx
  55.        push  ax
  56.        mov   al,6
  57.        out   dx,al
  58.  
  59.        inc   dl
  60.        in    al,dx
  61.        dec   dl
  62.        or    al,4
  63.        mov   ah,al
  64.        mov   al,06h
  65.        out   dx,ax
  66.        mov   dl,0c4h
  67.        mov   al,0bh
  68.        out   dx,al
  69.  
  70.        inc   dl
  71.        in    al,dx
  72.        dec   dl
  73.        pop   ax
  74.        push  ax
  75.        xor   ah,2
  76.        mov   al,0eh
  77.        out   dx,ax
  78.        pop   ax
  79.        mov   dx,03ceh
  80.        out   dx,al
  81.        retf
  82.  
  83.  
  84. start  endp
  85.  
  86. prog  ends
  87.  
  88.  end  start