Rev 5023 | Rev 5037 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 5023 | Rev 5036 | ||
---|---|---|---|
Line 44... | Line 44... | ||
44 | .invalid_pointer: |
44 | .invalid_pointer: |
45 | pop ecx ebx |
45 | pop ecx ebx |
46 | ret |
46 | ret |
Line 47... | Line 47... | ||
47 | 47 | ||
48 | linkedlist_isvalid: ;eax - pointer to check; returns zero if valid |
- | |
49 | inc ecx |
- | |
50 | test eax, eax |
- | |
51 | jz .valid_pointer ;actually, poiner is not valid |
48 | linkedlist_isvalid: ;eax - pointer to check; returns zero if valid |
52 | push ebx ecx |
49 | push ebx ecx |
- | 50 | xor ecx, ecx |
|
- | 51 | test eax, eax |
|
53 | xor ecx, ecx |
52 | jz .invalid_pointer |
54 | mov ebx, [head] |
53 | mov ebx, [head] |
55 | .next_check: |
54 | .next_check: |
56 | cmp eax, ebx |
55 | cmp eax, ebx |
57 | jz .valid_pointer |
56 | jz .valid_pointer |