[Coco] BASIC09 - unsigned INTEGERs?

K. Pruitt pruittk at roadrunner.com
Sun Feb 1 08:45:33 EST 2015


----- Original Message ----- 
From: "Allen Huffman" <alsplace at pobox.com>
To: "CoCoList for Color Computer Enthusiasts" <coco at maltedmedia.com>
Sent: Sunday, February 01, 2015 4:18 AM
Subject: Re: [Coco] BASIC09 - unsigned INTEGERs?


>> On Feb 1, 2015, at 6:11 AM, K. Pruitt <pruittk at roadrunner.com> wrote:
>>
>> Oh I can fix that... I think.   (famous last words)
>>
>> By the way, in a previous code snippet you said that GetStt was $86. 
>> It's $8D.  That could be causing you a lot of problems if that wasn't a 
>> typo/
>
>
> Always a typo :) I’m looking over at the CoCo screen and trying to touch 
> type stuff in on the Macbook.
>
> — A
>
>
> -- 
> Coco mailing list
> Coco at maltedmedia.com
> https://pairlist5.pair.net/mailman/listinfo/coco
>

This is from the rainbow mag and it does print the correct value:

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 USING "'Filesize = $',2(h4)",regs.X; regs.U

I created a file with a size of 92324 bytes and it prints out the correct 
value of 000168A4.

I guess the real question now is how do we get this result in to a variable.




More information about the Coco mailing list