(FILECREATED "28-Jul-85 00:34:42" {ERIS}<LISPCORE>SOURCES>DOVEDISPLAY.;9 8862   

      changes to:  (FNS \DoveDisplay.SetVideoColor)

      previous date: "27-Jul-85 22:48:27" {ERIS}<LISPCORE>SOURCES>DOVEDISPLAY.;8)


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

(PRETTYCOMPRINT DOVEDISPLAYCOMS)

(RPAQQ DOVEDISPLAYCOMS [(DECLARE: DONTCOPY (RECORDS Dove.DisplayFCB))
			(FNS \DoveDisplay.GetBorderPattern \DoveDisplay.ScreenHeight 
			     \DoveDisplay.ScreenWidth \DoveDisplay.SetBorderPattern 
			     \DoveDisplay.SetCursorPosition \DoveDisplay.SetCursorShape 
			     \DoveDisplay.SetVideoColor \DoveDisplay.TurnOn 
			     \DoveDisplay.GetCursorBitmapBase)
			(DECLARE: DONTCOPY (CONSTANTS \DoveDisplay.AllInfoChangedMask 
						      \DoveDisplay.BackgroundChangedMask 
						      \DoveDisplay.BorderPatternChangedMask 
						      \DoveDisplay.CursorMapChangedMask 
						      \DoveDisplay.CursorPosChangedMask 
						      \DoveDisplay.DisplayInfoChangedMask 
						     \DoveDisplay.PictureBorderPatternChangedMask))
			(DECLARE: DONTEVAL@LOAD DOCOPY
				  (P (MAPC (QUOTE (\DoveDisplay.TurnOn \DoveDisplay.SetCursorShape 
								   \DoveDisplay.SetCursorPosition 
								 \DoveDisplay.GetCursorBitmapBase 
								       \DoveDisplay.ScreenWidth 
								       \DoveDisplay.ScreenHeight))
					   (FUNCTION \LOCKFN])
(DECLARE: DONTCOPY 
[DECLARE: EVAL@COMPILE 

(BLOCKRECORD Dove.DisplayFCB ((DisplayTCB 15 WORD)
			      (DisplayLOCK.BS WORD)
			      (DisplayChangedInfo WORD)
			      (VerticalRetraceEvent 3 WORD)
			      (CursorXCoord.BS WORD)
			      (CursorYCoord.BS WORD)
			      (BorderPattern WORD)
			      (CursorBitmap 16 WORD)
			      (DisplayControlRegister BYTE)
			      (CursorMixRule BITS 4)
			      (NIL BITS 4)
			      (ScreenWidth.BS WORD)
			      (ScreenHeight.BS WORD)
			      (DisplayConfig BYTE)
			      (NIL BYTE)
			      (ColorParams.BS WORD)
			      (CursorXCoordOffset.BS WORD)
			      (CursorYCoordOffset.BS WORD)
			      (PixelsPerInch BYTE)
			      (RefreshRate BYTE)))
]
)
(DEFINEQ

(\DoveDisplay.GetBorderPattern
  [LAMBDA NIL                                                (* mpl "20-Jun-85 13:52")
    (DECLARE (GLOBALVARS \DoveIORegion)
	     (CONSTANTS \Dove.DisplayFCBOffset))
    (fetch (Dove.DisplayFCB BorderPattern) of (\ADDBASE \DoveIORegion \Dove.DisplayFCBOffset])

(\DoveDisplay.ScreenHeight
  [LAMBDA NIL                                                (* mpl "20-Jun-85 13:53")
    (DECLARE (GLOBALVARS \DoveIORegion)
	     (CONSTANTS \Dove.DisplayFCBOffset))
    (\DoveIO.ByteSwap (fetch (Dove.DisplayFCB ScreenHeight.BS) of (\ADDBASE \DoveIORegion 
									   \Dove.DisplayFCBOffset])

(\DoveDisplay.ScreenWidth
  [LAMBDA NIL                                                (* mpl "20-Jun-85 13:53")
    (DECLARE (GLOBALVARS \DoveIORegion)
	     (CONSTANTS \Dove.DisplayFCBOffset))
    (\DoveIO.ByteSwap (fetch (Dove.DisplayFCB ScreenWidth.BS) of (\ADDBASE \DoveIORegion 
									   \Dove.DisplayFCBOffset])

(\DoveDisplay.SetBorderPattern
  [LAMBDA (SHADE)                                            (* mpl "20-Jun-85 13:54")
    (DECLARE (GLOBALVARS \DoveIORegion)
	     (CONSTANTS \Dove.DisplayFCBOffset \DoveDisplay.BorderPatternChangedMask \DoveIO.OR))
    (replace (Dove.DisplayFCB BorderPattern) of (\ADDBASE \DoveIORegion \Dove.DisplayFCBOffset)
       with SHADE)
    (\DoveIO.LockMem \DoveIO.OR [IPLUS \Dove.DisplayFCBOffset (INDEXF (fetch (Dove.DisplayFCB 
									       DisplayChangedInfo]
		     \DoveDisplay.BorderPatternChangedMask NIL])

(\DoveDisplay.SetCursorPosition
  [LAMBDA (X Y)                                              (* mpl "20-Jun-85 13:55")
    (DECLARE (GLOBALVARS \DoveIORegion)
	     (CONSTANTS \Dove.DisplayFCBOffset \DoveIO.OR \DoveDisplay.CursorPosChangedMask))
    (replace (Dove.DisplayFCB CursorXCoord.BS) of (\ADDBASE \DoveIORegion \Dove.DisplayFCBOffset)
       with (\DoveIO.ByteSwap X))
    (replace (Dove.DisplayFCB CursorYCoord.BS) of (\ADDBASE \DoveIORegion \Dove.DisplayFCBOffset)
       with (\DoveIO.ByteSwap Y))
    (\DoveIO.LockMem \DoveIO.OR [IPLUS \Dove.DisplayFCBOffset (INDEXF (fetch (Dove.DisplayFCB 
									       DisplayChangedInfo]
		     \DoveDisplay.CursorPosChangedMask NIL])

(\DoveDisplay.SetCursorShape
  [LAMBDA (BITMAP)                                           (* jwo: "19-Jul-85 16:38")

          (* * This makes some assumptions about the bitmap passed to it...)



          (* * Unless it's NIL, then we just tell the IOP the bitmap changed.)



          (* * This functions runs locked down, unless referencing the bitmap makes it page fault.)


    (DECLARE (GLOBALVARS \DoveIORegion)
	     (CONSTANTS \Dove.DisplayFCBOffset \DoveIO.OR \DoveDisplay.CursorMapChangedMask))
    (COND
      (BITMAP (\BLT (LOCF (fetch (Dove.DisplayFCB CursorBitmap) of (\ADDBASE \DoveIORegion 
									   \Dove.DisplayFCBOffset)))
		    (fetch (BITMAP BITMAPBASE) of BITMAP)
		    16)))
    (\DoveIO.LockMem \DoveIO.OR [IPLUS \Dove.DisplayFCBOffset (INDEXF (fetch (Dove.DisplayFCB 
									       DisplayChangedInfo]
		     \DoveDisplay.CursorMapChangedMask NIL])

(\DoveDisplay.SetVideoColor
  [LAMBDA (INVERSE?)                                         (* MPL "28-Jul-85 00:34")
    (DECLARE (GLOBALVARS \DoveIORegion)
	     (CONSTANTS \Dove.DisplayFCBOffset \DoveIO.OR \DoveDisplay.BackgroundChangedMask))
    (COND
      (INVERSE? [replace (Dove.DisplayFCB DisplayControlRegister) of (\ADDBASE \DoveIORegion 
									   \Dove.DisplayFCBOffset)
		   with (LOGOR (LLSH 14 4)
			       (LOGAND 15 (fetch (Dove.DisplayFCB DisplayControlRegister)
					     of (\ADDBASE \DoveIORegion \Dove.DisplayFCBOffset]
		(replace (Dove.DisplayFCB CursorMixRule) of (\ADDBASE \DoveIORegion 
								      \Dove.DisplayFCBOffset)
		   with 14))
      (T [replace (Dove.DisplayFCB DisplayControlRegister) of (\ADDBASE \DoveIORegion 
									\Dove.DisplayFCBOffset)
	    with (LOGOR (LLSH 1 4)
			(LOGAND 15 (fetch (Dove.DisplayFCB DisplayControlRegister)
				      of (\ADDBASE \DoveIORegion \Dove.DisplayFCBOffset]
	 (replace (Dove.DisplayFCB CursorMixRule) of (\ADDBASE \DoveIORegion \Dove.DisplayFCBOffset)
	    with 1)))
    (\DoveIO.LockMem \DoveIO.OR [IPLUS \Dove.DisplayFCBOffset (INDEXF (fetch (Dove.DisplayFCB 
									       DisplayChangedInfo]
		     \DoveDisplay.BackgroundChangedMask NIL])

(\DoveDisplay.TurnOn
  [LAMBDA NIL                                                (* mpl "21-Jul-85 18:13")
    (DECLARE (GLOBALVARS \DoveIORegion)
	     (CONSTANTS \Dove.DisplayFCBOffset \DoveIO.OR \DoveDisplay.AllInfoChangedMask))
    (with Dove.DisplayFCB (\ADDBASE \DoveIORegion \Dove.DisplayFCBOffset)
	  (SETQ CursorXCoord.BS 0)
	  (SETQ CursorYCoord.BS 0)
	  (SETQ BorderPattern 34850)
	  (SETQ DisplayControlRegister 6682)
	  (SETQ CursorMixRule 14))
    (\DoveIO.LockMem \DoveIO.OR [IPLUS \Dove.DisplayFCBOffset (INDEXF (fetch (Dove.DisplayFCB 
									       DisplayChangedInfo]
		     \DoveDisplay.AllInfoChangedMask NIL])

(\DoveDisplay.GetCursorBitmapBase
  [LAMBDA NIL                                                (* jwo: "19-Jul-85 16:33")
    (DECLARE (GLOBALVARS \DoveIORegion)
	     (CONSTANTS \Dove.DisplayFCBOffset))
    (LOCF (fetch (Dove.DisplayFCB CursorBitmap) of (\ADDBASE \DoveIORegion \Dove.DisplayFCBOffset])
)
(DECLARE: DONTCOPY 
(DECLARE: EVAL@COMPILE 

(RPAQQ \DoveDisplay.AllInfoChangedMask 248)

(RPAQQ \DoveDisplay.BackgroundChangedMask 16)

(RPAQQ \DoveDisplay.BorderPatternChangedMask 32)

(RPAQQ \DoveDisplay.CursorMapChangedMask 64)

(RPAQQ \DoveDisplay.CursorPosChangedMask 128)

(RPAQQ \DoveDisplay.DisplayInfoChangedMask 8)

(RPAQQ \DoveDisplay.PictureBorderPatternChangedMask 40)

(CONSTANTS \DoveDisplay.AllInfoChangedMask \DoveDisplay.BackgroundChangedMask 
	   \DoveDisplay.BorderPatternChangedMask \DoveDisplay.CursorMapChangedMask 
	   \DoveDisplay.CursorPosChangedMask \DoveDisplay.DisplayInfoChangedMask 
	   \DoveDisplay.PictureBorderPatternChangedMask)
)
)
(DECLARE: DONTEVAL@LOAD DOCOPY 
(MAPC (QUOTE (\DoveDisplay.TurnOn \DoveDisplay.SetCursorShape \DoveDisplay.SetCursorPosition 
				  \DoveDisplay.GetCursorBitmapBase \DoveDisplay.ScreenWidth 
				  \DoveDisplay.ScreenHeight))
      (FUNCTION \LOCKFN))
)
(PUTPROPS DOVEDISPLAY COPYRIGHT ("Xerox Corporation" 1985))
(DECLARE: DONTCOPY
  (FILEMAP (NIL (2073 7830 (\DoveDisplay.GetBorderPattern 2083 . 2409) (\DoveDisplay.ScreenHeight 2411
 . 2770) (\DoveDisplay.ScreenWidth 2772 . 3129) (\DoveDisplay.SetBorderPattern 3131 . 3720) (
\DoveDisplay.SetCursorPosition 3722 . 4477) (\DoveDisplay.SetCursorShape 4479 . 5429) (
\DoveDisplay.SetVideoColor 5431 . 6799) (\DoveDisplay.TurnOn 6801 . 7491) (
\DoveDisplay.GetCursorBitmapBase 7493 . 7828)))))
STOP