1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-01-08 04:30:45 -08:00
emacs/mps/code/spi3.asm
Richard Brooksby b824e1c406 Updating copyright messages to say copyright 2001 ravenbrook throughout.
Adding some missing copyright messages.

Copied from Perforce
 Change: 24818
 ServerID: perforce.ravenbrook.com
2001-12-05 16:18:43 +00:00

27 lines
682 B
NASM

; impl.asm.spi3: STACK PROBE
;
; $Id$
; Copyright (c) 2001 Ravenbrook Limited.
;
; This function reads a location that is probeDepth words beyond
; the current stack pointer. On intel platforms the stack grows
; downwards so this means reading from a location with a lesser address.
;
; The registers edi, esi, ebx are the registers defined to be preserved
; across function calls, so we do not use those.
.386
.model flat
.code
_StackProbe proc public ; (Size probeDepth)
push ebp ; frame pointer
mov ebp,esp
mov eax, [ebp+08]
neg eax
mov eax, [esp+eax*4] ; do the actual probe
leave
ret ; return
_StackProbe endp
end