2 ! alloca
() - allocate space on the stack Author
: Kees J. Bot
5 #if __ACK__ /* BCC can't do alloca(), register saving is wrong. */
10 pop cx
! Return address
11 pop ax
! Bytes to allocate
12 add ax
, #2*2+1 ! Add space for two saved register variables
13 andb al
, #0xFE ! Align
14 mov bx
, sp
! Keep current sp
15 sub sp
, ax
! Lower stack
16 mov ax
, sp
! Return value
17 push
2(bx
) ! Push what is probably the saved si
19 ! Now ACK can still do
:
20 ! pop di; pop si; mov sp
, bp; pop bp; ret
21 push ax
! Dummy argument