File information: | |
File name: | Keyboard.mesa_Oct77.pdf [preview Keyboard.mesa Oct77] |
Size: | 130 kB |
Extension: | |
Mfg: | xerox |
Model: | Keyboard.mesa Oct77 🔎 |
Original: | Keyboard.mesa Oct77 🔎 |
Descr: | xerox mesa 3.0_1977 listing Keyboard.mesa_Oct77.pdf |
Group: | Electronics > Other |
Uploaded: | 25-02-2020 |
User: | Anonymous |
Multipart: | No multipart |
Information about the files in archive: | ||
Decompress result: | OK | |
Extracted files: | 1 | |
File name Keyboard.mesa_Oct77.pdf 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] |
Date | User | Rating | Comment |