Command line editor
Capable of, like a modem, receiving, editing and executing one (command) line of input.
The code in this example project shows a command line editor that can be used in servers (big word) you
build, based on PIC's.
The edit keys are:
Control A = beginning of line
Control E = end of line
Control C = erase line
Backspace = delete previous character
Delete = delete character
Up arrow = previous command
Down arrow = next command
Left arrow = previous character
Right arrow = next character
Character = insert character
CR = execute line
The number of commands remembered can be defined in constant "NrPrevCommands", the
maximum length of the input line (commandline) in variable "LocalCommandLen".
The routines "InputCharPresent", "ReadInputChar", "EchoChar", "EchoText" have to be adapted
to the specific client (rs232, Ethernet, Usb, etc...).
The routine "Execute" has to be adapted to the needs of the application. On entry of it the
commandline to execute is in "LocalCommand".
If needed/present, also the routine "interrupt" has to be adapted to the needs of the application.
In the project as it is now, the client is an rs232/uart based one, e.g. a PC with hyperterminal at 9600 baud. The
uart reception is done via a interrupt based uart receiver, hence the presence of an interrupt service routine.
-------------------------------------------