Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!linus!genrad!decvax!harpo!seismo!hao!hplabs!sri-unix!jcp@brl-bmd From: jcp%brl-bmd@sri-unix.UUCP Newsgroups: net.unix-wizards Subject: Re: pdp11 loader options Message-ID: <2069@sri-arpa.UUCP> Date: Sun, 12-Jun-83 21:14:23 EDT Article-I.D.: sri-arpa.2069 Posted: Sun Jun 12 21:14:23 1983 Date-Received: Tue, 14-Jun-83 03:58:30 EDT Lines: 33 From: J. C. PistrittoThe -n option on the PDP-11 loader is often referred to as 'write-protected text' loading. It loads your program in to one (1) 16 bit address space, and results in a program that runs with both its instruction and data memory management registers, (on machines that have both, pointing to the same physical region of memory, just that the pages which refer to 'code' are write-protected. A small side effect of this is that since data follows code, the first data address in your program will be a multiple of 8192 (bytes), as the data is adjusted upward in memory to the beginning of the next memory managment register address space, (there are only 8 for the entire 64kbytes possible). This means you could actually have a program which will load and run correctly without -n that will NOT with -n. I have actually seen this happen, and it means your program is\ getting close the hairy edge. One note: a '-n' loaded program may be run on ANY PDP-11 with memory management, (ie. runs UNIX). This is NOT true of a -i loaded program. The -i option directs the loader to load code and data into two PHSYCIALLY DISTINCT regions of memory, which each have their own set of memory managment registers when the program is running. This also means that this will NOT work on any machine that does not support the Split I&D register sets. (Ex. PDP-11/23s, PDP-11/34s, PDP-11/60??). Also, it means you get an entire 64Kbytes for code and 64Kbytes, (minus the stack), for data. Also, there are certain functions which may not be used in a split I&D program, (on version 6, NARGS was an example of this). Of course, it is not possible to write self-modifying code when either -n or -i are specified, (in fact, this is often the purpose of specifing them...) -JCP-