Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!lsuc!jimomura From: jimomura@lsuc.UUCP Newsgroups: comp.sys.m6809 Subject: Re: semantics of read() Message-ID: <2200@lsuc.UUCP> Date: Mon, 16-Nov-87 21:25:16 EST Article-I.D.: lsuc.2200 Posted: Mon Nov 16 21:25:16 1987 Date-Received: Wed, 18-Nov-87 04:19:30 EST References: <553@mcrware.UUCP> Reply-To: jimomura@lsuc.UUCP (Jim Omura) Organization: Consultant, Toronto Lines: 45 Keywords: OS-9, Nuxi, read() Summary: Updated 'gs_rdy.a' In article <553@mcrware.UUCP> jejones@mcrware.UUCP (James Jones) writes: ... >and for things such as terminal programs, file transfer programs, and the >like in OS-9, one can make profitable use of the SS_SIG and SS_RDY setstat >and getstat calls. (I must admit to never having figured out why it is >that not having any data ready is thought to be an error (E$NRdy), but them's >the breaks.) If you didn't grab Jim Omura's posting, you might want to. Actually, Mark Ackfield pointed out an error in my code which could cause an occasional error due to a corrupted stack. The version I'm now using is as follows: psect gs_rdy_c,0,0,0,0,0 nam gs_rdy_c ttl _gs_rdy _gs_rdy: pshs u ldd #_1 lbsr _stkcheck leas -2,s Set stack pointer at "waiting" lda 7,s load "path" -- actually ldd 6 and shift left 8. ldb #1 os9 $8d I$GetStt bcs errhand clra clear upper byte to make sense. bra cleanexit errhand ldd #-1 cleanexit std 0,s Store the Result in ""waiting" * comment out next 2 lines to save program from * crashing if interrupt occurs at this point: * leas 2,s Restore stack pointer. * leas -2,s ldd 0,s leas 2,s puls u,pc _1 equ -66 endsect Cheers -- Jim O. -- Jim Omura, 2A King George's Drive, Toronto, (416) 652-3880 ihnp4!utzoo!lsuc!jimomura Byte Information eXchange: jimomura