Service Manuals, User Guides, Schematic Diagrams or docs for : xerox mesa 3.0_1977 listing Keyboard.mesa_Oct77

<< Back | Home

Most service manuals and schematics are PDF files, so You will need Adobre Acrobat Reader to view : Acrobat Download Some of the files are DjVu format. Readers and resources available here : DjVu Resources
For the compressed files, most common are zip and rar. Please, extract files with Your favorite compression software ( WinZip, WinRAR ... ) before viewing. If a document has multiple parts, You should download all, before extracting.
Good luck. Repair on Your own risk. Make sure You know what You are doing.




Image preview - the first page of the document
Keyboard.mesa_Oct77


>> Download Keyboard.mesa_Oct77 documenatation <<

Text preview - extract from the document
keybOARD. mESA                   24-0CT-77 18: 30: 50                                         Page 1


-- Keyboard.Mesa      Edited by Johnsson on September 22, 1977    8:18 AM
DIRECTORY
  KeyDefs: FROM "keydefs",
  Mopcodes: FROM "mopcodes",
  StreamDefs: FROM "streamdefs",
   InlineDefs: FROM "inlinedefs",
  ControlDefs: FROM "controldefs",
   ProcessDofs: FROM "processdefs":
DEFINITIONS FROM ProcessDefs. InlineDefs. KeyDefs. StreamOefs;
Keyboard: PROGRAM IMPORTS StreamDefs SHARES ProcessDefs. StreamDefs
BEGIN
-- variables set by KeyStreams
ks: PUBLIC KeyboardHandle;
COT: PUBLIC BOOLEAN;
cursorTracking: PUBLIC BOOLEAN;
IdleProc: PUBLIC PROCEDURE;
KeyTable: PUBLIC POINTER TO ARRAY [0 .. 80) OF KeyItem;
-- The Keyboard part:
-- fixed addresses for keyboard and mouse
Keys: POINTER TO KeyArray ~ LOOPHOLE[KeyDefs.Keys];
Coordinate: TYPE = RECORD [x.y: INTEGER];
Mouse: POINTER TO Coordinate ~ LOOPHOLE[424B]:
Cursor: POINTER TO Coordinate ~ LOOPHOLE[426B];
Xmax: CARDINAL = 606-16:
Ymax: CARDINAL = 808-16;
ns. os: KeyArray;
OldState: PUBLIC POINTER TO KeyArray     = @os;
NewState: POINTER TO KeyArray = @ns:
GetDebugger: MACHINE CODE     = INLINE [Mopcodes.zKFCB. ControlOefs.sInterrupt];
ProcessKeyboard: PUBLIC PROCEDURE
  BEGIN
  bitcount. start: [0 .. 15];
  char: [0 .. 377B];
  entry: Keyltem;
  i: [O .. SIZE[KeyArray]);
  interruptS tate: updown ~ up:
  new in: CARDINAL;
  ph: Processllandle;
  pp: ProcessPriority;
  StateWord: WORD:
  stroke: POINTER TO KeyBits    LOOPHOLE[NewState];
  DO
     first update the cursor
  IF cursorTracking THEN
    BFGIN
    Mouse.x ~ Cursor.x ~ MAX[O.MIN[Xmax.Mouse.x]]:
    Mouse.y ~ Cursor.y ~ MAX[O.MIN[Ymax.Mouse.y]];
    [NO:
  NewStatet   ~   Keyst;
  -- The following code checks for Clrl-Swat. the debugger interrupt keys.
  -- This code could be made into a separate process.
  IF slroke.Clrl = down AND slroke.Spare3 = down TIIEN
    BrGIN
    If inlerruptState = up TIIFN
      BFGTN
       interruplSlate ~ down:
      rOR pp OrCRrASING IN ProcessPriority 00
         ph ~ PV[pp]:
         Ir ph /I ProcessNTL AND ph II NIL AND ph.state. inslbyte /I Mopcodes . .lBRK TIIFN
keybOARD.mESA                       24-0CT-77 18:30:60                            Page 2


          BEGIN
          ph.state.instbyte ~ Mopcodes.zBRK:
          BLOCK[]: -- try to take breakpoint
          IF PV[pp] = ph AND ph.state.instbyte           0 THEN EXIT:
          END:
        REPEAT FINISHED => GetDebugger[]:
        ENDLOOP:
      NewState~    ~ Keys~:
      END:
    END
  ELSE interruptState    ~    up:
  -- The following code checks for down transitions in the keyboard state
  -- and enters characters in the current keystream buffer
  FOR i IN [0 .. SIZE[KeyArray]) DO
    IF (StateWord ~ BITXOR[OldState[i],NewState[i]]) II 0 THEN
      BEGIN -- found one or more transitions
      start ~ 0:
      DO
         FOR bitcount IN [start .. 15] DO
           IF LOOPHOLE[StateWord,INTEGER]
                IF char = 177B THEN BEGIN COT ~ TRUE: GOTO skip END
                ELSE char ~ BITAND[char. 37B]:
             stroke.LeftShift, stroke.RightShift =>
                char ~ entry.ShiftCode:
             stroke. Lock =>
                IF entry. Letter THEN char ~ entry.ShiftCode:
             ENDCASE:
           IF (new'n~ks.in+l) = KeyBufChars THEN newin ~ 0:
           IF newin II ks.out THEN
             BEGIN
             ks.buffer[ks. in] ~ LOOPHOLE[char]:
             ks.in~newin;
             END:
           EXITS skip => NULL:
           END:
        IF (StateWord ~ BITSHIFT[StateWord,l])=O THEN EXIT:
        start ~ bitcount+1:
        ENDLOOP:
      END:
    ENDLOOP:
 OldState~   ~   NewState~:
 BLOCK[] :
 ENDLOOP:
 END:
ReadChar: PUBLIC PROCEDURE [stream: StreamHandle] RETURNS [char: UNSPECIFIED] =
  BEGIN char ~ 0:
  WITII s: stream SELECT FROM
     Keyboard =>
       DO -- until character typed
         IF s. ou t II s. in THEN
            BEGIN
            char ~ s.buffer[s.out]:
            s. ou t ...
               IF S.out = KeyBufChars-l
                  THEN a
                  ElSE s.out+l:
            RnURN
            fNO:
         IF IdleProcll1 OOPIiOI frO] THfN IdleProc[];
         -- BIOCK[]: when scheduler arrives
         ENDIOOP;
     fNOCAS[ => SIGNAL Slreamfrror[slream.SlreamType]:
  RrrURN:
  [NO;
InpulBufferfmply: PUBLIC PROC[[)URf [slream:Slreamllandle] RfTURNS [BOOlfAN]
keybOARD.mESA                24-0CT-77 18:30:50         Page 3


  BEGIN
  WITH s:stream SELECT FROM
    Keyboard =) RETURN[s.in = s.out):
    ENDCASE =) SIGNAL StreamError[stream,StreamType):
  RETURN[ FALSE]:
  END:
OldState~   ~ Keys~:


END.



◦ Jabse Service Manual Search 2024 ◦ Jabse PravopisonTap.bg ◦ Other service manual resources online : FixyaeServiceinfo