[Coco] BASIC09 - unsigned INTEGERs?

K. Pruitt pruittk at roadrunner.com
Sun Feb 1 09:03:50 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 5:55 AM
Subject: Re: [Coco] BASIC09 - unsigned INTEGERs?


>> On Feb 1, 2015, at 7:45 AM, K. Pruitt <pruittk at roadrunner.com> wrote:
>>
>> 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.
>
> Right. That code there is the example from the SYSCALL source code, 
> apparently, from the OS-9 Level 1 days.
>
> http://www.cocopedia.com/wiki/index.php/SysCall.asm_Level_1 
> <http://www.cocopedia.com/wiki/index.php/SysCall.asm_Level_1>
>
> — A

The one on cocopedia (cool place by the way) has a typos.  And the original 
is missing the line which sets the callcode - which I think we've all 
noticed.  I actually went looking for the code to Syscall to see if what we 
were trying was even possible.  I used cocopedia to figure out which Rainbow 
to look at. :)  I actually have that issue in print, but I used the scanned 
one. I even disassembled fsize to look to see how it was done.
This IS do-able.  We just haven't figured out how yet.




More information about the Coco mailing list