Path: utzoo!attcan!uunet!cs.utexas.edu!swrinde!elroy.jpl.nasa.gov!usc!apple!dlyons From: dlyons@Apple.COM (David A. Lyons) Newsgroups: comp.sys.apple2 Subject: Re: List Manager Question Message-ID: <48551@apple.Apple.COM> Date: 28 Jan 91 01:17:51 GMT References: <7157@crash.cts.com> Organization: Apple Computer Inc., Cupertino, CA Lines: 26 In article <7157@crash.cts.com> bclark@pro-harvest.cts.com (Brian Clark) writes: >Okay, can somebody help me out here with a problem on the List Manager... >I've got a list of members that are not standard strings and I want use >the SortList2 call, passing it a comparePtr to my own routine. I'm >working in ORCA/C not assembly, and would like to code the comparision >function in C and use the asm{} statement to do a sec or clc instruction. Apparently the stack-cleanup code ORCA/C is generating does not preserve your carry flag setting (not surprising). You need to write an assembly "shell" around your comparison procedure, so that you pass the shell routine to SortList2, and the shell routine calls your real procedure and then sets the carry flag based on (say) an integer value returned from the real procedure. I don't know whether you can do this all from ORCA/C or not; you could definitely do it by linking in an assembly routine. (The trick is to get ORCA/C *not* to generate stack-cleaup code around your routine.) -- David A. Lyons, Apple Computer, Inc. | DAL Systems Apple II System Software Engineer | 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.