It looks like you defined x with a CDATA section defined in your example below.
If you SEE x it should be apparent what's happening. (I tried it and x ends
SEE x
39E0 1BC6 AB JSR 4EB900001BC6
39E6 PFA 39EA ok
' x .' x ok
' x 0A + .' x ok
Remember that the cross-compiler version of .' looks in several for the closest
match. There's no "type" associated with the address you pass to .' so if it
finds more than one thing in the dictionary with the same value, you will get
the last closest one found. If you look at the internal workings of .'(T) (the
version of .' you use when in TARGET scope), you can see the search order:
['] *ASSEMBLER (THREADS)
['] *EQUATES (THREADS)
['] *SHELL (THREADS)
['] *INTERPRETER (THREADS)
['] *TARGET (THREADS)
Your defining word uses CREATE which makes a TWIN (twins are evil but so useful)
of the PFA value. So ' x returns the code address of x and .' finds that one in
*TARGET and ' x 0A + is the same as the PFA of x and .' finds the TWIN in
*INTERPRETER.
Hope this sheds some light on the mystery. Also note that .' is used in
generating some of the output from SEE so sometimes the results look a bit
strange.
--Leon
> -----Original Message-----
> From: swiftx-bounce_at_forth.com [mailto:swiftx-bounce_at_forth.com]On Behalf
> Of Bulgrien, Dennis
> Sent: Thursday, January 24, 2002 7:24 AM
> To: swiftx_at_forth.com
> Subject: [swiftx] .' Duplex
>
>
>
> Given the code below "' x 10 + .'" isn't "x +10"!
>
> TARGET READY
> SwiftX/68K FORCE CPU-30/33 ok
> ' x H. 39E0 ok
> ' x 1 - .' before +01 ok
> ' x 0 + .' x ok
> ' x 1 + .' x +01 ok
> ' x 9 + .' x +09 ok
> ' x 10 + .' x ok
> ' x 11 + .' x +01 ok
> ' x 13 + .' x +03 ok
> ' x 14 + .' after ok
> ________________________________________
>
> TARGET
>
> 1 CELLS EQU LOCALS:
>
> #USER
> CELL +USER 'LD \ points to top of local data stack
> -? EQU #USER
>
> INTERPRETER
>
> 8 CONSTANT LCELL
>
> : LDARRAY ( l n -- l' ) CREATE OVER , +
> ;CODE ( -- a ) A0 ) A0 MOV 'LD U) A0 ADD A0 S -) MOV
> RTS END-CODE
>
> : LDLVARIABLE ( l -- l' ) LCELL LDARRAY ;
>
> TARGET
>
> LOCALS:
> LDLVARIABLE x
> ----------------------------------------------------------------------
> 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!
> ----------------------------------------------------------------------
> THIS LIST IS NOT FOR BUG REPORTS! Send bug reports to support_at_forth.com.
>
----------------------------------------------------------------------
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!
----------------------------------------------------------------------
THIS LIST IS NOT FOR BUG REPORTS! Send bug reports to support_at_forth.com.
Received on Thu Jan 24 2002 - 08:00:46 PST
Subscribe to our e-mail list service. It's free for all SwiftForth and SwiftX users!
This archive was generated 09-Feb-2012. Archive updated nightly.