Searching \ for '[PIC] good examples of command lineinterpreter sou' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: massmind.org/techref/microchip/devices.htm?key=pic
Search entire site for: 'good examples of command lineinterpreter sou'.

Exact match. Not showing close matches.
PICList Thread
'[PIC] good examples of command lineinterpreter sou'
2009\01\14@142850 by A K

flavicon
face


Vitaliy wrote:
{Quote hidden}

The token or hash can be calculated in the buffer filling receive
interrupt routine so that when the CR is received, the command
interpereter doesn't have to compare every character with possible
commands, but only a token.  For longish commands and many commands this
would speed up interpretation.

2009\01\14@144350 by Vitaliy

flavicon
face
A K" wrote:
{Quote hidden}

Olin would know best, but I don't think this is what he's talking about. The
way I understand it, he stores a list of ASCII commands in a table, and then
the parsing routine compares the message that was received to each string
within the table, generating a unique ID.

Vitaliy

2009\01\14@161942 by Bob Ammerman

picon face
I would be tempted to use a table with the following fields:

1) the command itself
2) the minimum number of characters of the command the user must enter
3) a bitmask (or other data) that describes the expected argument(s) for the
command
4) the address of the code to handle the command (a function for "C" or just
a code pointer for ASM).

Then my logic looks like this:

Scan table for match to command (taking into account minimum length for
matching)

Use bitmask to control parsing arguments.

Branch to code to handle command.

--- Bob Ammerman
RAm Systems


More... (looser matching)
- Last day of these posts
- In 2009 , 2010 only
- Today
- New search...