Path: utzoo!utgpu!attcan!uunet!lll-winken!lll-tis!ames!pacbell!att!ihlpl!knudsen From: knudsen@ihlpl.ATT.COM (Knudsen) Newsgroups: comp.os.os9 Subject: Re: Shared Data Modules Summary: Answers, more questions Keywords: OS-9, Shared Data, RMA Message-ID: <6799@ihlpl.ATT.COM> Date: 20 Sep 88 18:24:59 GMT References: <707@cseg.uucp> Organization: AT&T Bell Laboratories - Naperville, Illinois Lines: 42 In article <707@cseg.uucp>, cjy@hcx.uucp (J. C. Yockey) writes: > > Could someone provide me with an example of how to create a shared data > module using either the OS-68K or OS-9 relocating macro assembler? I have > examples using the interactive assembler under OS-9, but no such assembler > was provided with my 2.1 developer's version of OS-68K. Thanks in advance > for any help. Boy have you opened a can of worms! I have plans for data modules too, but the "fancy" assembler that needs linking doesn't provide for many things. There are really two questions: How to set the module header to Data, and What goes into the module? Header: I know that a -b switch to the linker will create a Subroutine module header, which of course contains code (and maybe read-only strings). I never saw anything about making a Data header. The RMA and Linker are very C-oriented. If necessary, you can use DEBUG or some such to zap the header byte to Data, save, and verify. Alternately, assuming your programs know the name of the data module, just let it be called Program and use the "wild card" type-field value in your F$Link calls. This should work; I've linked to subroutine modules that were headered as Program. The other question, about the module contents: Must the entire module's size be initialized data, or can you just RMB [some of] the space? If I want a 5K data module that's going to be written into by programs that don't care about its initial contents, do I still have to LOAD 5K of dummy zeroes off the disk? If the answer to the above is unkind, you can always DEBUG to zap the size field too. In the old interactive assembler you explicitly set the SIZE, so good old RMB would be fine. I'd guess the answer is good, since C sources have no trouble with RMB areas. I'd appreciate seeing one of your examples, or a pointer to it in one of the usual OS9 reference books. Thanks, mike k.