Rev 4923 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 4923 | Rev 5121 | ||
---|---|---|---|
Line 699... | Line 699... | ||
699 | ; esi - start of buffer |
699 | ; esi - start of buffer |
700 | ; edx - size of buffer |
700 | ; edx - size of buffer |
701 | ;result: |
701 | ;result: |
702 | ; eax = 1 region lays in app memory |
702 | ; eax = 1 region lays in app memory |
703 | ; eax = 0 region don't lays in app memory |
703 | ; eax = 0 region don't lays in app memory |
- | 704 | ||
- | 705 | mov eax, 1 |
|
- | 706 | ret |
|
- | 707 | if 0 |
|
704 | mov eax, [CURRENT_TASK] |
708 | mov eax, [CURRENT_TASK] |
705 | ; jmp check_process_region |
709 | ; jmp check_process_region |
706 | ;----------------------------------------------------------------------------- |
710 | ;----------------------------------------------------------------------------- |
707 | ;check_process_region: |
711 | ;check_process_region: |
708 | ;input: |
712 | ;input: |
Line 723... | Line 727... | ||
723 | test eax, eax |
727 | test eax, eax |
724 | jz .failed |
728 | jz .failed |
Line 725... | Line 729... | ||
725 | 729 | ||
726 | mov eax, 1 |
730 | mov eax, 1 |
727 | ret |
- | |
728 | - | ||
729 | - | ||
730 | ; call MEM_Get_Linear_Address |
- | |
731 | ; push ebx |
- | |
732 | ; push ecx |
- | |
733 | ; push edx |
- | |
734 | ; mov edx,ebx |
- | |
735 | ; and edx,not (4096-1) |
- | |
736 | ; sub ebx,edx |
- | |
737 | ; add ecx,ebx |
- | |
738 | ; mov ebx,edx |
- | |
739 | ; add ecx,(4096-1) |
- | |
740 | ; and ecx,not (4096-1) |
- | |
741 | ;.loop: |
- | |
742 | ;;eax - linear address of page directory |
- | |
743 | ;;ebx - current page |
- | |
744 | ;;ecx - current size |
- | |
745 | ; mov edx,ebx |
- | |
746 | ; shr edx,22 |
- | |
747 | ; mov edx,[eax+4*edx] |
- | |
748 | ; and edx,not (4096-1) |
- | |
749 | ; test edx,edx |
- | |
750 | ; jz .failed1 |
- | |
751 | ; push eax |
- | |
752 | ; mov eax,edx |
- | |
753 | ; call MEM_Get_Linear_Address |
- | |
754 | ; mov edx,ebx |
- | |
755 | ; shr edx,12 |
- | |
756 | ; and edx,(1024-1) |
- | |
757 | ; mov eax,[eax+4*edx] |
- | |
758 | ; and eax,not (4096-1) |
- | |
759 | ; test eax,eax |
- | |
760 | ; pop eax |
- | |
761 | ; jz .failed1 |
- | |
762 | ; add ebx,4096 |
- | |
763 | ; sub ecx,4096 |
- | |
764 | ; jg .loop |
- | |
765 | ; pop edx |
- | |
766 | ; pop ecx |
- | |
767 | ; pop ebx |
731 | ret |
768 | .ok: |
732 | .ok: |
769 | mov eax, 1 |
733 | mov eax, 1 |
770 | ret |
- | |
771 | ; |
- | |
772 | ;.failed1: |
- | |
773 | ; pop edx |
- | |
774 | ; pop ecx |
- | |
775 | ; pop ebx |
734 | ret |
776 | .failed: |
735 | .failed: |
777 | xor eax, eax |
736 | xor eax, eax |
- | 737 | ret |
|
Line 778... | Line 738... | ||
778 | ret |
738 | end if |
779 | 739 | ||
780 | align 4 |
740 | align 4 |
781 | proc read_process_memory |
741 | proc read_process_memory |