Path: utzoo!utgpu!watserv1!watmath!att!att!pacbell.com!ucsd!usc!julius.cs.uiuc.edu!psuvax1!psuvm!brl102 From: BRL102@psuvm.psu.edu (Ben Liblit) Newsgroups: comp.sys.apple2 Subject: Re: C language, RAM5 memory question Message-ID: <90303.193807BRL102@psuvm.psu.edu> Date: 31 Oct 90 00:38:07 GMT References: <1990Oct30.201113.31554@wpi.WPI.EDU> Organization: Penn State University Lines: 25 In article <1990Oct30.201113.31554@wpi.WPI.EDU>, greyelf@wpi.WPI.EDU (Michael J Pender) says: > >1. Does anyone know of a way to reserve a section of memory in HyperC? >I want to use the hires graphics, but not eat my own program. Write your routines normally, but at link time, specify: lnk -tb0x4000 The -tb# switch sets the start of the text area (actually, this is the program code). Since the BSS and data sections are, by default, placed at the *end* of the text section, this will guarantee that the finished product will be loaded above hires page one. Use -tb0x6000 if you need to reserve both hires pages. I realize that this doesn't actually reserve the memory area, merely avoids it. So far, I know of no way to reserve an area of memory without actually having a part of your file that gets loaded into it. And I doubt you want the extra 8K overhead that you'd get by declaring the hires page as, say, an array of chars. Hmm ... does anybody know just what exactly "BSS" stands for anyway? Ben Liblit BRL102 @ psuvm.bitnet -- BRL102 @ psuvm.psu.edu "Fais que tes reves soient plus longs que la nuit."