A C program for counting the number of negative numbers in a table in memory

/*
 * Program to count the number of 
 * 8-bit negative numbers from
 * 0x8000 to 0xBFFF
 *
 * February 9, 2000  Bill Rison
 */

#define START 0x8000
#define END   0xBFFF

main()
{
	int count;
	signed char *ptr;

	count = 0;
	ptr = (signed char *) START;
	do
	{
		if (*ptr < 0)
		{
			count = count + 1;
		}
		ptr = ptr + 1;
	}
	while (ptr <= (signed char *) END);
}