(FILECREATED "16-Sep-84 21:32:24" {ERIS}<HERRING>BUSEXTENDER.;8 3309   

      changes to:  (VARS BUSEXTENDERCOMS)

      previous date: "14-Sep-84 17:39:12" {ERIS}<HERRING>BUSEXTENDER.;7)


(* Copyright (c) 1984 by Xerox Corporation. All rights reserved.)

(PRETTYCOMPRINT BUSEXTENDERCOMS)

(RPAQQ BUSEXTENDERCOMS ((FNS BX.INPUT BX.OUTPUT BX.READSTATUS)
			(MACROS BX.INPUT BX.OUTPUT)))
(DEFINEQ

(BX.INPUT
  [LAMBDA (ADDR)                                             (* jmh "8-Sep-84 15:50")

          (* * return the datum at the BX address = SUA.4-7,,fY.1)


    (\DEVICE.INPUT (IPLUS (LLSH (LOGAND ADDR 30)
				3)
			  (if (ZEROP (LOGAND ADDR 1))
			      then 10
			    else 9])

(BX.OUTPUT
  [LAMBDA (DATUM ADDR)                                       (* jmh "8-Sep-84 15:50")

          (* * write the datum to the BX address = SUA.4-7,,fY.1)


    (\DEVICE.OUTPUT DATUM (IPLUS (LLSH (LOGAND ADDR 30)
				       3)
				 (if (ZEROP (LOGAND ADDR 1))
				     then 11
				   else 0])

(BX.READSTATUS
  [LAMBDA NIL                                                (* jmh " 8-Sep-84 15:50")

          (* * return FPI.0-3 -- get them from PPort -- have to enable them onto PPort first)


    (\DEVICE.OUTPUT 0 14)
    (LOGAND 15 (LRSH (\DEVICE.INPUT 7)
		     4])
)
(DECLARE: EVAL@COMPILE 

(PUTPROPS BX.INPUT DMACRO [ARGLIST
	    (PROG (ADDRARG LISTOFADDRVAL ADDRVAL)
		  [* * The point of this macro is that almost all of the code of the function can be 
		     computed at compile time if the argument is known at compile time -- The 
		     function is -- (\DEVICE.INPUT (IPLUS (LLSH (LOGAND ADDR 30)
								3)
							  (if (ZEROP (LOGAND ADDR 1))
							      then 10 else 9]
		  (SETQ ADDRARG (CAR ARGLIST))
		  (RETURN (if [AND (SETQ LISTOFADDRVAL (CONSTANTEXPRESSIONP ADDRARG))
				   (SMALLP (SETQ ADDRVAL (CAR LISTOFADDRVAL]
			      then
			      [BQUOTE (\DEVICE.INPUT , (IPLUS (LLSH (LOGAND ADDRARG 30)
								    3)
							      (if (ZEROP (LOGAND ADDRARG 1))
								  then 10 else 9]
			      else
			      (BQUOTE (\DEVICE.INPUT (IPLUS (LLSH (LOGAND , ADDRARG 30)
								  3)
							    (if (ZEROP (LOGAND , ADDRARG 1))
								then 10 else 9])

(PUTPROPS BX.OUTPUT DMACRO [ARGLIST
	    (PROG (DATUMARG ADDRARG LISTOFADDRVAL ADDRVAL)
		  [* * The point of this macro is that almost all of the code of the function can be 
		     computed at compile time if the argument is known at compile time -- The 
		     function is -- (\DEVICE.OUTPUT DATUM (IPLUS (LLSH (LOGAND ADDR 30)
								       3)
								 (if (ZEROP (LOGAND ADDR 1))
								     then 11 else 0]
		  (SETQ DATUMARG (CAR ARGLIST))
		  (SETQ ADDRARG (CADR ARGLIST))
		  (RETURN (if [AND (SETQ LISTOFADDRVAL (CONSTANTEXPRESSIONP ADDRARG))
				   (SMALLP (SETQ ADDRVAL (CAR LISTOFADDRVAL]
			      then
			      [BQUOTE (\DEVICE.OUTPUT , DATUMARG ,
						      (IPLUS (LLSH (LOGAND ADDRARG 30)
								   3)
							     (if (ZEROP (LOGAND ADDRARG 1))
								 then 11 else 0]
			      else
			      (BQUOTE (\DEVICE.OUTPUT , DATUMARG
						      (IPLUS (LLSH (LOGAND , ADDRARG 30)
								   3)
							     (if (ZEROP (LOGAND , ADDRARG 1))
								 then 11 else 0])
)
(PUTPROPS BUSEXTENDER COPYRIGHT ("Xerox Corporation" 1984))
(DECLARE: DONTCOPY
  (FILEMAP (NIL (398 1336 (BX.INPUT 408 . 719) (BX.OUTPUT 721 . 1046) (BX.READSTATUS 1048 . 1334)))))
STOP