#include <dos.h> #include <alloc.h> #include <stdio.h> int main ( void ) { unsigned int size, segp; int stat; size = 64; /* (64 x 16) = 1024 bytes */ stat = allocmem ( size, &segp ); if ( stat < 0 ) printf ( "Allocated memory at segment:\ %x\n", segp ); else printf ( "Failed: maximum number of\ paragraphs available is %u\n", stat ); freemem ( segp ); return 0; }