;-----------------------------------------------------------------------------
; probe8.asm - check stack upon procedure entry
; Adapted from Visual Studio C runtime library
; Portions Copyright (c) Microsoft Corporation. All rights reserved.
;-----------------------------------------------------------------------------
.model flat
.code
extern __chkstk:near
__alloca_probe_8 proc public ; 8 byte aligned alloca
push ecx
lea ecx, [esp] + 8 ; TOS before entering this function
sub ecx, eax ; New TOS
and ecx, (8 - 1) ; Distance from 8 bit align (align down)
add eax, ecx ; Increase allocation Size
sbb ecx, ecx ; ecx = 0xFFFFFFFF if size wrapped around
or eax, ecx ; cap allocation size on wraparound
pop ecx ; Restore ecx
jmp __chkstk
__alloca_probe_8 endp
end
Detected encoding: ASCII (7 bit) | 2
|