[Coco] BASIC09 - unsigned INTEGERs?

Allen Huffman alsplace at pobox.com
Sat Jan 31 20:40:51 EST 2015


> On Jan 31, 2015, at 11:56 AM, Aaron Wolfe <aawolfe at gmail.com> wrote:
> 
> You can use ADDR and PEEK to directly access the individual bytes of reg.x
> and reg.u, I.e. XH=PEEK(ADDR(reg.x)) and XL=PEEK(ADDR(reg.x)+1).  This
> should let you display them as bytes, without invoking BASIC09's signing
> logic.


Clever. And that might even work on an OSK system with memory protection since the user would “own” that memory (else it would be a memory exception to PEEK anywhere outside of that and kill the process).

Printing is not the issue. I need to get it in to a REAL. BUT, this method would do that.

Very good, Aaron. That would work nicely, though I still think/hope there would be some built in way to deal with a 16-bit value without it being signed.

--
Allen Huffman - PO Box 22031 - Clive IA 50325 - 515-999-0227 (vmail/TXT only)
Sub-Etha Software - http://www.subethasoftware.com - Established 1990!
Sent from my MacBook.

P.S. Since 4/15/14, I have earned OVER $600  in Amazon gift cards via Swagbucks! Use my link and I get credit:
http://swagbucks.com/refer/allenhuffman







More information about the Coco mailing list