Google
 

Trailing-Edge - PDP-10 Archives - SRI_NIC_PERM_FS_1_19910112 - c/kcc5/cpsect.mac
There are no other files named cpsect.mac in the archive.
Title	CPSECT -- PSect support for KCC

;; This module provides the initial hooks for setting up PSECTS for
;; KCC.  It must be the first module loaded.  Unfortunately, this
;; module has to violate the KCC dictum of always using #asm/#endasm
;; for assembler code, because the surrounding KCC environment we
;; would get is exactly what we are trying to modify (TWOSEG frobs,
;; etc).  Such is life.
;;
;; The choice of PSECT names is somewhat arbitrary.  CODE and
;; DATA are used because SRA was principally interested in using the
;; standard TOPS-20 network libraries, which use those names.

IFNDEF $BDATA,<$BDATA=:  1000>		; Begining of "loseg"
IFNDEF $BCODE,<$BCODE=:400000>		; Begining of "hiseg"

IFNDEF $LDATA,<$LDATA=:$BCODE-1>	; Limit for "loseg" (avoid hiseg)
IFNDEF $LCODE,<$LCODE=:6777777>		; Limit for "hiseg" (avoid UDDT)

.PSECT DATA/RWRITE,$BDATA		; Read-write for data
.ENDPS					; Tie off
.TEXT "/LIMIT:DATA:$LDATA"		; Maximum address for data

.PSECT CODE/RONLY,$BCODE		; Readonly psect for code
.ENDPS					; Tie off
.TEXT "/LIMIT:CODE:$LCODE"		; Maximum address for code

.TEXT "/REDIRECT:DATA:CODE"		; Force TWOSEG into PSECT format
.TEXT "/SYMSEG:PSECT:DATA"		; Put symbol table in data psect

END					; That's all we need to do here.