Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/18/84; site uw-beaver Path: utzoo!watmath!clyde!burl!ulysses!mhuxr!mhuxj!houxm!vax135!cornell!uw-beaver!info-mac From: info-mac@uw-beaver Newsgroups: fa.info-mac Subject: Re: high byte of address question Message-ID: <494@uw-beaver> Date: Thu, 24-Jan-85 01:14:03 EST Article-I.D.: uw-beave.494 Posted: Thu Jan 24 01:14:03 1985 Date-Received: Fri, 25-Jan-85 05:20:22 EST Sender: daemon@uw-beaver Organization: U of Washington Computer Science Lines: 14 From: John W. Peterson The reason the high byte of an address gets trashed in SumacC code is a side-effect of the Sumacc relocation scheme. Unlike the Lisa/Workshop Pascal compiler, Sumacc does not generate position independant code. Since the C compiler and loader have no way of knowing where the code will be loaded (this is decided dynamicly by the Mac memory manager), addresses are resolved every time a Sumacc program starts up. To resolve addresses at startup time, Sumacc uses a "clever" scheme of run-length encoding relocation info into the high order byte of addresses that need relocating. The gory details of how this works can be found by looking in crtmac.s in the Sumacc lib/ subdirectory. -------