[Coco] variable sized GETlike operation in basic 09?

Aaron Wolfe aawolfe at gmail.com
Tue Jan 5 20:33:32 EST 2010


On Tue, Jan 5, 2010 at 8:23 PM, L. Curtis Boyle <curtisboyle at sasktel.net> wrote:
> Best is to use the I$Read or I$ReadLn SYSCALL functions... Just set the Y
> register to the # of bytes you want to read for each call. You can vary it
> for every read, if you want.

Thanks.  This is how I've been doing it in asm, just wondered if I was
missing some easy way to do it in basic09.  As a general rule, is it
pretty efficient to use SYSCALL?

I have it loaded in memory and use one SYSCALL in HTTPD now (to
display memory used by the HTTPD process in the web page footer).
This didn't add any measurable time to the speed of serving pages, but
I wondered about efficiency when using it many times repeatedly.  The
improvements in speed over single byte reads almost certainly outweigh
any lost cycles in using SYSCALL over a native OS9 command (if there
are any).



>
> Sent from my iPhone
> L. Curtis Boyle
>
>
> On Jan 5, 2010, at 6:17 PM, Aaron Wolfe <aawolfe at gmail.com> wrote:
>
>> Does anyone know if its possible to do a GET for changing amounts of
>> data? Or another fast way to read changing sized 'records'?  GETting
>> one byte at a time is very slow compared to getting several in the
>> HTTPD program.  Right now I GET a 32 byte array at a time out of files
>> and just try to make sure files are sized a multiple of 32, but thats
>> no good.  I also pad out all the headers coming in from the client to
>> a standard length so GET can work there, also not great.
>>
>> I think I could use SYSCALL and I$Read, but this seems wasteful, maybe
>> not?  Maybe I'm missing something in B09?  It seems GET only reads the
>> size of the variable(s) specified, and you cannot reDIM or change the
>> size of the variables in any way.
>>
>> Thanks for any clues
>> -Aaron
>>
>> --
>> Coco mailing list
>> Coco at maltedmedia.com
>> http://five.pairlist.net/mailman/listinfo/coco
>
> --
> Coco mailing list
> Coco at maltedmedia.com
> http://five.pairlist.net/mailman/listinfo/coco
>



More information about the Coco mailing list