embedded systems developers tools, cross compilers
  Home  |   SwiftX Archive  |   SwiftForth Archive  |

Re: Making HCELL With -?

From: Elizabeth D. Rather <erather_at_forth.com>
Date: Wed, 21 Mar 2001 14:51:57 -0800

Confused. What computer are you programming? Host's cell size and
target's aren't necessarily the same, nor do they have anything to do with
each other. In what circumstance do you care at all about the host's cell
size? I don't understand why you're making any HOST definitions here at
all. Depending on how you're using this, you may need only INTERPRETER,
possibly TARGET as well, but probably not HOST. That's only causing
trouble. One rarely needs to make HOST definitions in SwiftX.

Cheers,
Elizabeth

At 03:58 PM 3/21/01 -0600, you wrote:

>Would code excerp (3) be the best solution to prevent possible bugs from
>duplicating the same definition two places, or does
>somebody else have a better idea?
>
>(1) HOST's HCELLS is vulnerable since EQU HCELL is not available in HOST:
>--------------------------------
>HOST
>CELL 2/ EQU HCELL \ NOTE: Change HOST HCELLS as well.
>: HCELLS ( n1 -- n2 ) CELL 2/ * ;
>INTERPRETER
>: HCELLS ( n1 -- n2 ) HCELL * ;
>TARGET
>: HCELLS ( n1 -- n2 ) HCELL * ;
>
>
>(2) TARGET's HCELLS is vulnerable since CONSTANT HCELL is not available in
>TARGET:
>--------------------------------
>HOST
>CELL 2/ CONSTANT HCELL \ NOTE: Change TARGET HCELLS as well.
>HOST
>: HCELLS ( n1 -- n2 ) HCELL * ;
>INTERPRETER
>: HCELLS ( n1 -- n2 ) HCELL * ;
>TARGET
>: HCELLS ( n1 -- n2 ) CELL 2/ * ;
>
>(3)
>--------------------------------
>HOST
>CELL 2/ CONSTANT HCELL
>HCELL EQU HCELL
>: HCELLS ( n1 -- n2 ) HCELL * ;
>INTERPRETER
>: HCELLS ( n1 -- n2 ) HCELL * ;
>TARGET
>: HCELLS ( n1 -- n2 ) HCELL * ;
>
>-----Original Message-----
>From: swiftx-bounce_at_forth.com [mailto:swiftx-bounce_at_forth.com]On Behalf
>Of Elizabeth D. Rather
>Sent: Wednesday, March 21, 2001 3:25 PM
>To: swiftx_at_forth.com; swiftx_at_forth.com
>Subject: [swiftx] Re: Making HCELL With -?
>
>Because the purpose of EQU is to make a definition that will be used in
>constructing target definitions. Therefore, a word defined by EQU isn't
>available in the HOST scope, only in INTERPRETER, COMPILER, TARGET, and
>ASSEMBLER.
>
>Cheers,
>Elizabeth
>
>At 03:11 PM 3/21/01 -0600, Dennis W. Bulgrien wrote:
>
> >Does somebody mind teaching me why the following gives me HCELL ?
> >
> >SwiftX ColdFire 2.51.3
> >HOST ok
> >CELL 2/ EQU HCELL ok
> >: HCELLS HCELL * ; HCELL ?
>
>----------------------------------------------------------------------
>swiftx_at_forth.com The SwiftX programming discussion email list
>To unsubscribe, send subject "unsubscribe swiftx" to listar_at_forth.com
>For help with listar commands, send subject "help" to listar_at_forth.com
>Archives are located at http://www.forth.com/swiftx -- check them out!

================================================
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."
================================================

----------------------------------------------------------------------
swiftx_at_forth.com The SwiftX programming discussion email list
To unsubscribe, send subject "unsubscribe swiftx" to listar_at_forth.com
For help with listar commands, send subject "help" to listar_at_forth.com
Archives are located at http://www.forth.com/swiftx -- check them out!
Received on Wed Mar 21 2001 - 14:55:17 PST

This archive was generated by hypermail 2.2.0 : Wed Jan 07 2009 - 03:04:22 PST