info-mac@uw-beaver (01/18/85)
From: edmoy%ucbopal.CC@UCB-VAX I've been playing around with sumacc C programming and had to do a little programming in assembly language to handle some special cases. I've noticed that the high byte of an address (the 68000 only uses the bottom 24 bits) is used alot in the Mac for special purposes. However, even when I do a Load Effective Address (lea) command, the high byte is sometimes non-zero and I have to clear it out. Does anyone know if the hardware in the Mac uses that high byte for something? Edward Moy Computing Services University of California Berkeley, CA 94720 edmoy@ucbopal ucbvax!ucbopal!edmoy
info-mac@uw-beaver (01/24/85)
From: John W. Peterson <JW-Peterson@UTAH-20.ARPA> 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. -------