💾 Archived View for mirrors.apple2.org.za › archive › apple.cabi.net › FAQs.and.INFO › GSOS › memman… captured on 2023-03-20 at 22:50:22.
⬅️ Previous capture (2023-01-29)
-=-=-=-=-=-=-
Newsgroups: comp.sys.apple2.programmer Path: news.weeg.uiowa.edu!news.uiowa.edu!uunet!olivea!hal.com!decwrl!waikato!comp.vuw.ac.nz!actrix.gen.nz!dempson From: dempson@swell.actrix.gen.nz (David Empson) Subject: Re: reserving memory under ProDOS 8 using the memory manager Organization: Actrix Information Exchange Date: Mon, 31 Jan 1994 13:53:05 GMT Message-ID: <CKHyKI.MBt@actrix.gen.nz> References: <CKBCCD.6Mw@griffin.cuc.ab.ca> Sender: dempson@actrix.gen.nz (David Empson) Lines: 154 In article <CKBCCD.6Mw@griffin.cuc.ab.ca> dockery@griffin.cuc.ab.ca (Sean Dockery) writes: > Forgive me for being rather naive and without adequate programming > references, but I have a few simple questions for which I need answers > so that my program won't break the environment. :) It is good to see you asking these questions before your program causes something to crash. :-) > At this point in time, I wish to increase the size of the modem input > buffer to something as large as 16K. I figured that the SHR video > buffer would be perfect as it is guarenteed not to be in use while my > program is running. No it isn't. Someone might call up a CDA which uses the super hi-res screen. A prime example is SoftSwitch, from Roger Wagner Publishing. A CDA might also decide to use double hi-res graphics. A better idea would be to use NewHandle to allocate a larger buffer outside bank 0 and bank 1 while your program is running, and restore the original buffer when you exit (freeing the handle in the process). > My questions are as follows: > > Is it absolutely necessary to use the memory manager to reserve > this space even though it is an eight bit program, and there would be > no (foreseen) memory conflicts? If you boot via GS/OS, then all of bank zero and one is reserved for use by ProDOS-8 applications. If you boot ProDOS-8 directly, then most of bank 0 and 1 is unallocated, and may be allocated automatically by a later NewHandle call, so you probably should allocate it yourself to protect it. > How are the default 2K buffers allocated by the firmware? That > is, does the firmware go through the memory manager or does it have > some dedicated (reserved) RAM somewhere in the machine? It isn't documented, as far as I know. It almost certainly uses the memory manager. > Are the tool locater, memory manager, and miscellaneous toolsets > ROM-based? That is, do I have to worry about people booting ProDOS 8 > on the Apple IIGS from a floppy disk? Yes, they are ROM based. There is a big catch: you can't make a MMStartUp call if the area of memory you are running from hasn't been allocated (as happens if you boot directly into ProDOS-8). To get around this, you should start up the toolbox using the following code: clc xce rep #$30 ; Get into 16-bit native mode stz NewID ; I haven't created a new user ID _TLStartUp pha _MMStartUp pla bcc MM_OK ; This is probably a bad branch. :-)