im not familar with
buffer = (char *) farmalloc(15);
I would use malloc, Im not exactly sure at what your trying to do, I just had a quick look and fixed a few things the compiler didn't like and got the output down below.
Code:
#include <stdio.h>
#include <stdlib.h>
main()
{
char far, *buffer;
buffer = (char *) malloc(sizeof(char));
buffer = "\n12345678901234567890\0";
printf("\n DS: %x ES %x\n", _DS,_ES);
printf("\n buffer: %x\n", &buffer);
printf("\n far off buffer=%x far seg buffer=%x\n", buffer, buffer);
puts(buffer);
getchar();
exit(0);
}
------------------------------OUTPUT-------------------------------------------
DS: 23 ES 23
buffer: 12ff84
far off buffer=40b120 far seg buffer=40b120
12345678901234567890