Re: Rob - How does peek4s/peek4u work?
- Posted by Robert Craig <rds at RapidEuphoria.com> Apr 24, 2002
- 367 views
Jonas writes: > Out of curiosity, does peek4s/peek4u assume the most signifcant byte > will for or last in a 4 byte binary value? They assume the standard byte-order on Intel (and compatibles). The least significant byte comes first in memory (at the lowest address). Then the next least, then the 2nd-most significant, then the most significant. Run this to test: include machine.e atom addr addr = allocate(4) poke(addr, {1,2,3,4}) printf(1, "%08x", peek4u(addr)) If Euphoria were ported to a non-Intel-based machine, peek4u/peek4s would have to conform to that machine's byte order. Regards, Rob Craig Rapid Deployment Software http://www.RapidEuphoria.com