[Coco] 512k test

Arthur Flexser flexser at fiu.edu
Fri Dec 6 23:09:39 EST 2013


On Fri, Dec 6, 2013 at 10:36 PM, Mathieu Bouchard <matju at artengine.ca> wrote:

> Doesn't a simple LPEEK do the job ? LPEEK and LPOKE do a ?FC ERROR if the
> address is too far.

No, LPEEK and LPOKE do not test for the CoCo's memory capacity, but
just assume the address is valid if it is less than 512K and read a
ghost value if the range is outside a 128K machine's memory capacity.
The ?FC ERROR only occurs if the address exceeds 512K (&H80000 or
greater.)  So, in a 128K machine, an LPEEK or LPOKE to $12345 is
equivalent to one to $22345 or $32345, etc.

Art

>



More information about the Coco mailing list