1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950 |
- .686
- .model FLAT
- PUBLIC _lifo_push
- _TEXT SEGMENT
- lifo = 4
- entry = 8
- _lifo_push PROC
- mov ecx, DWORD PTR 4[esp]
- mov edx, DWORD PTR 8[esp]
- again:
- mov eax, DWORD PTR [ecx]
- mov DWORD PTR[edx], eax
- lock cmpxchg DWORD PTR [ecx], edx
- jnz again
- ret 0
- _lifo_push ENDP
- PUBLIC _lifo_pop
- _TEXT SEGMENT
- lifo = 4
- _lifo_pop PROC
- push esi
- push ebx
- mov esi, DWORD PTR 12[esp]
- again:
-
- mov edx, DWORD PTR [esi+4]
-
- mov eax, DWORD PTR [esi]
- test eax, eax
- jz bail
- mov ecx, edx
- mov ebx, DWORD PTR [eax]
- inc ecx
- lock cmpxchg8b QWORD PTR [esi]
- jnz again
- bail:
- pop ebx
- pop esi
- ret 0
- _lifo_pop ENDP
- _TEXT ENDS
- END
|