[comp.sys.apple] error codes from Read

dlyons@Apple.COM (David A. Lyons) (02/20/90)

In article <9002191431.aa13840@SMOKE.BRL.MIL> L77@TAUNOS.BITNET writes:
>[...]
>..but then you better watch BEQing upon a successful call,i.e. error
>code=$00,because the error code for EOF-encountered is NOT $00 (I forget what
>it IS right now).
>
>                       L77@TAUNOS

Oddly enough, hitting the end of the file return an error *only* if no
bytes were successfully read, so READing $ffff is okay when you want to
read a whole SYS file.  If it's too big to fit, you'll still get a
bad buffer address error for hitting $BF00.  You might as well use $9f00
for the request count, since you'll never be able to read more than that
anyway.
-- 
David A. Lyons, Apple Computer, Inc.      |   DAL Systems
Apple II Developer Technical Support      |   P.O. Box 875
America Online: Dave Lyons                |   Cupertino, CA 95015-0875
GEnie: D.LYONS2 or DAVE.LYONS         CompuServe: 72177,3233
Internet/BITNET:  dlyons@apple.com    UUCP:  ...!ames!apple!dlyons
   
My opinions are my own, not Apple's.