% File: MIOCDefs.mc Edit by Danielson on July 23, 1980 3:27 PM: IOMisc bits for half-duplex bit-synchronous Edit by Danielson on May 21, 1980 3:58 PM: New bits for TTY error status Edit by Danielson on March 21, 1980 5:54 PM: IOMisc bits for intraframe fill Edit by Danielson on January 21, 1980 4:48 PM: Added status bits Edit by Danielson on January 16, 1980 12:59 PM MIOC microcode definitions. % SET TASK [0]; * Registers used by MIOC code RV[IOInt0,0];RV[IOSave,0];RV[IOR0,0]; RV[IOInt1,1]; RV[IOTemp0,2]; RV[IOTemp1,3]; RV[IOTemp4,4]; RV[IOPollCmd,4]; RV[IOTemp5,5]; RV[IOResults,5]; RV[IOTemp6,6]; RV[IOTimerInit,6]; RV[IOTemp7,7]; RV[IOTimer,7]; RV[IOTemp10,10]; RV[IOPollStat,10]; RV[IOTemp11,11]; RV[IOPollRegs,11]; RV[IOTemp12,12]; RV[IOMisc,13]; * Misc (see below) RV[IOiocb,14]; * IOCB pointer (LONG) RV[IOiocbHi,15]; RV[IOcsb,16]; * CSB pointer (LONG) RV[IOcsbHi,17]; * IOMisc bits MC[IOMiscInput,000001]; * Input in progress MC[IOMiscCount,000036]; * Current event count MC[IOMiscFake,000040]; * Fake wakeup in progress MC[IOMiscEnabled,004000]; * Chip transmitter enabled MC[IOMiscFill,000400]; * Send fill char ASAP (Byte only) MC[IOMiscSentFirst,001000]; * Sent 1st fill char (Byte only) MC[IOMiscTimeout,002000]; * Timeout occurred (Byte only) MC[IOMiscEOFTImeout,2000]; * Enable EOF timeouts (Bit only) MC[IOMiscEOFBits,3400]; * EOF bits (Bit only) MC[IOMiscEOFIncr,1000]; * Increment EOF state (Bit only) MC[IOMiscTTYStatEnd,000200]; * Bad stat forced end (TTY only) MC[IOMiscTTYTimeout,000400]; * TTY timeout (TTY only) MC[IOMiscTTYChars,001000]; * TTY chars in buffer (TTY only) * Dispatch and other macros MACRO[IOWakeDisp,DISPATCH[#1,15,3]]; * Wakeup type dispatch MACRO[IOIntDisp,DISPATCH[#1,14,4]]; * Interrupt type dispatch MACRO[IOPollerDisp,DISPATCH[#1,1,4]]; * Poller command dispatch MACRO[IOLoadNotifyHi,AND@[ADD[LSHIFT[#1,14],#2],177400]C]; MACRO[IOLoadNotifyLo,AND@[ADD[LSHIFT[#1,14],#2],000377]C]; MACRO[IOEventBit,RSHIFT[100000,#1]]; * Macro to build event words * At locations SET [IOStartXmtrLoc,ADD[LSHIFT[IOPage,10],235]]; * Interrupt type SET [IOTimeoutLoc,ADD[LSHIFT[IOPage,10],236]]; * Interrupt type SET [IOInitOverlayLoc,ADD[LSHIFT[IOPage,10],237]]; * Initialization for overlay SET [IOIntrLoc,ADD[LSHIFT[IOPage,10],240]]; * Interrupt type SET [IOPollLoc,ADD[LSHIFT[IOPage,10],320]]; * Action type SET [IOWakeupLoc,ADD[LSHIFT[IOPage,10],340]]; * Wakeup type SET [IOFixedLoc,ADD[LSHIFT[IOPage,10],360]]; * Fixed locations * Fixed locations SET [IORdRegALoc,ADD[IOFixedLoc,0]]; * Read command--channel A SET [IORdRegBLoc,ADD[IOFixedLoc,1]]; * Read command--channel B SET [IOWrRegALoc,ADD[IOFixedLoc,2]]; * Write command--channel A SET [IOWrRegBLoc,ADD[IOFixedLoc,3]]; * Write command--channel B SET [IORdDataALoc,ADD[IOFixedLoc,4]]; * Read data--channel A SET [IORdDataBLoc,ADD[IOFixedLoc,5]]; * Read data--channel B SET [IOWrDataALoc,ADD[IOFixedLoc,6]]; * Write data--channel A SET [IOWrDataBLoc,ADD[IOFixedLOc,7]]; * Write data--channel B SET [IOIntrDoneLoc,ADD[IOFixedLoc,10]]; * End code for RS232C SET [IODoNotifyLoc,ADD[IOFixedLoc,11]]; * Naked notify code * CSB offsets MC[IOcsbPrinterMask,0]; * Printer wakeup mask MC[IOcsbPoller,4]; * Poller Command/Reg/Data MC[IOcsbResults,5]; * Results from Poller Command MC[IOcsbTimerInit,6]; * Timer initialize value MC[IOcsbTimer,7]; * Timer current value MC[IOcsbOut,10]; * Output ring read pointer MC[IOcsbIn,11]; * Input ring write pointer MC[IOcsbMask,12]; * Wakeup mask MC[IOcsbRegs,14]; * Reg3/Reg5 data MC[IOcsbStat,15]; * Status MC[IOcsbTables,16]; * LONG POINTER to tables * IOCB definition MC[IOIOCBNext,0]; * Next IOCB in chain MC[IOIOCBBCC,1]; * Current value of checksum MC[IOIOCBState,2]; * Current state information MC[IOIOCBStat,3]; * IOCB status bits MC[IOIOCBBuffer,4]; * Pointer to data buffer MC[IOIOCBMaxCount,6]; * Buffer length MC[IOIOCBOffset,7]; * Offset to start of data MC[IOIOCBStart,10]; * Starting offset MC[IOIOCBSynch,11]; * Condition variable MC[IOIOCBBits,12]; * Completion bits * Comm chip commands MC[IONull,00]; * Null command MC[IOAbort,10]; * Send SDLC abort MC[IOResetExt,20]; * Reset external status MC[IOResetChan,30]; * Reset channel MC[IOEnabIntr,40]; * Interrupt on next character MC[IOResetXmtr,50]; * Reset transmitter interrupt MC[IOResetError,60]; * Reset error MC[IOReturnIntr,70]; * Return from interrupt MC[IOResetRcvrCRC,100]; * Reset receiver CRC MC[IOResetXmtrCRC,200]; * Reset transmitter CRC MC[IOResetUnderrun,300]; * Reset underrun/EOM latch * Load Comm command bits SET[IOM1,10000]; * M1 channel SET[IOWr,0]; * Write SET[IORd,20000]; * Read SET[IOData,0]; * Select data registers SET[IOCmd,40000]; * Select command registers SET[IOChanA,0]; * Select channel A SET[IOChanB,100000]; * Select channel B * Load interval timer command bits SET[IOitWrite,400]; * Write SET[IOitRead,1000]; * Read SET[IOitA1,2000]; * Addressing bit A1 SET[IOitA0,4000]; * Addressing bit A0 SET[IOitEnable,10000]; * Enable timer 3 gate * MIOC output registers SET[IOResetMIOC,0]; * Reset MIOC SET[IOErrorReset,1]; * Reset Error SET[IOAllowWakeup,2]; * Allow Wakeup (if BIT 17 = 1) SET[IOLoadTimer,3]; * Load Interval Timer SET[IOLoadRS232,4]; * Load Communication Chip SET[IOLoadAutoDial,5]; * Load Auto Dialer SET[IOLoadPlotterCmd,6]; * Load Plotter Command SET[IOLoadPlotterData,7]; * Load Plotter Data MC[IOfOutputReset,14]; *Does not use Odata bits SET[IOLoadPrinter,15]; * Load Printer SET[IOResetTimer,16]; * Reset Timer SET[IOClearRingLatch,17]; * Clear Ring Latch * MIOC input registers SET[IOReadMIOCID,0]; * Read ID SET[IOReadWakeup,1]; * Read Wakeup Status SET[IOReadTimer,2]; * Read Timer Data/Status SET[IOReadRS232,3]; * Read RS232 Data/Status SET[IOReadAutoDial,4]; * Read AutoDial Data/Status SET[IOReadPlotter,5]; * Read Plotter Status SET[IOReadPrinter,6]; * Read Printer Status MC[IOMIOCId,010000]; * Magic Id for MIOC MC[IOTTYBadStatus,160]; * Parity, Framing, DataLost(0,11968)\20g1G5402i1I MC[IOStatEvent,1]; * External stat intr occurred MC[IOStatDataLost,2]; * Data Lost occurred. MC[IOStatSynSeen,4]; * SYN char seen