Path: utzoo!utdoe!generic!pnet91!ericmcg From: ericmcg@pnet91.cts.com (Eric Mcgillicuddy) Newsgroups: comp.sys.apple2 Subject: Re: Orca/C/M...Ack! Message-ID: <524@generic.UUCP> Date: 19 Feb 91 02:00:04 GMT Sender: root@generic.UUCP Organization: People-Net [pnet91], Etobicoke, ON Lines: 40 >To: 2hnemarrow@kuhub.cc.ukans.edu The example given is wrong in one of two ways (depending on what you need done). Apparently the copy editor missed the fact that the Direct register was pushed on the stack after the stack diagram was drawn. Increase the EQU's by 2 : i equ 12 ch equ 10 z equ 6 This allows you to continue with the examples as given. I don't know how often this error is repeated, better keep a couple of fingers free for couning the bytes on the stack. :) If you do not need any direct page locations I would suggest that you leave the EQU's alone and access your variables with lda ,s : myid equ 6 ...... lda myid,s ...... This should access the correct variable and should solve your problem also. On a related note...... Does anyone know if the System Loader calls the Memory Manager in a non-standard way? My ViM projects patches NewHandle and a half dozen other calls, it works great within an application, but nukes the Loader when a new app is launched. Perhaps the loader uses the alternate dispatcher ($e10008 ?) with the extra return address on the stack. I am wondering if the Loader might JSL directly to &NewHandle instead of following Apple's guidelines. Any ideas on this? And any ideas how I could use GSbug to follow the boot process so I can watch the stack and variables change? UUCP: bkj386!pnet91!ericmcg INET: ericmcg@pnet91.cts.com