Re: even better coerce to record with usrf
Re: even better coerce to record with usrf
- Subject: Re: even better coerce to record with usrf
- From: Nigel Garvey <email@hidden>
- Date: Fri, 14 Dec 2001 23:16:05 +0000
Arthur J Knapp wrote on Fri, 14 Dec 2001 13:25:21 -0500:
[snip]
>
* 3) TEXT 0001 a 0
[more snip, all good stuff]
>
It is also important to notice the final ASCII number 0
>
on this line. Appearently, AppleScript needs to "pad"
>
values whose data-size is not even. The data-size does not
>
reflect this.
With 68000 series processors - and, I imagine, with PowerPC's too - two-
and four-byte integers have to begin at even-numbered memory addresses.
The padding's probably to ensure that that's what happens here. (The
structure itself is probably loaded to an even start address.) I notice
too that the type keywords within the "string" - eg. "TEXT", "usrf",
"long", "list", etc. - are all four bytes long and appear to start at
even boundaries. Possibly (I'm sure the experts here would know) these
are read as four-byte numbers and act as tokens for those data types - eg:
"TEXT"
= byte values $54, $45, $58, and $54 (hexadecimal)
= long value $54455854 (hexadecimal)
NG