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

Data storage in paged memory (was DOES>Woes)

From: David Graham <dgraham_at_grahamautomationinc.com>
Date: Sat, 10 Jan 2004 13:21:40 -0700

I don't have time to work on this during the week, and I am just getting
around to implementing Elizabeth's suggestion to add the commmand CDATA
after changing to PAGE2, in order to properly store strings in paged
code space. Below I show the modified example reflecting what I think
were the suggestions. I can tell from .Allocation that PAGE2 space is
being used, but when I try to read any of the data from DATA, using a
version of T defined below, I still always get -1.

328000 32BFFF CDATA SECTION PAGE2

PAGE2
CDATA
CREATE DATA
   0 , 384 , ," First Vial "
   0 , 384 , ," Last Vial "
         
: T DATA @ . ;

The decompiled code for T is:
3531 32 # LDAA 8632 \ This is the correct
page number
3533 8000 # LDX CE8000 \ this is the address
I expect
3536 (BRIDGE) JSR 16CD07
3539 @ JSR 16C27A
353C . JMP 06C86E ok

Any other suggestions? I am using SwiftX 3.1.13 for the HC12. I still
find it confusing what PAGE2 does when IDATA is the current section.
Page 49 of the SwiftX manual states that "an instance becomes the
current section when its name is invoked". That says to me that PAGE2
would invoke CDATA, so PAGE2 CDATA is redundant, consistent with my
getting the same results with PAGE2 and PAGE2 CDATA.

Thanks,
David Graham
Graham Automation, Inc.
623 582-2867

----------------------------------------------------------------------
swiftx_at_forth.com The SwiftX programming discussion email list
To unsubscribe, send subject "unsubscribe" to swiftx-request_at_forth.com
For list command help, send subject "help" to swiftx-request_at_forth.com
Message archives are located at http://www.forth.com/archive/swiftx
----------------------------------------------------------------------
This list is a forum for SwiftX users. For product support and bug
reports, please send email to support_at_forth.com
----------------------------------------------------------------------
Received on Sat Jan 10 2004 - 12:24:06 PST

This archive was generated by hypermail 2.2.0 : Fri Dec 05 2008 - 03:04:22 PST