Subversion Repositories Kolibri OS

Rev

Rev 8709 | Rev 8851 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 8709 Rev 8840
Line 3... Line 3...
3
;; Copyright (C) KolibriOS team 2004-2016. All rights reserved. ;;
3
;; Copyright (C) KolibriOS team 2004-2016. All rights reserved. ;;
4
;;  Distributed under terms of the GNU General Public License.  ;;
4
;;  Distributed under terms of the GNU General Public License.  ;;
5
;;                                                              ;;
5
;;                                                              ;;
6
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
6
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Line 7... Line 7...
7
 
7
 
Line 8... Line 8...
8
$Revision: 8709 $
8
$Revision: 8840 $
Line 9... Line 9...
9
 
9
 
Line 509... Line 509...
509
        mov     eax, ecx ;convert offset to index of slot
509
        mov     eax, ecx ;convert offset to index of slot
510
        pop     ecx
510
        pop     ecx
511
        pop     ebx
511
        pop     ebx
512
        ret
512
        ret
Line 513... Line -...
513
 
-
 
514
check_region:
-
 
515
;input:
-
 
516
;  esi - start of buffer
-
 
517
;  edx - size of buffer
-
 
518
;result:
-
 
519
;  eax = 1 region lays in app memory
-
 
520
;  eax = 0 region don't lays in app memory
-
 
521
 
-
 
522
        mov     eax, 1
-
 
523
        ret
-
 
524
if 0
-
 
525
        mov     eax, [CURRENT_TASK]
-
 
526
;     jmp  check_process_region
-
 
527
;-----------------------------------------------------------------------------
-
 
528
;check_process_region:
-
 
529
;input:
-
 
530
;  eax - slot
-
 
531
;  esi - start of buffer
-
 
532
;  edx - size of buffer
-
 
533
;result:
-
 
534
;  eax = 1 region lays in app memory
-
 
535
;  eax = 0 region don't lays in app memory
-
 
536
 
-
 
537
        test    edx, edx
-
 
538
        jle     .ok
-
 
539
        shl     eax, 5
-
 
540
        cmp     word [CURRENT_TASK+eax+0xa], 0
-
 
541
        jnz     .failed
-
 
542
        shl     eax, 3
-
 
543
        mov     eax, [SLOT_BASE+eax+0xb8]
-
 
544
        test    eax, eax
-
 
545
        jz      .failed
-
 
546
 
-
 
547
        mov     eax, 1
-
 
548
        ret
-
 
549
.ok:
-
 
550
        mov     eax, 1
-
 
551
        ret
-
 
552
.failed:
-
 
553
        xor     eax, eax
-
 
554
        ret
-
 
Line 555... Line 513...
555
end if
513
 
556
 
514
 
557
align 4
515
align 4
558
proc read_process_memory
516
proc read_process_memory