Subversion Repositories Kolibri OS

Rev

Rev 1951 | Blame | Compare with Previous | Last modification | View Log | Download | RSS feed

  1. ;---------------------------------------------------------------------
  2. error_window:
  3.         test    dword [status],32
  4.         jnz     still
  5.        
  6.         or      dword [status],32
  7.         mcall   9,procinfo,-1
  8.         mov     eax,[ebx+46]
  9.         test    eax,eax
  10.         jnz     @f
  11.        
  12.         mov     eax,100
  13.         mov     [error_window_y+2],ax
  14.         mov     [error_window_x+2],ax
  15.         jmp     .end
  16. ;---------------------------------------------------------------------
  17. @@:
  18.         shr     eax,1
  19.         add     eax,[ebx+38]
  20.         sub     eax,50
  21.         mov     [error_window_y+2],ax
  22.         mov     eax,[ebx+42]
  23.         shr     eax,1
  24.         add     eax,[ebx+34]
  25.         sub     eax,150
  26.         mov     [error_window_x+2],ax
  27. .end:
  28.         call    get_memory_for_thread_stack
  29.         mov     [thread_stack_6],eax
  30.         mcall   51,1,thread6    ; thread_stack_6
  31.         ret
  32. ;---------------------------------------------------------------------
  33. thread6:
  34.         mcall   9,procinfo_threads,-1
  35.         mov     eax,[ebx+30]
  36.         mov     [PID6],eax
  37.         mcall   40,0x7
  38.         mov     [error_pointer],string
  39. ;--------------------------------------
  40. .red:
  41.         call    .draw_error_window
  42. ;--------------------------------------
  43. .still:
  44.         mcall   10
  45.         cmp     eax,1
  46.         je      .red
  47.  
  48.         cmp     eax,2                   ; key in buffer ?
  49.         je      .key
  50.  
  51.         cmp     eax,3
  52.         je      .button
  53.  
  54.         jmp     .still
  55. ;---------------------------------------------------------------------
  56. .key:           ; key
  57. .button:
  58.         xor     dword [status],32
  59.         xor     eax,eax
  60.         mov     [PID6],eax
  61.         mcall   68,13,[thread_stack_6]
  62.         mcall   -1
  63.         jmp     .still
  64. ;---------------------------------------------------------------------
  65. ;       *********************************************
  66. ;       ******* WINDOW DEFINITIONS AND DRAW ********
  67. ;       *********************************************
  68. .draw_error_window:
  69.         mcall   12, 1
  70.         mcall   0,[error_window_x],[error_window_y],0x03ff0000
  71.         mcall   71,1, errortext
  72.         mcall   4,<10,30>,0x80ffffff,[error_pointer]
  73.         cmp     [return_code],0
  74.         je      .continue
  75.  
  76.         cmp     [return_code],1
  77.         jne     @f
  78.  
  79.         mcall   4,<10,50>,0x90ffffff,error_not_supported_file
  80.         jmp     .end
  81. ;---------------------------------------------------------------------
  82. @@:
  83.         cmp     [return_code],2
  84.         jne     @f
  85.        
  86.         mcall   4,<10,50>,0x90ffffff,error_not_enough_memory
  87.         jmp     .end
  88. ;---------------------------------------------------------------------
  89. @@:
  90.         mcall   4,<10,50>,0x90ffffff,error_unknown
  91.         jmp     .end
  92. ;---------------------------------------------------------------------
  93. .continue:
  94.         mcall   4,<10,50>,0x90ffffff,error_type
  95.         mcall   47,0x800a0000,[error_fs],<140,50>,0x10ffffff
  96.         mov     edx,[error_fs]
  97.         cmp     edx,0
  98.         jb      .end
  99.        
  100.         cmp     edx,11
  101.         ja      .end
  102.        
  103.         shl     edx,2
  104.         add     edx,error_fs_text_pointers
  105.         mov     edx,[edx]
  106.         mcall   4,<10,70>,0x90ffffff,
  107. ;       mcall   47,0x800a0000,[error_locate],<140,5>,0x10ffffff
  108. .end:
  109. ;       mcall   47,0x80000,[PID6],<200, 5>,0xffffff
  110.         mcall   12,2
  111.         ret
  112. ;---------------------------------------------------------------------