DOES>Woes

From: David Graham <dgraham_at_grahamautomationinc.com>
Date: Sun, 4 Jan 2004 19:08:08 -0700

As I looked more at converting code to store parameters in Serial
EEPROM, I realize I was coasting previously on the surplus of NVRAM, and
the approach I was taking in my previous message would not be very
memory efficient. I would like to store constants such as variable text
descriptions and Max/Min values in code space. There must be a better
way to store:

   0 384 "First Vial"
   0 385 "Last Vial"

than

PROG
CREATE DATA
   0 , 384 , 10 C, CHAR F C, CHAR i C, CHAR r C, CHAR s C, CHAR t C, 32
C, CHAR V C, CHAR i C, CHAR a C, CHAR l C, 0 C, 0 C, 0 C, 0 C, 0 C,
   0 , 384 , 9 C, CHAR L C, CHAR a C, CHAR s C, CHAR t C, 32 C, CHAR V
C, CHAR i C, CHAR a C, CHAR l C, 0 C, 0 C, 0 C, 0 C, 0 C, 0 C,

where the strings are padded to 15 characters, to make the data entries
an equal spaced array.
This works, although it is awkward to maintain and I would really prefer
to store this data in paged code space, but there must be something I do
not understand, because I can't make it work. For example, if I change
Prog to PAGE2 in the above example, and define;

: T DATA @ . ;

I get:

T -1 ok

where I would expect T would return 0. I get the same result when I
change T to read other bytes in the DATA array.

The decompiled code 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

What is wrong? I am using SwiftX 3.1.13 for the HC12. Would an upgrade
help anything? I tried to upgrade a month ago, but no one was there to
take the order, and I never got around to calling back. I can't find
much documention on code paging, other than it is supposed to work.

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 Sun Jan 04 2004 - 18:10:03 PST


Subscribe to our e-mail list service. It's free for all SwiftForth and SwiftX users!

This archive was generated 07-Feb-2012. Archive updated nightly.