home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Simtel MSDOS 1992 December
/
simtel1292_SIMTEL_1292_Walnut_Creek.iso
/
msdos
/
small_c
/
sc88.arc
/
AVAIL.C
< prev
next >
Wrap
Text File
|
1987-10-04
|
512b
|
18 lines
#define NOCCARGC /* no argument count passing */
extern char *Umemptr;
/*
** Return the number of bytes of available memory.
** In case of a stack overflow condition, if 'abort'
** is non-zero the program aborts with an 'S' clue,
** otherwise zero is returned.
*/
avail(abort) int abort; {
char x;
if(&x < Umemptr) {
if(abort) exit('M');
return (0);
}
return (&x - Umemptr);
}