Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!cs.utexas.edu!ginosko!gem.mps.ohio-state.edu!apple!dlyons From: dlyons@Apple.COM (David Lyons) Newsgroups: comp.sys.apple Subject: Re: GS/OS calls--how? Message-ID: <35642@apple.Apple.COM> Date: 14 Oct 89 06:44:49 GMT References: <12696@boulder.Colorado.EDU> <4716@internal.Apple.COM> Organization: Apple Computer Inc, Cupertino, CA Lines: 52 >In article <12696@boulder.Colorado.EDU> hartkopf@tramp.Colorado.EDU (Jeff Hartkopf) writes: >>I'm attempting to learn how to use GS/OS calls, and have come up with >>some questions. Things don't seem to be working the same way as they did >>with the ProDOS 16 calls. The main reason for this is that the GS/OS (class 1) calls are *not* the same as the ProDOS 16 (class 0) calls. :-) (If they were they same, we wouldn't need two kinds of calls, eh?) >>At first I didn't assign anything to the pCount variable and kept >>getting errors, so after a little experimentation, I found that 2 seems >>to work. But what is the pCount field of most of the GS/OS records for? For GetFileInfoGS, use pCount=12 to get back all the information that the current version of GS/OS can return for that call. BTW, it will probably help a bunch if you buy the GS/OS reference from APDA. Cary Farrier writes: > The pcount field in the Class 1 GS/OS system calls tells the > system how many parameters are in your pblock. The format > for the class 1 GET_FILE_INFO call is: > > $00-$01 pcount > $02-$05 input pointer to a class 1 input string > containing the pathname > $06-$07 access > $08-$09 file_type > $0A-$0D aux_type > ... [and so on...] > > When you specify a pcount of 2, you are telling the system > that you only want to give it the pathname and to receive > the file_type. A pcount of 3 will include the aux_type, and > so on. Since you only specify a pcount of 2, the FST will > not fill in any parameters other than the first two. Note > that the pcount does not include pcount itself. > Looks like 2 will get you only the Access parameter back (the input pathname counts as the first parameter), so 3 will get you the Access and Filetype. -- --Dave Lyons, Apple Computer, Inc. | DAL Systems AppleLink--Apple Edition: DAVE.LYONS | 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.