Subversion Repositories Kolibri OS

Rev

Rev 381 | Go to most recent revision | Blame | Last modification | View Log | Download | RSS feed

  1. $Revision: 425 $
  2. ;
  3. ; Call of videomode driver's functions
  4. ;
  5. ; (Add in System function 21 (and/or 26) as a subfunction 13)
  6. ;
  7. ; Author: Trans
  8. ; Date:  19.07.2003
  9. ;
  10. ; Include in MeOS kernel and compile with FASM
  11. ;
  12.  
  13. uglobal
  14.   old_screen_width  dd ?
  15.   old_screen_height dd ?
  16. endg
  17.  
  18.      cmp  eax,13                 ; CALL VIDEOMODE DRIVER FUNCTIONS
  19.      jne  .no_vmode_drv_access
  20.         pushd   [ScreenWidth] [ScreenHeight]
  21.         popd    [old_screen_height] [old_screen_width]
  22.      or   eax,-1                 ; If driver is absent then eax does not change
  23.      call 0x760100               ; Entry point of video driver
  24.      mov  [esp+36],eax
  25.      mov  [esp+24],ebx
  26.      mov  [esp+32],ecx
  27. ;    mov  [esp+28],edx
  28.         mov     eax,[old_screen_width]
  29.         mov     ebx,[old_screen_height]
  30.         sub     eax,[ScreenWidth]
  31.         jnz     @f
  32.         sub     ebx,[ScreenHeight]
  33.         jz      .resolution_wasnt_changed
  34.         jmp     .lp1
  35.     @@: sub     ebx,[ScreenHeight]
  36.   .lp1: sub     [screen_workarea.right],eax
  37.         sub     [screen_workarea.bottom],ebx
  38.  
  39.         call    repos_windows
  40.         mov     eax, 0
  41.         mov     ebx, 0
  42.         mov     ecx, [ScreenWidth]
  43.         mov     edx, [ScreenHeight]
  44.         call    calculatescreen
  45.  
  46.   .resolution_wasnt_changed:
  47.      ret
  48.    .no_vmode_drv_access:
  49.