LMFL#!C(:HOST "SYS" :BACKUP-DATE 2760031985. :SYSTEM-TYPE :LOGICAL :VERSION 6. :TYPE "LISP" :NAME "PARALLEL-PORT" :DIRECTORY ("REL3-SOURCE" "SERIAL") :SOURCE-PATTERN "( :DIRECTORY (\"REL3-SOURCE\") :NAME :WILD :TYPE :WILD :VERSION :NEWEST)" :VERSION-LIMIT 0. :CHARACTERS T :NOT-BACKED-UP T :CREATION-DATE 2758811887. :AUTHOR "REL3" :LENGTH-IN-BYTES 3031. :LENGTH-IN-BLOCKS 3. :BYTE-SIZE 8.)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          ;;; -*- mode:common-lisp; base:10; package:system-internals -*-;;;                           RESTRICTED RIGHTS LEGEND;;;Use, duplication, or disclosure by the Government is subject to;;;restrictions as set forth in subdivision (b)(3)(ii) of the Rights in;;;Technical Data and Computer Software clause at 52.227-7013.;;;                     TEXAS INSTRUMENTS INCORPORATED.;;;                              P.O. BOX 2909;;;                           AUSTIN, TEXAS 78769;;;                                 MS 2151;;; Copyright (C) 1984,1987 Texas Instruments Incorporated. All rights reserved.;;; Routines to initialize the global parallel port definitions.;;; These should eventually be added to the cold initialization list.;;; Uses the special macros array-dpb-offset & array-ldb-offset.;;;;;; The *Parallel-Port* structure is used to interface with the parallel hardware;;; on the SIB.  It is the descriptor block given to the microcode interrupt ;;; handlers.  The only really important thing in *Parallel-Port* is the transmit;;; buffer which is where the parallel interrupt handler goes to get characters.;;; The transmit buffer is also available through the symbol *Parallel-Transmit-Buffer*.(DEFVAR *PARALLEL-PORT* ()) (DEFVAR *PARALLEL-OUTPUT-BUFFER* ()) ;; Serial & Parallel patch 1-2, -ab;; Allocate device descriptors in device-descriptor-area;; Serial & Parallel patch 1-3, -ab;; Patch 1-2 won't work because of way device descriptors are accessed.;; Instead of above, allocate descriptors in SERIAL area for now.;; It is Static area, so gc won't copy.(DEFUN INITIALIZE-PARALLEL-INTERRUPT ()  (SETQ *PARALLEL-PORT*(MAKE-ARRAY (* (LENGTH PARALLEL-DESCRIPTOR-BLOCK) 2) :element-TYPE '(unsigned-byte 16) :AREA 'SERIAL))  (WIRE-ARRAY *PARALLEL-PORT*)  ;; zero descriptor block contents being careful to allow for the array header at the beginning  (LOOP FOR I FROM (1+ (%P-LDB %%ARRAY-LONG-LENGTH-FLAG *PARALLEL-PORT*));either 1 or 2 depending on the array header     BELOW     (+ (LENGTH PARALLEL-DESCRIPTOR-BLOCK)(1+ (%P-LDB %%ARRAY-LONG-LENGTH-FLAG *PARALLEL-PORT*)));allow for displacement on both ends     DO (%P-DPB-OFFSET 0 %%Q-LOW-HALF *PARALLEL-PORT* I)     (%P-DPB-OFFSET 0 %%Q-HIGH-HALF *PARALLEL-PORT* I))  ;; store event type in information word  (ARRAY-DPB-OFFSET %PARALLEL-EVENT-TYPE %%PARALLEL-INFO-EVENT-TYPE *PARALLEL-PORT*     %PARALLEL-INFORMATION)  (%ADD-INTERRUPT *PARALLEL-PORT* %PARALLEL-EVENT-LEVEL)) ;; Serial & Parallel Ports patch 1-1, -ab;; Replace hardcoded slot values with variable references.(DEFUN ENABLE-PARALLEL-EVENT ()  (declare (special PROCESSOR-SLOT-NUMBER))  (%NUBUS-WRITE TV::SIB-SLOT-NUMBER %SIB-PARALLEL-EVENT-ADDRESS(DPB PROCESSOR-SLOT-NUMBER %%NUBUS-F-AND-SLOT-BITS     (+ %SLOT-POWER-FAIL-EVENT;power fail event is base interrupt address(* 4 %PARALLEL-EVENT-LEVEL))))) ;4 bytes for each event word(DEFUN DISABLE-PARALLEL-EVENT ()  (%NUBUS-WRITE TV::SIB-SLOT-NUMBER %SIB-PARALLEL-EVENT-ADDRESS 0))  (PARALLEL-TYO #o212))  ()))))) EFTYP