To: DECUS "C" Users From: Jim Conroy X2346 Dept: Automation Tools and Technology - U2N27 Date: 4/21/87 cc: Subj: Modifications to DECUS "C" Compiler We recently had a need to segment a very large program into instruc- tion and data space. We encountered some problems in the compiler and libraries which we were able to fix. All programs that were changed are listed below and are included on this tape in the UICs listed be- low. Only programs that were modified are included with this submis- sion. The new "C" compiler, assembler and runtime libraries support I and D space. It was built from the DECUS Fall '85 RSX SIG tape (11-SP-90). Added to it were the Australian submissions for split I and D space from the Spring '86 tape (11-SP-92). The Australian changes can be found in UICs [272,34], [272,35], and [272,37] on that tape. Only the changes for I and D space were used. The double-precision arithmetic changes were not included. The merging of these two tapes has re- sulted in the use of these UICs: 1. [5,4] - compiler and assembler modules. 2. [5,15] and [5,16] - C.OLB library routines. 3. [5,24] - CX.OLB library routines. The resultant compiling system did not work well and we were forced to modify several programs. Specific changes to each program are listed in the edit history at the beginning of the program. The programs changed were: [5,4]CC200.MAC [5,24]APCSV.MAC [5,16]IOV.MAC [5,15]C5TA.MAC [5,24]GMCR.MAC [5,16]KBIN.MAC [5,15]ASCR50.MAC [5,24]SETFNB.MAC [5,16]KBINR.MAC [5,15]CALLER.MAC [5,24]TLOG.MAC [5,16]MEMDMP.MAC [5,15]CALLTR.MAC [5,16]SUPORT.MAC [5,16]PRMT.MAC [5,15]CTIME.MAC [5,16]ABORT.MAC [5,16]PROFIL.MAC [5,15]LOCALT.MAC [5,16]ATOD.MAC [5,16]RTIME.MAC [5,15]LTOA.MAC [5,16]ATOF.MAC [5,16]SCREEN.MAC [5,15]MALINK.MAC [5,16]DOPRNT.MAC [5,16]SETCC.MAC [5,15]MALLOC.MAC [5,16]DOSCAN.MAC [5,16]SLEEP.MAC [5,15]MAMCHK.MAC [5,16]DTOA.MAC [5,16]TIME.MAC [5,15]NARG.MAC [5,16]ERROR.MAC [5,16]TRAPS.MAC [5,15]PCSV.MAC [5,16]EXIT.MAC [5,16]PERROR.MAC [5,15]RAND.MAC [5,16]FWILD.MAC [5,16]IOPUT.MAC [5,15]RCTIME.MAC [5,16]IOCSI.MAC [5,16]PUTCHA.MAC [5,15]UNWIND.MAC [5,16]IOFOPA.MAC [5,16]FOPEN.MAC [5,15]ITOAX.MAC [5,16]IOGET.MAC [5,16]DTOAD.MAC [5,15]CTYPE.MAC [5,16]IOGETC.MAC [5,16]INIT.MAC [5,15]IOGETC.MAC [5,16]IOFOPT.MAC [5,16]IOFLSH.MAC [5,16]DOUTAB.MAC [5,16]UTIME.MAC Page 2 [5,16]ATOFD.MAC [5,16]ATODD.MAC The changes to these programs can be summarized as follows: 1. Change the compiler(CC200.MAC) to use a default psect type of d(data) on psects C$DATA and C$MWCN. 2. Change library routines to use psect types of d on C$DATA and C$MWCN psects. 3. Move data from C$STRN to C$DATA since data is loaded at even addresses and string variables are concatenated at the next byte address. This eliminates odd address traps. 4. Fix MALLOC. The Get Partition Parameters ESR in INIT.MAC was returning the total length of the task(I-space plus D-space) rather than the length of D-space only. This set up variable $$MEND incorrectly for MALLOC. With these changes, you can use instruction APRs by compiling and task-building in the normal way. Use of instruction and data APRs is turned on by the /ID switch on the task-build. The compiler has been used at three UNISYS sites for about four months with no major problems. These changes come with the standard DECUS warranty. James M. Conroy Mail Station U2N27 UNISYS Corporation P.O. Box 64525 St. Paul, Mn. 55164-0525 Phone: (612)456-2346