[Coco] megaread utility
Robert Gault
robert.gault at att.net
Sun Mar 26 15:23:50 EDT 2017
Dave Philipsen wrote:
> I haven't looked at the source for the NitrOS9 'megaread' utility but it seems that perhaps its
> option of specifying the number of 1K blocks to read is limited to a 5-digit number. Can anyone
> confirm that?
>
> Dave
>
>
In the comments,
* 01/02 2009/03/14 Bob Devries
* Added functionality to read a number of 1K blocks as specified on the command line.
* Command line is now: megaread #####
* where ##### is the number of 1K blocks to read; default 1024
In the code,
start clra
clrb
bsr dec2bin read a character from command line and convert to binary
bsr dec2bin
bsr dec2bin
bsr dec2bin
bsr dec2bin
that's five conversions.
The code looks like it could be changed so that $FFFF 1K reads could be made. In that case, you
would need six passes through dec2bin and you would need error checking to prevent numbers larger
than 65535 being entered.
Do you have a problem with a 5-digit limit?
Robert
More information about the Coco
mailing list