(FILECREATED "23-Oct-85 15:42:09" {ERIS}<LISPCORE>SOURCES>DOVEMISC.;25 10981 changes to: (VARS DOVEMISCCOMS \DoveMisc.BootButton) (FNS \DoveMisc.ReadDisplayDesc \DoveMisc.ReadVMMapDesc \DoveMisc.ReadRealMemDesc \DoveMisc.ReadKeyboardType) previous date: "16-Oct-85 20:17:40" {ERIS}<LISPCORE>SOURCES>DOVEMISC.;23) (* Copyright (c) 1985 by Xerox Corporation. All rights reserved.) (PRETTYCOMPRINT DOVEMISCCOMS) (RPAQQ DOVEMISCCOMS ((FNS \DoveMisc.BeepOff \DoveMisc.BeepOn \DoveMisc.BootButton \DoveMisc.DoProcessorCommand \DoveMisc.GetKBDBase \DoveMisc.GetMouseXBase \DoveMisc.GetMouseYBase \DoveMisc.Init \DoveMisc.ReadDisplayDesc \DoveMisc.ReadGMT \DoveMisc.ReadHostID \DoveMisc.ReadKeyboardType \DoveMisc.ReadRealMemDesc \DoveMisc.ReadVMMapDesc \DoveMisc.SetMousePosition \DoveMisc.WriteGMT) (INITVARS (\DoveBeep.FCBPointer) (\DoveProcessor.FCBPointer) (\DoveKyMo.FCBPointer) (\DoveMP.FCBPointer)) (GLOBALVARS \DoveBeep.FCBPointer \DoveProcessor.FCBPointer \DoveKyMo.FCBPointer \DoveMP.FCBPointer) (DECLARE: EVAL@COMPILE DONTCOPY (FILES (SOURCE) DOVEDECLS) (RECORDS Dove.BeepFCB Dove.KeyboardFCB Dove.ProcessorFCB Dove.TODFormat) (CONSTANTS (\DoveMisc.ReadGMT 1) (\DoveMisc.WriteGMT 2) (\DoveMisc.ReadHostID 3) (\DoveMisc.ReadVMMapDesc 4) (\DoveMisc.ReadRealMemDesc 5) (\DoveMisc.ReadDisplayDesc 6) (\DoveMisc.ReadKeyboardType 7) (\DoveMisc.ReadPCType 8) (\DoveMisc.BootButton 9))) (DECLARE: DONTEVAL@LOAD DOCOPY (P (\DoveMisc.Init))))) (DEFINEQ (\DoveMisc.BeepOff [LAMBDA NIL (* ejs: "13-Sep-85 00:25") (replace (Dove.BeepFCB Frequency.BS) of \DoveBeep.FCBPointer with 0) (\DoveIO.NotifyIOP (fetch (Dove.BeepFCB BeepMask) of \DoveBeep.FCBPointer]) (\DoveMisc.BeepOn [LAMBDA (FREQ) (* ejs: "13-Sep-85 00:26") (DECLARE (GLOBALVARS \DoveIORegion) (CONSTANTS \Dove.BeepFCBOffset)) [replace (Dove.BeepFCB Frequency.BS) of \DoveBeep.FCBPointer with (\DoveIO.ByteSwap (FIX (QUOTIENT 900000 (IMAX FREQ 14] (\DoveIO.NotifyIOP (fetch (Dove.BeepFCB BeepMask) of \DoveBeep.FCBPointer]) (\DoveMisc.BootButton [LAMBDA NIL (* mpl "23-Jul-85 23:46") (* * This fn re-boots the machine) (DECLARE (CONSTANTS \DoveMisc.BootButton)) (\DoveMisc.DoProcessorCommand \DoveMisc.BootButton) (until NIL do (NILL]) (\DoveMisc.DoProcessorCommand [LAMBDA (CMD) (* ejs: "14-Oct-85 00:04") (* * This fn stuffs commands at the mesa processor task) (replace (Dove.ProcessorFCB Command) of \DoveProcessor.FCBPointer with CMD) (\PUTBASE \IOPAGE 10 7000) (\DoveIO.NotifyIOP 0) (\PUTBASE \IOPAGE 10 7003) (until (EQ 0 (fetch (Dove.ProcessorFCB Command) of \DoveProcessor.FCBPointer))) (\PUTBASE \IOPAGE 10 7004]) (\DoveMisc.GetKBDBase [LAMBDA NIL (* ejs: "12-Oct-85 21:22") (fetch (Dove.KeyboardFCB KeyBitsBase) of \DoveKyMo.FCBPointer]) (\DoveMisc.GetMouseXBase [LAMBDA NIL (DECLARE (GLOBALVARS \DoveIORegion) (CONSTANTS \Dove.Keyboard&MouseFCBOffset)) (* ejs: "13-Sep-85 00:29") (\ADDBASE \DoveKyMo.FCBPointer (INDEXF (fetch (Dove.KeyboardFCB MouseX]) (\DoveMisc.GetMouseYBase [LAMBDA NIL (* ejs: "13-Sep-85 00:30") (\ADDBASE \DoveKyMo.FCBPointer (INDEXF (fetch (Dove.KeyboardFCB MouseY]) (\DoveMisc.Init [LAMBDA NIL (* ejs: "14-Oct-85 00:42") (MAPC (QUOTE (\DoveMisc.GetKBDBase \DoveMisc.GetMouseXBase \DoveMisc.GetMouseYBase \DoveMisc.BeepOff \DoveMisc.SetMousePosition \DoveMisc.DoProcessorCommand \DoveMisc.ReadGMT \DoveMisc.ReadHostID \DoveMisc.BootButton)) (FUNCTION \LOCKFN)) (MAPC (QUOTE (\DoveBeep.FCBPointer \DoveProcessor.FCBPointer \DoveKyMo.FCBPointer \DoveMP.FCBPointer)) (FUNCTION \LOCKVAR]) (\DoveMisc.ReadDisplayDesc (LAMBDA NIL (* ejs: "23-Oct-85 15:36") (\DoveMisc.DoProcessorCommand \DoveMisc.ReadDisplayDesc) (LIST (\DoveIO.ByteSwap (\GETBASE (fetch (Dove.ProcessorFCB Data) of \DoveProcessor.FCBPointer) 0)) (\DoveIO.ByteSwap (\GETBASE (fetch (Dove.ProcessorFCB Data) of \DoveProcessor.FCBPointer) 1)) (\DoveIO.ByteSwap (\GETBASE (fetch (Dove.ProcessorFCB Data) of \DoveProcessor.FCBPointer) 2))))) (\DoveMisc.ReadGMT [LAMBDA (CLOCKLOC) (* ejs: "12-Oct-85 21:23") (COND [(EQ (fetch (Dove.ProcessorFCB TODValid) of \DoveProcessor.FCBPointer) \DoveIO.ByteTRUE) (* Set clock) (\DoveMisc.DoProcessorCommand \DoveMisc.ReadGMT) [\PUTBASE CLOCKLOC 0 (\DoveIO.ByteSwap (fetch (Dove.TODFormat ClockLow.BS) of (fetch (Dove.ProcessorFCB Data) of \DoveProcessor.FCBPointer] (\PUTBASE CLOCKLOC 1 (\DoveIO.ByteSwap (fetch (Dove.TODFormat ClockHigh.BS) of (fetch (Dove.ProcessorFCB Data) of \DoveProcessor.FCBPointer] (T (* zero clock) (\PUTBASE CLOCKLOC 0 0) (\PUTBASE CLOCKLOC 1 0]) (\DoveMisc.ReadHostID [LAMBDA (HOSTLOC) (* ejs: "12-Oct-85 21:23") (* * Reads host id of this machine and smashes 3 words at HOSTLOC) (\DoveMisc.DoProcessorCommand \DoveMisc.ReadHostID) (\BLT HOSTLOC (fetch (Dove.ProcessorFCB Data) of \DoveProcessor.FCBPointer) 3) NIL]) (\DoveMisc.ReadKeyboardType (LAMBDA NIL (* ejs: "23-Oct-85 15:31") (\DoveMisc.DoProcessorCommand \DoveMisc.ReadKeyboardType) (\DoveIO.ByteSwap (\GETBASE (fetch (Dove.ProcessorFCB Data) of \DoveProcessor.FCBPointer) 0)))) (\DoveMisc.ReadRealMemDesc (LAMBDA NIL (* ejs: "23-Oct-85 15:33") (\DoveMisc.DoProcessorCommand \DoveMisc.ReadRealMemDesc) (LIST (\DoveIO.ByteSwap (\GETBASE (fetch (Dove.ProcessorFCB Data) of \DoveProcessor.FCBPointer) 0)) (\DoveIO.ByteSwap (\GETBASE (fetch (Dove.ProcessorFCB Data) of \DoveProcessor.FCBPointer) 1)) (\DoveIO.ByteSwap (\GETBASE (fetch (Dove.ProcessorFCB Data) of \DoveProcessor.FCBPointer) 2))))) (\DoveMisc.ReadVMMapDesc (LAMBDA NIL (* ejs: "23-Oct-85 15:35") (\DoveMisc.DoProcessorCommand \DoveMisc.ReadVMMapDesc) (LIST (\DoveIO.ByteSwap (\GETBASE (fetch (Dove.ProcessorFCB Data) of \DoveProcessor.FCBPointer) 0)) (\DoveIO.ByteSwap (\GETBASE (fetch (Dove.ProcessorFCB Data) of \DoveProcessor.FCBPointer) 1))))) (\DoveMisc.SetMousePosition [LAMBDA (X Y) (* ejs: "13-Sep-85 00:30") (do (replace (Dove.KeyboardFCB MouseX) of \DoveKyMo.FCBPointer with X) (replace (Dove.KeyboardFCB MouseY) of \DoveKyMo.FCBPointer with Y) repeatuntil (AND (EQ X (fetch (Dove.KeyboardFCB MouseX) of \DoveKyMo.FCBPointer)) (EQ Y (fetch (Dove.KeyboardFCB MouseY) of \DoveKyMo.FCBPointer]) (\DoveMisc.WriteGMT [LAMBDA (CLOCKLOC) (* ejs: "12-Oct-85 21:24") (* Set clock) (replace (Dove.TODFormat ClockLow.BS) of (fetch (Dove.ProcessorFCB Data) of \DoveProcessor.FCBPointer) with (\DoveIO.ByteSwap (\GETBASE CLOCKLOC 0))) (replace (Dove.TODFormat ClockHigh.BS) of (fetch (Dove.ProcessorFCB Data) of \DoveProcessor.FCBPointer) with (\DoveIO.ByteSwap (\GETBASE CLOCKLOC 1))) (\DoveMisc.DoProcessorCommand \DoveMisc.WriteGMT) (replace (Dove.ProcessorFCB TODValid) of \DoveProcessor.FCBPointer with \DoveIO.ByteTRUE]) ) (RPAQ? \DoveBeep.FCBPointer ) (RPAQ? \DoveProcessor.FCBPointer ) (RPAQ? \DoveKyMo.FCBPointer ) (RPAQ? \DoveMP.FCBPointer ) (DECLARE: DOEVAL@COMPILE DONTCOPY (GLOBALVARS \DoveBeep.FCBPointer \DoveProcessor.FCBPointer \DoveKyMo.FCBPointer \DoveMP.FCBPointer) ) (DECLARE: EVAL@COMPILE DONTCOPY (FILESLOAD (SOURCE) DOVEDECLS) [DECLARE: EVAL@COMPILE (MESARECORD Dove.BeepFCB ((BeepTCB DoveIO.TaskContextBlock) (BeepCondition WORD) (BeepMask WORD) (Frequency.BS WORD))) (MESARECORD Dove.KeyboardFCB ((KeyboardTCB DoveIO.TaskContextBlock) (hexValue BYTE) (convertKeyCodeToBit BYTE) (frameErrorCnt.BS WORD) (overRunErrorCnt.BS WORD) (parityErrorCnt.BS WORD) (spuriousIntCnt.BS WORD) (watchDogCnt.BS WORD) (badInterruptCnt.BS WORD) (MouseX WORD) (MouseY WORD) (KeyBitsBase 9 WORD))) (MESARECORD Dove.ProcessorFCB ((notifiersLockMask WORD) (upNotifyBits 1 WORD) (downNotifyBits 2 WORD) (mesaClientCondition WORD) (mesaClientMask WORD) (TODValid BYTE) (Command BYTE) (Data 3 WORD) (ProcessorTCB DoveIO.TaskContextBlock) (ClientTCB DoveIO.TaskContextBlock))) (BLOCKRECORD Dove.TODFormat ((ClockLow.BS WORD) (ClockHigh.BS WORD))) ] (DECLARE: EVAL@COMPILE (RPAQQ \DoveMisc.ReadGMT 1) (RPAQQ \DoveMisc.WriteGMT 2) (RPAQQ \DoveMisc.ReadHostID 3) (RPAQQ \DoveMisc.ReadVMMapDesc 4) (RPAQQ \DoveMisc.ReadRealMemDesc 5) (RPAQQ \DoveMisc.ReadDisplayDesc 6) (RPAQQ \DoveMisc.ReadKeyboardType 7) (RPAQQ \DoveMisc.ReadPCType 8) (RPAQQ \DoveMisc.BootButton 9) (CONSTANTS (\DoveMisc.ReadGMT 1) (\DoveMisc.WriteGMT 2) (\DoveMisc.ReadHostID 3) (\DoveMisc.ReadVMMapDesc 4) (\DoveMisc.ReadRealMemDesc 5) (\DoveMisc.ReadDisplayDesc 6) (\DoveMisc.ReadKeyboardType 7) (\DoveMisc.ReadPCType 8) (\DoveMisc.BootButton 9)) ) ) (DECLARE: DONTEVAL@LOAD DOCOPY (\DoveMisc.Init) ) (PUTPROPS DOVEMISC COPYRIGHT ("Xerox Corporation" 1985)) (DECLARE: DONTCOPY (FILEMAP (NIL (1625 8913 (\DoveMisc.BeepOff 1635 . 1922) (\DoveMisc.BeepOn 1924 . 2374) ( \DoveMisc.BootButton 2376 . 2697) (\DoveMisc.DoProcessorCommand 2699 . 3222) (\DoveMisc.GetKBDBase 3224 . 3417) (\DoveMisc.GetMouseXBase 3419 . 3741) (\DoveMisc.GetMouseYBase 3743 . 3948) ( \DoveMisc.Init 3950 . 4512) (\DoveMisc.ReadDisplayDesc 4514 . 5097) (\DoveMisc.ReadGMT 5099 . 5948) ( \DoveMisc.ReadHostID 5950 . 6321) (\DoveMisc.ReadKeyboardType 6323 . 6630) (\DoveMisc.ReadRealMemDesc 6632 . 7215) (\DoveMisc.ReadVMMapDesc 7217 . 7668) (\DoveMisc.SetMousePosition 7670 . 8159) ( \DoveMisc.WriteGMT 8161 . 8911))))) STOP