home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Carousel Volume 2 #1
/
carousel.iso
/
mactosh
/
lang
/
getpargs.sha
/
allocpval.s
next >
Wrap
Text File
|
1985-01-17
|
534b
|
22 lines
| allocpval - Allocate space on the stack for a pascal return value.
|
| Allocates the requested number of bytes (must be even) on top of the stack.
| A pointer to the allocated area is returned.
|
| pointer = allocpval(numbytes);
|
| The allocated space should be freed with freepval.
|
| History
| 01/10/84 Moy Created.
|
.globl allocpval
allocpval:
movl sp,a0 | current stack position
subl sp@(4),a0 | new stack top
movl sp@,a0@ | move return address
movl a0,sp | adjust stack
movl sp,d0
addql #8,d0 | return value
rts