Subversion Repositories Kolibri OS

Rev

Rev 1276 | Blame | Last modification | View Log | Download | RSS feed

  1. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2. ;;                                                              ;;
  3. ;; Copyright (C) KolibriOS team 2004-2007. All rights reserved. ;;
  4. ;; Distributed under terms of the GNU General Public License    ;;
  5. ;;                                                              ;;
  6. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  7.  
  8. $Revision: 1276 $
  9.  
  10.  
  11. ;
  12. ; Call of videomode driver's functions
  13. ;
  14. ; (Add in System function 21 (and/or 26) as a subfunction 13)
  15. ;
  16. ; Author: Trans
  17. ; Date:  19.07.2003
  18. ;
  19. ; Include in MeOS kernel and compile with FASM
  20. ;
  21.  
  22. uglobal
  23.   old_screen_width  dd ?
  24.   old_screen_height dd ?
  25. endg
  26.  
  27. ;     cmp  eax,13                 ; CALL VIDEOMODE DRIVER FUNCTIONS
  28.      dec   ebx
  29.      jnz  .no_vmode_drv_access
  30.         pushd   [Screen_Max_X] [Screen_Max_Y]
  31.         popd    [old_screen_height] [old_screen_width]
  32.      or   eax,-1                 ; If driver is absent then eax does not change
  33.      call (VMODE_BASE+0x100)     ; Entry point of video driver
  34.      mov  [esp+36-4],eax
  35.      mov  [esp+24-4],ebx
  36.      mov  [esp+32-4],ecx
  37. ;    mov  [esp+28],edx
  38.         mov     eax,[old_screen_width]
  39.         mov     ebx,[old_screen_height]
  40.         sub     eax,[Screen_Max_X]
  41.         jnz     @f
  42.         sub     ebx,[Screen_Max_Y]
  43.         jz      .resolution_wasnt_changed
  44.         jmp     .lp1
  45.     @@: sub     ebx,[Screen_Max_Y]
  46.   .lp1: sub     [screen_workarea.right],eax
  47.         sub     [screen_workarea.bottom],ebx
  48.  
  49.         call    repos_windows
  50.         xor     eax,eax
  51.         xor     ebx,ebx
  52.         mov     ecx, [Screen_Max_X]
  53.         mov     edx, [Screen_Max_Y]
  54.         call    calculatescreen
  55.  
  56.   .resolution_wasnt_changed:
  57.      ret
  58.    .no_vmode_drv_access:
  59.