Steven C Chan wrote:
>I stored a record in a database, and when I retreive it, I
>get a Fatal Exception from the device and a Unknown m68k
>Exception from the emulator.
>I'm storing the record as "packed" data, so I use Dm
>to write a bunch of values into the data store, being
>sure not to write more than what I requested.
<snip>
>When I cast to a char* and
>do a StrCopy, that works. But after I walk to the ULong
>and cast the address to a ULong* and then derefernce it,
>that's when it dies. Thanks.
If you are packing long or short integers in among character strings, then
what is probably happening is that you have a data alignment problem. Word
and DWord data must be aligned on an appropriate address boundary. If you
pack them in with character strings, then they could end up on an odd
address and cause a processor exception. StrCopy, MemCopy, etc. work since
they address memory by bytes.
Doug Gordon