From jonw@keil.com Thu Feb  6 11:10:36 1997
Date: Wed, 5 Feb 1997 20:10:55 -0600
From: Jon Ward <jonw@keil.com>
To: "'8051code @keil.com'" <8051code@keil.com>
Subject: FW: Looking for code to receive a variable length string from the serial port...


Here is an example program written in C for the Keil C51 compiler (it 
probably works with other compilers) that receives variable length strings 
from the 8051 serial port, compares the string to a list of commands, and 
performs some action based on the comparison.  This works with the 
interrupt driven serial port code that I sent to the list server earlier 
this week.  There are several sections to this and it's not completely 
trivial, so I'll dummy up part of a main function to show how it all works.

The first routine is the main C function.  This is dummied up and it may 
not work, but it sortof shows how to make it go.

