|
DataMuseum.dkPresents historical artifacts from the history of: Rational R1000/400 Tapes |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about Rational R1000/400 Tapes Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - downloadIndex: ┃ T V ┃
Length: 4797 (0x12bd) Types: TextFile Names: »V«
└─⟦407de186f⟧ Bits:30000749 8mm tape, Rational 1000, RCFSUN └─ ⟦e5cd75ab4⟧ »DATA« └─⟦this⟧
with System; -- *************************************************************************** -- The generic package CONSOLE_IO provides asynchronous (interrupt driven) -- input and output, XON/XOFF protocol, line edit and echoing. It is -- target independent but is parameterized by target dependent routines. -- The console input and output devices can be physically the same device -- (such as a serial port) or independent devices (such as a keyboard and -- a memory mapped screen). -- The output device must be able to generate an interrupt when it is -- ready to send a character. It is assumed that the same interrupt is -- used for both input and output. The interrupt handler must pass the -- character received as parameter to the procedure ALSYX103_INTERRUPT_CALL -- as defined in the USCODXXX.ASM. The interrupt handler must also pass a -- status in the second byte of the 32 bit parameter: -- 1 : character received -- 2 : device ready to send -- 3 : character received + device ready to send -- *************************************************************************** generic Xon_Xoff : in Boolean := True; -- The XON_XOFF parameter specifies whether automatic XON_XOFF control is -- to be activated. If FALSE, the characters XON and XOFF are not -- treated specially, but are processed like any other characters. If -- XON_XOFF is TRUE, XON and XOFF are treated specially as follows: -- -- If an XOFF is received, no further characters are transmitted -- until a corresponding XON character is received. -- -- If the buffer is nearly full, an XOFF is transmitted to stop the host -- from sending further characters. An XON is then sent when the buffer -- easily accomodate additional characters. -- -- The XON_XOFF parameter must be set to false if the console output -- device is not the same as the console input device. Echo : in Boolean := True; -- True if incoming characters must be echoed. Line_Edit : Boolean := True; -- In this mode , BS or DEL cancels the previously received character . -- If ECHO is TRUE, the sequence BS ' ' BS is sent; otherwise, the -- terminal is put in "raw" mode and the characters BS and DEL -- are transmitted unchanged. In_Buf_Size : in Positive := 512; -- Size of the input buffer. If XON_XOFF is FALSE, the calling program has -- the responsibility to issue GET calls sufficiently often to ensure that -- the buffer does not become full. In LINE_EDIT mode, the input buffer -- must be greater than the maximum line length. If ECHO is true, an echo -- buffer of the same size as the input buffer is allocated. Out_Buf_Size : in Positive := 512; -- Size of the output buffer. It is recommended to define a size greater -- or equal to the maximum line length to let high priority tasks send one -- full line without blocking. with function Get_Serial_Vector_Offset return Natural is <>; -- This function returns the vector offset (or 4*vector) used -- by the serial port. with procedure Put_Char (C : Character) is <>; -- Sends the given character on the console output device. This procedure -- is called only when the transmission of the characters has not been -- suspended after the reception of an XOFF. -- This procedure must wait until the device is ready before initiating -- the transmission of the character, but it should not wait until the -- transmission of the character is finished. package Console_Io is Xon : constant Character := Ascii.Dc1; Xoff : constant Character := Ascii.Dc3; Buffer_Full : exception; -- Raised when the input or the echo buffer is full (this is very unlikely -- if the XON_XOFF protocol is set to TRUE). function Get return Character; -- ------------------------------------------------------------------------ -- Returns the next character received on the console input device. In -- LINE_EDIT mode (MAX_LINE_LENGTH > 0), the character is returned only -- after a full line has been input, otherwise the character is returned -- as soon as it is available. -- ------------------------------------------------------------------------ procedure Put (S : System.Address; Count : Integer); -- ------------------------------------------------------------------------ -- Sends the given character. If the output buffer is full, the calling -- task is suspended (the exception BUFFER_FULL is not raised). -- ------------------------------------------------------------------------ end Console_Io;