[Coco] BASIC09 - unsigned INTEGERs?

K. Pruitt pruittk at roadrunner.com
Sun Feb 1 06:53:26 EST 2015


----- Original Message ----- 
From: "Allen Huffman" <alsplace at pobox.com>
To: "CoCoList for Color Computer Enthusiasts" <coco at maltedmedia.com>
Sent: Saturday, January 31, 2015 6:45 PM
Subject: Re: [Coco] BASIC09 - unsigned INTEGERs?


>> On Jan 31, 2015, at 8:42 PM, Robert Gault <robert.gault at att.net> wrote:
>>
>> You don't need to go quite that far to just print the result. If you want 
>> to do 32-bit math you might need to separate the four bytes.
>> As suggested by others, conversion of the hex words to reals might get 
>> around the negative integers.
>
> Yes, I’d love to see someone who can figure this out. I tried all of that 
> with no luck. Even did things like this:
> <SNIP>

PROCEDURE filesize
TYPE Registers=CC,A,B,DP:BYTE; X,Y,U:INTEGER
DIM regs:Registers
DIM path,callcode:BYTE
OPEN #path,"test":READ
callcode=$8D
regs.A:=path
regs.B=$02
RUN SysCall(callcode,regs)
CLOSE #path
PRINT regs.U

It works.




More information about the Coco mailing list