/* TRYDLL.C */

#include <stdlib.h>
#include <stdio.h>
#include "testdll.h"

extern int far cdecl r286printf(char far *mask, ...);

main(int argc, char *argv[])
{
    int x = (argc < 2) ? 2 : atoi(argv[1]);
    int y = foo(x);
    char s[] = "hello world";
    char s2[] = 
        "this is another  test of the\t Borland C++\nrun-time library";
    char far *p;
    r286printf("foo(%u) ==> %u\n", x, y);
    // use Borland register pseudovariables:
    r286printf("in APP: DS=%04x SS=%04x\n", _DS, _SS);
    r286printf("mine() ==> %u\n", get());
    r286printf("length(%s) ==> %u\n", s, length(s));
    p = token(s2, " \t\n");
    r286printf("tokens: <%Fs> ", p);
    while (p = token(0, " \t\n"))
        r286printf("<%Fs> ", p);
    r286printf("\n");
    return 0;
}
