Re: If you got to choose the syntax, what would you do?
- From: Elizabeth D Rather <econklin@xxxxxxxxx>
- Date: Mon, 26 Jun 2006 09:47:07 -1000
Jeff Fox wrote:
Elizabeth D Rather wrote:....
Any ideas on this topic for this thread?1) There is a standard and common practice, it is called Forth. The
What syntax do you use now?
What would you prefer if you had your choice?
simplest possible approach (and one we've used in many applications) is
simply to set the receiving system to interpret text it receives.
If text is too bulky, it can be compressed or tokenized: again, there is
a well-defined approach to this in Open Firmware. The full OF standard
includes a lot of machinery that wouldn't be relevant, but the relevant
subset could certainly be used directly, and there's a pre-existing body
of several thousand programmers who have worked with it.
2) In our SwiftX cross-compilers, we have a simple protocol for
host-target communications, consisting of a very limited set of commands
that the host can send to the target:
a) Return the byte at [specified] address
b) Store [specified] byte at [specified] address
c) Start executing at [specified] address
This is sufficient to let the host examine target memory, download
compiled code, and execute that code. c) allows the host to execute any
definition in the target's memory. The target has about a dozen
commands it can use to obtain services from the host.
So the protocol would be get a count for a program and it starting
address on the target, store byte at address, increment address,
repeat till done, then execute the code at that address.
But that doesn't tell me what syntax you use in Forth.
In terms of our current practice, there is no 'syntax' beyond the command byte (designating a, b, or c above) followed by the data.
Perhaps in your tools you just do incremental comile and that
happens.
Actually, we have two modes, switch-selectable, which can either download a whole program or incrementally compile & download a single definition.
I am thinking more of how you dynamically send the program to the
node when the application is running. Not how a one time program
load takes place before the cable is pulled.
There's no difference. Our targets are all multi-tasked, so the app may be running in one task (or more) while one is communicating with the host or other node capable of responding to commands. I realize this is probably not appropriate for your tiny nodes, but you asked what current practice is.
So maybe there is on answer to my question for SwiftForth?
#1 above is the most flexible,
I understand that it is for your apps.
I don't want to argue about the relative efficiency of that option
vs other options that we have.
#2 requires the least support from the target (a very tiny amount of code).
I understand that it is for your apps on most chips.
Well, you asked what folks currently do. That's what I'm trying to describe.
I don't want to argue about whether less code on the target means
less support. But I think it does. ...
I agree. Some of our targets are very resource-limited, so we work very hard to keep this process efficient in both size & performance.
...
Still I am wondering about the question in the thread subject.
I would prefer to discuss that and it seems that you want to
disucss something else.
Perhaps I need to provide more context.
Yes, that would probably help get closer to the answers you want.
Cheers,
Elizabeth
--
==================================================
Elizabeth D. Rather (US & Canada) 800-55-FORTH
FORTH Inc. +1 310-491-3356
5155 W. Rosecrans Ave. #1018 Fax: +1 310-978-9454
Hawthorne, CA 90250
http://www.forth.com
"Forth-based products and Services for real-time
applications since 1973."
==================================================
.
- Follow-Ups:
- Re: If you got to choose the syntax, what would you do?
- From: Jeff Fox
- Re: If you got to choose the syntax, what would you do?
- References:
- If you got to choose the syntax, what would you do?
- From: Jeff Fox
- Re: If you got to choose the syntax, what would you do?
- From: Elizabeth D Rather
- Re: If you got to choose the syntax, what would you do?
- From: Jeff Fox
- If you got to choose the syntax, what would you do?
- Prev by Date: Re: RfD - Object Extensions
- Next by Date: Re: SEAforth Instruction Set
- Previous by thread: Re: If you got to choose the syntax, what would you do?
- Next by thread: Re: If you got to choose the syntax, what would you do?
- Index(es):
Relevant Pages
|