[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Help with confirmation on a small bit of assembly?



aiiadict@gmail.com wrote:
mdj wrote:

Relax Tristan, this is *the* most common mistake made by programmers,
of all levels of experience. It's some kind of brain failure mode than
causes humans to equate the number of digits in a number system with
highest value digit.


  I poke around with 6502...  made the mistake of thinking calling
prodos read command with FF as number of requested bytes would
get me 256 bytes from the file..

8 bits can represent 256 values...  one of them being ZERO


why would you want to read 0 bytes from a file?

You probably wouldn't, but ProDOS also returns the *actual* number
of bytes read after each request, and *that* result might be 0.

In NadaNet, each data packet is 1..256 bytes long, so 0 *does*
mean 256.  ;-)  Of course, the same applies for many loops counted
in a single byte.

-michael

NadaNet networking for Apple II computers!
Home page:  http://members.aol.com/MJMahon/

"The wastebasket is our most important design
tool--and it's seriously underused."