Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!utgpu!water!watmath!clyde!motown!mergvax!inthap!polyof!john From: john@polyof.UUCP Newsgroups: comp.unix.questions Subject: Re: Problem with BSD Pascal on a Gould Message-ID: <236@polyof.UUCP> Date: Thu, 7-May-87 17:35:47 EDT Article-I.D.: polyof.236 Posted: Thu May 7 17:35:47 1987 Date-Received: Sat, 9-May-87 06:38:24 EDT References: <6849@brl-adm.ARPA> Organization: Polytechnic Inst. of NY, Farmingdale NY Lines: 35 Summary: Pascal problem, solved? In article <6849@brl-adm.ARPA>, KFL@AI.AI.MIT.EDU (Keith F. Lynch) writes: > I recently started using the BSD pascal compiler on a Gould. It > compiled several short programs with no problem. When I attempted > to compile a 4000 line program (with the line "pc -w foo.p" and with > ... > "/tmp/p0005401", line 12522: emit_rmem: offset too large or negative - 0x10810 > "/tmp/p0005401", line 12535: emit_rmem: offset too large or negative - 0x10810 > "/tmp/p0005401", line 12536: emit_rmem: offset too large or negative - 0x107e0 > "/tmp/p0005401", line 12546: emit_rmem: offset too large or negative - 0x10810 > Well, being that I ported the BSD pascal compiler to the Gould Concept machines, for Gould, perhaps I can shed some light on the problem. The error you describe is from the assembler I believe. Sounds like you are trying to pass a big array to a subroutine/function by value. (IE no "var"). When you do this, the compiler generates "movw blah, b2[offs]" instructions for EACH element of the array you are passing. If you pass in excess of 32K, offs get's too big to work off a single base register, and the assembler will bitch. The bottom line is: you can't pass things > ~30K on the stack in pascal (any language for that matter) on a gould, since it limits the immediate offseting of any base register to 64K. (32k in each direction). Solution: try making the array reference call by reference, not value. (Use 'var' in in the subroutine declaration for the parameter.) If this is not your problem, then it is likely that the folks at Gould munged 'pc' somewhere else. John Buck Polytechnic Univ. Route 110 Farmingdale, NY 11735 polyof!john